Anchor provides a single Docker image that includes everything you need to run your self-hosted instance. The image uses embedded PostgreSQL by default, making setup as simple as running a single container.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ZhFahim/anchor/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
The fastest way to get started is using the pre-built Docker image:Create docker-compose.yml
Create a
docker-compose.yml file with the minimal configuration:docker-compose.yml
This configuration uses embedded PostgreSQL with auto-generated credentials. Data is persisted in the
anchor_data volume.Start the container
Launch Anchor with Docker Compose:The container will:
- Initialize embedded PostgreSQL in
/data/postgres - Auto-generate a JWT secret (persisted in
/data/.jwt_secret) - Run database migrations
- Start the API server (port 3001 internally)
- Start the web frontend (port 3000 exposed)
Deployment Options
Option 1: Pre-built Image (Recommended)
Use the official image from GitHub Container Registry:docker-compose.yml
Option 2: Build from Source
If you want to build from source or customize the image:Architecture
The Anchor Docker image uses a unique single-container architecture:- Base Image: PostgreSQL 18 Alpine with Node.js runtime
- Process Management: Supervisord manages multiple services
- Services:
- Embedded PostgreSQL (optional, port 5432)
- NestJS API server (internal port 3001)
- Next.js web frontend (exposed port 3000)
Volume Management
Data Directory Structure
The/data volume contains all persistent data:
Named Volume (Recommended)
Bind Mount
For easier backups, use a bind mount:Reverse Proxy Setup
Nginx
Traefik
docker-compose.yml
Caddy
Caddyfile
Remember to set
APP_URL to your public URL when using a reverse proxy, especially for OIDC authentication.Health Checks
The Docker image includes a built-in health check:Common Issues
Container won’t start
Check logs for errors:Permission issues with volumes
Ensure the data directory is writable:Port conflicts
If port 3000 is already in use, change the mapping:Next Steps
Configuration
Configure environment variables and settings
Database Options
Use external PostgreSQL for production
Updating
Keep your instance up to date