diff --git a/authentik/core/migrations/0002_auto_20200523_1133_squashed_0011_provider_name_temp.py b/authentik/core/migrations/0002_auto_20200523_1133_squashed_0011_provider_name_temp.py index 103202072..c65edfa7c 100644 --- a/authentik/core/migrations/0002_auto_20200523_1133_squashed_0011_provider_name_temp.py +++ b/authentik/core/migrations/0002_auto_20200523_1133_squashed_0011_provider_name_temp.py @@ -18,13 +18,13 @@ def create_default_user(apps: Apps, schema_editor: BaseDatabaseSchemaEditor): db_alias = schema_editor.connection.alias akadmin, _ = User.objects.using(db_alias).get_or_create( - username="akadmin", email="root@localhost", name="authentik Default Admin" + username="akadmin", + email=environ.get("AUTHENTIK_BOOTSTRAP_EMAIL", "root@localhost"), + name="authentik Default Admin", ) password = None if "TF_BUILD" in environ or settings.TEST: password = "akadmin" # noqa # nosec - if "AK_ADMIN_PASS" in environ: - password = environ["AK_ADMIN_PASS"] if "AUTHENTIK_BOOTSTRAP_PASSWORD" in environ: password = environ["AUTHENTIK_BOOTSTRAP_PASSWORD"] if password: diff --git a/authentik/core/migrations/0018_auto_20210330_1345_squashed_0028_alter_token_intent.py b/authentik/core/migrations/0018_auto_20210330_1345_squashed_0028_alter_token_intent.py index dac724a80..9276628ec 100644 --- a/authentik/core/migrations/0018_auto_20210330_1345_squashed_0028_alter_token_intent.py +++ b/authentik/core/migrations/0018_auto_20210330_1345_squashed_0028_alter_token_intent.py @@ -46,13 +46,9 @@ def create_default_user_token(apps: Apps, schema_editor: BaseDatabaseSchemaEdito akadmin = User.objects.using(db_alias).filter(username="akadmin") if not akadmin.exists(): return - key = None - if "AK_ADMIN_TOKEN" in environ: - key = environ["AK_ADMIN_TOKEN"] - if "AUTHENTIK_BOOTSTRAP_TOKEN" in environ: - key = environ["AUTHENTIK_BOOTSTRAP_TOKEN"] - if not key: + if "AUTHENTIK_BOOTSTRAP_TOKEN" not in environ: return + key = environ["AUTHENTIK_BOOTSTRAP_TOKEN"] Token.objects.using(db_alias).create( identifier="authentik-bootstrap-token", user=akadmin.first(), diff --git a/website/docs/installation/automated-install.md b/website/docs/installation/automated-install.md index 834c46fd7..b46604a61 100644 --- a/website/docs/installation/automated-install.md +++ b/website/docs/installation/automated-install.md @@ -4,22 +4,22 @@ title: Automated install To install authentik automatically (skipping the Out-of-box experience), you can use the following environment variables: -### `AUTHENTIK_BOOTSTRAP_PASSWORD` or `AK_ADMIN_PASS` +### `AUTHENTIK_BOOTSTRAP_PASSWORD` Configure the default password for the `akadmin` user. Only read on the first startup. Can be used for any flow executor. -:::info -For versions before 2022.6, this variable was called `AK_ADMIN_PASS`. This will be removed in 2022.7 -::: - -### `AUTHENTIK_BOOTSTRAP_TOKEN` or `AK_ADMIN_TOKEN` +### `AUTHENTIK_BOOTSTRAP_TOKEN` :::note -This option has been added in 2021.8 +Requires authentik 2021.8 ::: 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. -:::info -For versions before 2022.6, this variable was called `AK_ADMIN_TOKEN`. This will be removed in 2022.7 +### `AUTHENTIK_BOOTSTRAP_EMAIL` + +:::note +Requires authentik 2023.3 ::: + +Set the email address for the default `akadmin` user.