AFFiNE
| Description / name | Input element |
|---|---|
| Container Registry | |
| Container Configuration Root Path | |
| User ID | |
| Group ID | |
| AFFiNE /config Path |
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/ |
Version Tags
| Tag | Description | Best For |
|---|---|---|
latest |
Upstream Binary. Built from official release. | Most users. Matches Linux Docker behavior. |
Prerequisites
Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions.
Deploy
1. Save as .env:
DB_DATA_LOCATION=/path/to/containers/affine/postgres
AFFINE_DATA_LOCATION=/path/to/containers/affine/data
DB_PASSWORD=changeme
AFFINE_SERVER_HOST=affine.example.com
AFFINE_SERVER_HTTPS=false
2. Save as compose.yaml:
name: affine
services:
affine:
image: ghcr.io/daemonless/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: ghcr.io/daemonless/redis:latest
container_name: affine_redis
network_mode: host
restart: unless-stopped
postgres:
image: ghcr.io/daemonless/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/data
3. Deploy:
mkdir -p /path/to/containers/affine/postgres /path/to/containers/affine/data
chown -R 1000:1000 /path/to/containers/affine
podman-compose up -d
Access AFFiNE at: http://your-host:3010
Environment Variables
| 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) |
FreeBSD Notes
PostgreSQL Shared Memory
PostgreSQL requires System V IPC. The compose file includes the required annotation:
Network Mode
The stack uses network_mode: host — all services communicate via localhost. Only port 3010 needs to be exposed externally.