Skip to content

Appwrite + Nginx + SSL on Custom Domains

Published: April 26, 2024

2 min read


Appwrite + Nginx + SSL on Custom Domains

On my VPS, I leverage CloudPanel to oversee multiple sites, including one that runs Docker and uses Appwrite as its source.

However, using CloudPanel means dealing with Nginx, which proxies traffic for different websites. This setup made it a bit tricky to assign a custom domain to an Appwrite project.

The basic process involves adding your domain in the Project > Settings > Custom Domain section and pointing the CNAME to your main Appwrite domain. Simple enough, right? But here's the hitch: Appwrite can't issue an SSL certificate via Let's Encrypt for this domain because it fails the verification.


The solution –

  1. First, make sure the CNAME is correctly set up for your domain.
  2. Go to CloudPanel, select your domain, and click on VHOST/Nginx.
  3. Add the secondary domain in the server block right next to the main domain, separated by a comma, then save your changes.
  4. Head over to the SSL/TLS tab.
  5. If there's an existing LE certificate, Delete it.
  6. Click on Actions and choose New LE Cert.
  7. Enter both your main Appwrite domain and the custom domain you want to use for the certificate.
  8. Click on 'Create and Install'.
  9. Done! Now both domains have a valid SSL certificate.

Note: If Appwrite indicates an SSL Certificate Failure, don't worry. It's marked as failed because the verification attempt by the worker was unsuccessful.

Darshan Pandya