Skip to content

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.

  1. SSH into your server

    SSH into your server using the command ssh <username>@<tailscale domain | ip address>.

  2. Generate Tailscale SSL Certificates

    Run sudo tailscale cert to 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.

  3. 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
  4. Configure SSL Certificate

    In Forge, add the SSL certificate:

    • Use cat to display the contents of the .key and .crt files generated in step 1
    • Add these as a custom SSL certificate in Forge
    • Activate the certificate once it’s been added