The following services are optional and can be configured based on your needs:

Unsplash

web/.env
UNSPLASH_ACCESS_KEY=

Integration for displaying a background image to your login page. If not set, no image will be displayed - the login will be centered. Get your access key from the Unsplash Developer Portal

Redis

web/.env
RATE_LIMITING=1

# Redis (only needed when rate limiting is enabled or to optimize the unsplash login background image loading)
UPSTASH_REDIS_REST_URL=https://yourname.upstash.io
UPSTASH_REDIS_REST_TOKEN=
  1. Create a free account on Upstash
  2. Set up a new Redis database in the Upstash Console
  3. Copy the Endpoint URL (beginning with https://) to UPSTASH_REDIS_REST_URL and your password to UPSTASH_REDIS_REST_TOKEN

Posthog

web/.env
NEXT_PUBLIC_POSTHOG_KEY=
POSTHOG_REGION=
  1. Create a free account on Posthog
  2. Select every feature you want to use (I’d recommend all of them)
  3. Copy the project API key to NEXT_PUBLIC_POSTHOG_KEY and set your region in POSTHOG_REGION. You will find it the posthog.init() function in the snippet provided by Posthog.
  4. Open the appConfig.tsx file and ensure the services.posthog is enabled.

You can of course use the self-hosted version of Posthog. In this case, you need to set up your own instance and configure the URL and API key accordingly.

You then either need to change the api_host value in the posthog.init() function or change the proxy settings in the next.config.mjs file.

Plausible

web/.env
NEXT_PUBLIC_PLAUSIBLE_URL=https://plausible.url.com

For Plausible, you can use the hosted version or self-hosted version.

  1. Create a free account on Plausible or set up your own instance.
  2. Copy your domain to NEXT_PUBLIC_PLAUSIBLE_URL
  3. Open the appConfig.tsx file and ensure the services.plausible is enabled.
  4. Go to web/a/[locale]/layout.tsx and change the config as needed. The existing is working for self-hosted instances.

Analytics

See the Google Analytics page for setting up environment variables.