Kaneo Logo
Installation

Environment variables

The environment variables are used to configure the application.

Set up the file

The environment variables are used to configure the application. We will use a .env file to store the variables. For the sample environment file, see the example .env file.

The variables are split up into the following sections:

Required variables

General URLs

This section will cover all the variables related to the general URLs.

NameDescription
KANEO_CLIENT_URLThe URL of the web application.
KANEO_API_URLThe URL of the API.

Database

This section will cover all the variables related to the database.

NameDescription
DATABASE_URLThe URL of the PostgreSQL database.
POSTGRES_DBThe name of the PostgreSQL database.
POSTGRES_USERThe username for the PostgreSQL database.
POSTGRES_PASSWORDThe password for the PostgreSQL database.

Authentication

This section will cover all the variables related to the authentication.

NameDescription
AUTH_SECRETThe secret key for the JWT token. Must be at least 32 characters long, use a long, random value in production. Example: use openssl rand -base64 32 to generate a secure key in Linux/macOS.

Optional variables

Access Control

NameDescriptionDefault
DISABLE_GUEST_ACCESSDisable anonymous/guest sign-in. When set to true, the guest access button will not be shown on sign-in and sign-up pages.false
DISABLE_REGISTRATIONDisable user registration. When set to true, the sign-up option will not be shown on the sign-in page.false

GitHub SSO & Integration

NameDescription
GITHUB_CLIENT_IDThe GitHub client ID.
GITHUB_CLIENT_SECRETThe GitHub client secret.
GITHUB_APP_IDThe GitHub app ID.
GITHUB_WEBHOOK_SECRETThe GitHub webhook secret.
GITHUB_PRIVATE_KEYThe GitHub private key.

Google SSO

NameDescription
GOOGLE_CLIENT_IDThe Google client ID.
GOOGLE_CLIENT_SECRETThe Google client secret.

Discord SSO

NameDescription
DISCORD_CLIENT_IDThe Discord client ID.
DISCORD_CLIENT_SECRETThe Discord client secret.

Custom OAuth/OIDC

NameDescription
CUSTOM_OAUTH_CLIENT_IDOAuth client ID from your provider.
CUSTOM_OAUTH_CLIENT_SECRETOAuth client secret from your provider.
CUSTOM_OAUTH_AUTHORIZATION_URLAuthorization endpoint URL.
CUSTOM_OAUTH_TOKEN_URLToken exchange endpoint URL.
CUSTOM_OAUTH_USER_INFO_URLUser info endpoint URL.
CUSTOM_OAUTH_DISCOVERY_URL(Optional) OpenID Connect discovery document URL.
CUSTOM_OAUTH_SCOPES(Optional) Comma-separated list of OAuth scopes. Default: profile,email.
CUSTOM_OAUTH_RESPONSE_TYPE(Optional) OAuth response type. Default: code.
CUSTOM_AUTH_PKCE(Optional) Enable/disable PKCE. Default: true.

SMTP Configuration

NameDescription
SMTP_HOSTThe SMTP host.
SMTP_PORTThe SMTP port.
SMTP_SECUREWhether to use SSL/TLS.
SMTP_USERThe SMTP user.
SMTP_PASSWORDThe SMTP password.
SMTP_FROMThe SMTP from address.
SMTP_REQUIRE_TLSWhether to explicitly force to use TLS. See more on.

Key points

On this page