AFFiNE is an open-source, privacy-first, local-first knowledge management and collaboration tool.
| Registry | ghcr.io/daemonless/affine |
| Source | https://github.com/toeverything/AFFiNE |
| Website | https://affine.pro/ |
| Tag | Description | Best For |
|---|---|---|
latest |
Upstream Binary. Built from official release. | Most users. Matches Linux Docker behavior. |
Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions.
1. Save as .env:
DB_DATA_LOCATION=@CONTAINER_CONFIG_ROOT@/@AFFINE_CONFIG_PATH@/postgres
AFFINE_DATA_LOCATION=@CONTAINER_CONFIG_ROOT@/@AFFINE_CONFIG_PATH@/data
DB_PASSWORD=changeme
AFFINE_SERVER_HOST=affine.example.com
AFFINE_SERVER_HTTPS=false2. Save as compose.yaml:
name: affine
services:
affine:
image: @REGISTRY@/affine:latest
container_name: affine
network_mode: host
restart: unless-stopped
environment:
DATABASE_URL: postgresql://affine:${DB_PASSWORD}@localhost:5432/affine
REDIS_SERVER_HOST: localhost
AFFINE_SERVER_EXTERNAL_URL: http${AFFINE_SERVER_HTTPS:+s}://${AFFINE_SERVER_HOST}
AFFINE_INDEXER_ENABLED: "false"
volumes:
- ${AFFINE_DATA_LOCATION}:/config
depends_on:
- redis
- postgres
redis:
image: @REGISTRY@/redis:latest
container_name: affine_redis
network_mode: host
restart: unless-stopped
postgres:
image: @REGISTRY@/postgres:latest
container_name: affine_postgres
network_mode: host
restart: unless-stopped
annotations:
org.freebsd.jail.allow.sysvipc: "true"
environment:
POSTGRES_USER: affine
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: affine
POSTGRES_EXTENSIONS: pgvector
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data3. Deploy:
mkdir -p @CONTAINER_CONFIG_ROOT@/@AFFINE_CONFIG_PATH@/postgres @CONTAINER_CONFIG_ROOT@/@AFFINE_CONFIG_PATH@/data
chown -R @PUID@:@PGID@ @CONTAINER_CONFIG_ROOT@/@AFFINE_CONFIG_PATH@
podman-compose up -dAccess AFFiNE at: http://your-host:3010
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
REDIS_SERVER_HOST |
Redis hostname (default: localhost) |
AFFINE_SERVER_EXTERNAL_URL |
Public URL for generated links |
AFFINE_INDEXER_ENABLED |
Enable document indexer (default: false) |
PostgreSQL requires System V IPC. The compose file includes the required annotation:
annotations:
org.freebsd.jail.allow.sysvipc: "true"The stack uses network_mode: host — all services communicate via localhost. Only port 3010 needs to be exposed externally.
# View logs
podman-compose logs -f
podman logs -f affine
# Restart
podman-compose restart
# Update
podman-compose pull && podman-compose up -d