rallly/apps/docs/self-hosting/configuration-options.mdx
2023-11-26 11:13:42 +07:00

116 lines
3.5 KiB
Text

---
icon: gear
title: Configuration Options
description: Using environment variable to configure a self-hosted instance of Rallly.
---
## Environment variables
An environment variable is a dynamic value that can be set outside of an application and is used to configure or customize the behavior of an application.
This page lists all environment variables supported by Rallly.
### Base Configuration
These variables need to be configured for Rallly to run and function properly.
<ParamField path="DATABASE_URL" required>
Postgres database connection string
</ParamField>
<ParamField path="NEXT_PUBLIC_BASE_URL" required>
The base url where this instance is accessible, including the scheme (eg.
`http://` or `https://`), the domain name, and optionally a port.
</ParamField>
<ParamField path="SECRET_PASSWORD" required>
A random 32-character secret key used to encrypt user sessions
</ParamField>
<ParamField path="ALLOWED_EMAILS">
Comma separated list of email addresses that are allowed to register and
login. Wildcard characters are supported. Example: Setting it to
`*@example.com` to allow anyone with a `@example.com` email address.
</ParamField>
### Email Configuration
These variables need to be configured to let Rallly send out transactional emails.
<ParamField path="NOREPLY_EMAIL">
This email is used as the sender for all transactional emails. If not set,
`SUPPORT_EMAIL` will be used instead.
</ParamField>
<ParamField path="SUPPORT_EMAIL" required>
This email will be shown as the contact email for support queries.
</ParamField>
<ParamField path="SMTP_HOST" required>
The host address of your SMTP server
</ParamField>
<ParamField path="SMTP_PORT" default="25 or 465">
The port of your SMTP server
</ParamField>
<ParamField path="SMTP_SECURE" default="false">
Set to "true" if SSL is enabled for your SMTP connection
</ParamField>
<ParamField path="SMTP_USER" default="">
The username (if auth is enabled on your SMTP server)
</ParamField>
<ParamField path="SMTP_PWD" default="">
The password (if auth is enabled on your SMTP server)
</ParamField>
<ParamField path="SMTP_TLS_ENABLED" default={"false"}>
Enable TLS for your SMTP connection
</ParamField>
### Single Sign On (SSO) with OpenID Connect (OIDC)
To enable SSO with an OIDC compliant identity provider you will need to configure the following variables.
<ParamField path="OIDC_ENABLED">
Must be set to `true` to enable OIDC Login
</ParamField>
<ParamField path="OIDC_NAME" default="OpenID Connect">
The user-facing name of your provider as it will be shown on the login page
</ParamField>
<ParamField path="OIDC_DISCOVERY_URL">
URL of the `.well-known/openid-configuration` endpoint for your OIDC provider
</ParamField>
<ParamField path="OIDC_CLIENT_ID">
The client ID of your OIDC application
</ParamField>
<ParamField path="OIDC_CLIENT_SECRET">
The client secret of your OIDC application
</ParamField>
#### Required Scopes
The following scopes are required for OIDC to function properly.
- `openid`: Essential for OIDC to function, used to perform authentication.
- `profile`: Access to the user's personal information such as name and picture.
- `email`: Access to the user's email address.
#### Callback URL / Redirect URI
The callback URL for your OIDC application must be set to:
```
{NEXT_PUBLIC_BASE_URL}/api/auth/callback/oidc
```
<Info>
Replace `{NEXT_PUBLIC_BASE_URL}` with the base URL of your Rallly instance.
</Info>
Ensure this URL is added to the list of allowed redirect URIs in your OIDC provider's application settings.