-
Notifications
You must be signed in to change notification settings - Fork 298
Configuration
Plausible CE is configured with environment variables.
The environment variables listed on this page can be set in your .env file that was created during quickstart.
Configures the base URL to use in link generation and Cross-Site WebSocket Hijacking (CSWSH) checks.
It doesn't have any defaults and needs to be provided.
BASE_URL=https://plausible.example.com
Configures the secret used for sessions in the dashboard and for generating other secrets like TOTP Vault Key.
It doesn't have any defaults and needs to be provided.
It can be generated with OpenSSL:
$ openssl rand -base64 48
GLVzDZW04FzuS1gMcmBRVhwgd4Gu9YmSl/k/TqfTUXti7FLBd7aflXeQDdwCj6Cz
SECRET_KEY_BASE=GLVzDZW04FzuS1gMcmBRVhwgd4Gu9YmSl/k/TqfTUXti7FLBd7aflXeQDdwCj6Cz
Warning
Don't use this exact value :)
Default: derived from SECRET_KEY_BASE
using PBKDF2
Configures the secret used for encrypting TOTP secrets at rest using AES256-GCM.
It can be generated with OpenSSL:
$ openssl rand -base64 32
dsxvbn3jxDd16az2QpsX5B8O+llxjQ2SJE2i5Bzx38I=
TOTP_VAULT_KEY=dsxvbn3jxDd16az2QpsX5B8O+llxjQ2SJE2i5Bzx38I=
Default: invite_only
Restricts registration of new users. Possible values are true
(full restriction), false
(no restriction), and invite_only
(only the invited users can register).
Default: false
When enabled, new users need to verify their email address by following a link delivered to their mailbox. You can find Plausible's SMTP configuration options under below.
If something went wrong you can run this command to verify all users in the database:
$ cd plausible-ce # or wherever you cloned this repo
$ docker compose exec plausible_db psql -U postgres -h localhost -d plausible_db -c "UPDATE users SET email_verified = true;"
Default: 8000
Configures the port to bind the listen socket for the HTTP web server.
Configures the port to bind the listen socket for the HTTPS web server.
Tip
If you set HTTP_PORT=80
and HTTPS_PORT=443
, Plausible will try to issue (and keep up to date) TLS certificates from Let's Encrypt.
Plausible uses PostgreSQL for storing user data and ClickHouse -- for analytics data.
Default: postgres://postgres:postgres@plausible_db:5432/plausible_db
Configures the URL for PostgreSQL database.
Default: http://plausible_events_db:8123/plausible_events_db
Configures the URL for ClickHouse database.
For step-by-step integration with Google see our wiki guide.
The Client ID from the Google API Console for your project.
GOOGLE_CLIENT_ID=140927866833-002gqg48rl4iku76lbkk0qhu0i0m7bia.apps.googleusercontent.com
The Client Secret from the Google API Console for your project.
GOOGLE_CLIENT_SECRET=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
Plausible CE uses the country database created by db-ip for enriching analytics data with visitor countries. The database is shipped within the container image and country data collection happens automatically.
Optionally, you can provide a different database. For example, you can use MaxMind services and enable city-level geolocation.
Default: /app/lib/plausible-0.0.1/priv/geodb/dbip-country.mmdb.gz
This database is used to lookup GeoName IDs for IP addresses. If not set, defaults to the file shipped within the container image.
Default: /app/lib/location-0.1.0/priv/geonames.lite.csv
This file is used to turn GeoName IDs into human readable strings for display on the dashboard. Defaults to the one shipped within the container image.
If set, this environment variable takes precedence over IP_GEOLOCATION_DB and makes Plausible download (and keep up to date) a free MaxMind GeoLite2 MMDB of the selected edition. See our wiki guide for integration instructions.
Default: GeoLite2-City
MaxMind database edition to use (only if MAXMIND_LICENSE_KEY is set).
Plausible CE sends transactional emails e.g. account activation, password reset. In addition, it sends non-transactional emails like weekly or monthly reports.
It uses SMTP with an optional relay by default. Alternatively, you can use other services such as Postmark, Mailgun, Mandrill or Send Grid to send emails.
Here's a short guide on using your Gmail account for email delivery.
Default: Bamboo.Mua
Instead of the default, you can replace this with Bamboo.PostmarkAdapter, Bamboo.MailgunAdapter, Bamboo.MandrillAdapter or Bamboo.SendGridAdapter and add the appropriate variables.
Default: hello@${hostname $BASE_URL}
The email id to use for as from address of all communications from Plausible.
The display name for the sender. If not set, the sender would show up as the email address set in MAILER_EMAIL.
The host address of your SMTP relay. If not set, the SMTP client tries to send the email directly. For that to work and for the email not to end up in spam, your machine needs to be allowed to make outgoing connections to port 25 and your sender domain from MAILER_EMAIL needs to have some DNS records like SPF or DKIM set.
Default: 587
The port of your SMTP relay.
The username/email in case SMTP auth is required on your SMTP relay.
The password in case SMTP auth is required on your SMTP relay.
Default: false
Configures whether SMTPS (SMTP over SSL) is enabled for SMTP connection, e.g. when you use port 465.
Enter your Postmark API key.
Note
You also have to set the MAILER_EMAIL variable which needs to be configured in PostmarkApps sender signatures.
Enter your Mailgun API key.
Enter your Mailgun domain.
Default: https://api.mailgun.net/v3
Mailgun makes a difference in the API base URL between sender domains from within the EU and outside. By default, the base URL is set to https://api.mailgun.net/v3. To override this you can pass https://api.eu.mailgun.net/v3 if you are using an EU domain.
Enter your Mandrill API key.
Enter your SendGrid API key.
Note
Plausible CE is funded by our cloud subscribers. So if you know someone who might find Plausible Cloud useful, please let them know about us!