Configuring Self-Hosted Canonic

Environment Variables

You can configure the application in a variety of ways to add support for your services and their related authentication credentials.

Environment Variables

All configuration is done through environment variables passed to docker when running the image. You can configure authentication keys for all the services you would like to enable on Canonic.


This is the key used by Canonic to authenticate your license. Limits are based on the plan that you buy. To generate a license key, head over to your profile settings. Create an access token with all the permission checkboxes selected. This key acts like your license.



When you're hosting Canonic anywhere except your dev environment, you want it accessible on a publicly accessible url. This can either be the public IP address or the hostname.

If you are running it on localhost, the APP_URL should be http://localhost.



This is the URL necessary to deploy the apps that you create and access publicly. This can either be the public IP address or the hostname followed by /app.

If you are running it on localhost, the GENERATOR_URL should be http://localhost:3000/app. Change the port in the URL to the one you are running docker image on.


Example: mongodb://username+password@localhost:27017

MongoDB URL. If you want to persist your MongoDB data, you can use your own MongoDB database instead of persisting it on the container instance. You can easily spin up a database on MongoDB Atlas, and copy the connection string into this variable.



We use default smtp credentials to deliver emails. If you want to use your own mailgun account, you can specify the username here.


The password for the mailgun account specified in MAILGUN_USERNAME

If you want to add login with Google to your self-hosted app, you need to add the following credentials to your environment file.




The callback URL for sign in with Google. If you are running the application on localhost, make sure to add the URL with the correct PORT that your app is running on, in your Google Console Credentials, under Authorized redirect URIs.


The client ID for sign in with Google


The client secret for sign in with Google

Did you find what you were looking for?
What went wrong?
Need more help?We have a thriving Discordcommunity that can help you with all things Canonic. →