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.
LICENSE
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.
APP_URL
Example: https://my-canonic.com
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
.
GENERATOR_URL
Example: https://my-canonic.com/app
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.
MONGO_URL
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.
MAILGUN_USERNAME
Example: self-hosted@mg.canonic.dev
We use default smtp credentials to deliver emails. If you want to use your own mailgun account, you can specify the username here.
MAILGUN_PASSWORD
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.
AUTH_GOOGLE_CALLBACK_URL
Example: https://my-canonic.com/auth/google
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.
AUTH_GOOGLE_CLIENT_ID
The client ID for sign in with Google
AUTH_GOOGLE_SECRET
The client secret for sign in with Google