AFFiNE
Use these steps to download the official AFFiNE Docker Compose files and start the service.
Create the AFFiNE Directory
Create a dedicated folder for AFFiNE and move into it:
mkdir affine
cd affine
Download the Compose File
Download the latest official docker-compose.yml file from AFFiNE:
wget -O docker-compose.yml https://github.com/toeverything/affine/releases/latest/download/docker-compose.yml
Download the Environment File
Download the default environment example as .env:
wget -O .env https://github.com/toeverything/affine/releases/latest/download/default.env.example
Configure the Environment File
Open .env and review these values before starting AFFiNE:
# The folder for Postgres data, usually the AFFiNE folder with a /postgres suffix.
DB_DATA_LOCATION=./postgres
# The folder for uploaded blobs, usually the AFFiNE folder with a /storage suffix.
UPLOAD_LOCATION=./storage
# The folder for custom configurations, usually the AFFiNE folder with a /config suffix.
CONFIG_LOCATION=./config
# Database credentials and name used to initialize Postgres.
DB_USERNAME=affine
DB_PASSWORD=change-this-password
DB_DATABASE=affine
Start AFFiNE
Run Docker Compose from the affine directory:
docker compose up -d
Reverse Proxy / HTTPS
If you need public HTTPS access, put AFFiNE behind a reverse proxy like Nginx Proxy Manager.