The following services are optional and can be configured based on your needs:
Unsplash
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
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=
- Create a free account on Upstash
- Set up a new Redis database in the Upstash Console
- Copy the Endpoint URL (beginning with https://) to
UPSTASH_REDIS_REST_URL and your password to UPSTASH_REDIS_REST_TOKEN
Posthog
NEXT_PUBLIC_POSTHOG_KEY=
POSTHOG_REGION=
- Create a free account on Posthog
- Select every feature you want to use (I’d recommend all of them)
- 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.
- 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
NEXT_PUBLIC_PLAUSIBLE_URL=https://plausible.url.com
For Plausible, you can use the hosted version or self-hosted version.
- Create a free account on Plausible or set up your own instance.
- Copy your domain to
NEXT_PUBLIC_PLAUSIBLE_URL
- Open the
appConfig.tsx file and ensure the services.plausible is enabled.
- 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.