Skip to content

Instantly share code, notes, and snippets.

@eldadfux
Last active March 28, 2021 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eldadfux/eb3ed1c4e5f43b7f7259469dd29312c5 to your computer and use it in GitHub Desktop.
Save eldadfux/eb3ed1c4e5f43b7f7259469dd29312c5 to your computer and use it in GitHub Desktop.
Debugging Appwrite SSL certificates

Appwrite SSL Certificates

This is a small snippet to help you debug and make sure Appwrite is able to generate SSL certificates for your domains.

Things to check:

  • You're using a public-facing domain pointing to your Appwrite instance.
  • Your _APP_ENV variable is set for production mode (learn more at: https://appwrite.io/docs/environment-variables).
  • You have a valid email address set on _APP_SYSTEM_SECURITY_EMAIL_ADDRESS (learn more at https://appwrite.io/docs/environment-variables).
  • Currently, Appwrite is using the acme HTTP-challenge to issue an SSL certificate. This forces us to generate certificates for port 443. At this point, other ports will not work.

If you set your domain after your Appwrite server has started working, you will need to restart the Appwrite container using docker-compose restart appwrite. This will force Appwrite to re-issue and check your SSL certificate if needed. We'll work to automate this behavior in future versions.

Debugging

In case you're still struggling with getting your certificate to work, check the Appwrite certificates worker log. You can do that with the following command:

docker-compose logs appwrite-worker-certificates

Dev Environment

You can't issue a valid certificate for localhost. By default, Appwrite will issue a self-signed certificate which is good enough for development.

When using a self-signed certificate, you should enable client.setSelfSigned() method in your SDK of choice. This will allow your application to connect to your local Appwrite server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment