Skip to main content

Automated install

To install authentik automatically (skipping the Out-of-box experience), you can use the following environment variables on the worker container:

info

These can't be defined using the file-based syntax (file://), so you can't pass them in as secrets in a Docker Compose installation.

AUTHENTIK_WEB__BASE_URL​

Configure the base URL under which authentik is reachable, for example https://authentik.company. This option is required for an automated install. Without it, the automated install fails. For details, see AUTHENTIK_WEB__BASE_URL.

AUTHENTIK_BOOTSTRAP_PASSWORD_HASH​

Configure the default password for the akadmin user using a pre-hashed Django password value. Only read on the first startup.

Use the complete output from the target authentik version's hash_password command. authentik validates the value against the password hash import settings. If validation fails, authentik stops initial setup with a configuration error. Bootstrap imports do not support an override.

Escaping $ in Docker Compose

Password hashes contain $ characters which Docker Compose interprets as variable references.

In .env files, use single quotes to prevent interpolation:

AUTHENTIK_BOOTSTRAP_PASSWORD_HASH='pbkdf2_sha256$<iterations>$<salt>$<hash>'

In compose.yml (inline environment), escape each $ with $$:

services:
worker:
environment:
AUTHENTIK_BOOTSTRAP_PASSWORD_HASH: "pbkdf2_sha256$$<iterations>$$<salt>$$<hash>"

See the Docker Compose documentation on .env file interpolation and Compose file interpolation for details.

AUTHENTIK_BOOTSTRAP_PASSWORD​

warning

This option stores plaintext passwords in environment variables. Use AUTHENTIK_BOOTSTRAP_PASSWORD_HASH instead.

Configure the default password for the akadmin user. Only read on the first startup.

Setting both AUTHENTIK_BOOTSTRAP_PASSWORD and AUTHENTIK_BOOTSTRAP_PASSWORD_HASH will result in an error.

AUTHENTIK_BOOTSTRAP_TOKEN​

Create a token for the default akadmin user. Only read on the first startup. The string you specify for this variable is the token key you can use to authenticate yourself to the API.

AUTHENTIK_BOOTSTRAP_EMAIL​

Set the email address for the default akadmin user.

Kubernetes​

In the Helm values, set the base URL and the akadmin user password hash and token:

authentik:
web:
base_url: "https://authentik.company"
bootstrap_password_hash: "<complete_hash_password_output>"
bootstrap_token: "your-token-here"
bootstrap_email: "admin@authentik.company"
Helm escaping

When using password hashes in quoted YAML strings as shown above, no escaping of $ characters is required. The $ character only needs escaping when:

  • Using Helm templating syntax (e.g., {{ .Values.something }}) where $ has special meaning
  • Referencing values from environment variable substitution in your values file

Or store the password hash in a secret and reference it via envFrom:

global:
envFrom:
- secretRef:
name: _some-secret_

where some-secret contains the environment variables as documented above.