authentik/website/docs/installation/docker-compose.md

47 lines
1.8 KiB
Markdown
Raw Normal View History

---
title: docker-compose installation
---
This installation method is for test-setups and small-scale productive setups.
## Prerequisites
- docker
- docker-compose
## Install
2020-12-05 21:08:42 +00:00
Download the latest `docker-compose.yml` from [here](https://raw.githubusercontent.com/BeryJu/authentik/master/docker-compose.yml). Place it in a directory of your choice.
2020-12-05 21:08:42 +00:00
To optionally enable error-reporting, run `echo AUTHENTIK_ERROR_REPORTING__ENABLED=true >> .env`
2020-12-31 10:58:43 +00:00
To optionally deploy a different version run `echo AUTHENTIK_TAG=0.14.2-stable >> .env`
2020-12-05 21:08:42 +00:00
If this is a fresh authentik install run the following commands to generate a password:
```
sudo apt-get install -y pwgen
echo "PG_PASS=$(pwgen 40 1)" >> .env
2020-12-05 21:08:42 +00:00
echo "AUTHENTIK_SECRET_KEY=$(pwgen 50 1)" >> .env
```
Afterwards, run these commands to finish
```
docker-compose pull
docker-compose up -d
docker-compose run --rm server migrate
```
2020-06-08 21:11:01 +01:00
The compose file statically references the latest version available at the time of downloading, which can be overridden with the `SERVER_TAG` environment variable.
If you plan to use this setup for production, it is also advised to change the PostgreSQL password by setting `PG_PASS` to a password of your choice.
2020-12-05 21:08:42 +00:00
Now you can pull the Docker images needed by running `docker-compose pull`. After this has finished, run `docker-compose up -d` to start authentik.
2020-12-05 21:08:42 +00:00
authentik will then be reachable via HTTP on port 80, and HTTPS on port 443. You can optionally configure the packaged traefik to use Let's Encrypt certificates for TLS Encryption.
2020-12-05 21:08:42 +00:00
If you plan to access authentik via a reverse proxy which does SSL Termination, make sure you use the HTTPS port, so authentik is aware of the SSL connection.
2020-12-05 21:08:42 +00:00
The initial setup process also creates a default admin user, the username and password for which is `akadmin`. It is highly recommended to change this password as soon as you log in.