PHPMyAdmin on Forge with Tailscale
This guide walks you through deploying PHPMyAdmin on Laravel Forge with secure access via Tailscale VPN. This setup ensures your database management interface is only accessible through your Tailscale network.
Basic Configuration
Section titled “Basic Configuration”-
SSH into your server
SSH into your server using the command
ssh <username>@<tailscale domain | ip address>. -
Generate Tailscale SSL Certificates
Run
sudo tailscale certto see an example of the domain format you should use. This command will display the proper domain structure for your Tailscale setup.Then generate the certificates for your specific domain:
Terminal window sudo tailscale cert <domain>This will generate the SSL key (
.key) and certificate (.crt) files in your current directory. -
Create PHPMyAdmin Site on Forge
Navigate to your Forge server and create a new site:
- Select PHPMyAdmin from the application type dropdown
- Use a database user with sufficient database access permissions
- Create a separate database specifically for PHPMyAdmin
- Set the domain to match the one you used in step 1
-
Configure SSL Certificate
In Forge, add the SSL certificate:
- Use
catto display the contents of the.keyand.crtfiles generated in step 1 - Add these as a custom SSL certificate in Forge
- Activate the certificate once it’s been added
- Use