Setup Domain Name and SSL Certificate
Securing your PasswordLab server with a domain name and SSL certificate ensures safe, encrypted communication between your users and your server. In this guide, we’ll show you how to link a domain name to your PasswordLab installation and automatically issue a free SSL certificate using Let’s Encrypt.
Prerequisites
Before you begin:
- You need root access to your server.
- You must be logged in as an admin user in the PasswordLab web app.
- A domain or subdomain name (e.g.,
vault.yourdomain.com) that you control.
Step 1: Point Your Domain to the Server
- Log in to your domain registrar (e.g., GoDaddy, Namecheap, Cloudflare).
- Create an A record in your DNS settings:
- Host: Your chosen subdomain (e.g.,
vault) - Points to: Your PasswordLab server’s public IP address
- Host: Your chosen subdomain (e.g.,
- Wait for DNS propagation. This can take a few minutes to a few hours.
Tip: Use whatsmydns.net to check if your A record has propagated globally.
Step 2: Set the Domain in PasswordLab App Config
- Log in to the PasswordLab web interface using your admin credentials.
- Navigate to Settings → App Config.
- In the Domain field, enter the full domain or subdomain you pointed earlier (e.g.,
vault.yourdomain.com). - Click Save.
If your DNS hasn’t fully propagated yet, you’ll see an error. Just wait and try again later.
If everything is configured properly, you’ll see a success message confirming the domain has been set.
Step 3: Restart the PasswordLab Service
Now that the domain name is configured, we need to apply the changes and install the SSL certificate.
- SSH into your server as the root user.
Restart the PasswordLab service:
systemctl restart passwordlabVerify that the service restarted successfully:
systemctl status passwordlab
You should see a green “active (running)” status.
Behind the scenes, PasswordLab now automatically requests and installs a Let’s Encrypt SSL certificate for your domain.
Step 4: Verify the SSL Certificate
- Open your domain (e.g.,
https://vault.yourdomain.com) in a browser. - Ensure the browser shows “Connection is secure”.
- Click on the padlock icon and view the SSL certificate details.
- You should see that the certificate was issued by Let’s Encrypt and is valid.
Success!
You’ve successfully pointed your domain to your PasswordLab server and secured it with an automatically installed Let’s Encrypt SSL certificate.
This setup ensures your users' credentials and vault operations are protected with modern TLS encryption from the moment they land on your site.