Skip to main content

Choose Your Platform

AFFiNE is available across multiple platforms to fit your workflow. Choose the option that works best for you:

Web App

The fastest way to start using AFFiNE is through the web application. No installation required.
1

Access the Web App

Navigate to app.affine.pro in your browser
2

Sign Up or Continue

Create an account for cloud sync, or click Continue without account to use locally
3

Start Creating

Your workspace is ready! Start creating documents immediately
Browser Requirements: AFFiNE works best on modern browsers (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)

Web App Features

  • No installation — Start immediately in your browser
  • Auto-updates — Always running the latest version
  • Cross-device — Access from any device with a browser
  • Cloud sync — Automatic backup and sync (requires account)

Desktop Apps

For the best performance and offline capabilities, install the native desktop application.

Windows

1

Download the Installer

Visit affine.pro/download and download the Windows installer (.exe)
2

Run the Installer

Double-click the downloaded file and follow the installation wizard
3

Launch AFFiNE

Find AFFiNE in your Start Menu and launch the application
The Windows installer is compatible with Windows 10 (version 1809+) and Windows 11.System Requirements:
  • Windows 10 (build 1809+) or Windows 11
  • 4 GB RAM minimum (8 GB recommended)
  • 500 MB free disk space

macOS

1

Download the DMG

Visit affine.pro/download and download the macOS installer (.dmg)
2

Install the App

Open the .dmg file and drag AFFiNE to your Applications folder
3

Launch AFFiNE

Open AFFiNE from Applications or Spotlight
Apple Silicon & Intel: AFFiNE provides universal binaries that work on both Apple Silicon (M1/M2/M3) and Intel Macs.
AFFiNE supports macOS 11 (Big Sur) and later versions.System Requirements:
  • macOS 11 or later
  • 4 GB RAM minimum (8 GB recommended)
  • 500 MB free disk space

Linux

1

Download AppImage

wget https://github.com/toeverything/AFFiNE/releases/latest/download/affine-stable-linux-x64.AppImage
2

Make Executable

chmod +x affine-stable-linux-x64.AppImage
3

Run AFFiNE

./affine-stable-linux-x64.AppImage
Linux System Requirements: Ubuntu 18.04+, Debian 10+, Fedora 32+, or equivalent. X11 or Wayland display server.

Desktop Features

  • Offline-first — Full functionality without internet
  • Better performance — Native app optimization
  • System integration — File associations and system tray
  • Local storage — Your data stays on your machine by default
  • Auto-updates — Automatic updates to the latest version

Self-Hosted Docker

Deploy your own AFFiNE instance with full control over your data and infrastructure.

Quick Start with Docker Compose

1

Install Prerequisites

Ensure Docker and Docker Compose are installed:
docker --version
docker-compose --version
Minimum versions: Docker 20.10+ and Docker Compose 2.0+
2

Download Configuration Files

Create a directory for AFFiNE and download the compose file:
mkdir affine-selfhost && cd affine-selfhost
wget https://raw.githubusercontent.com/toeverything/AFFiNE/canary/.docker/selfhost/compose.yml
wget https://raw.githubusercontent.com/toeverything/AFFiNE/canary/.docker/selfhost/.env.example -O .env
3

Configure Environment Variables

Edit the .env file with your preferred settings:
nano .env
Key variables to configure:
# Select version: stable, beta, or canary
AFFINE_REVISION=stable

# Port to expose (default: 3010)
PORT=3010

# Database credentials
DB_USERNAME=affine
DB_PASSWORD=your-secure-password-here
DB_DATABASE=affine

# Data persistence locations
DB_DATA_LOCATION=~/.affine/self-host/postgres/pgdata
UPLOAD_LOCATION=~/.affine/self-host/storage
CONFIG_LOCATION=~/.affine/self-host/config
Important: Set a strong password for DB_PASSWORD in production!
4

Start AFFiNE

Launch all services with Docker Compose:
docker-compose up -d
This will start:
  • AFFiNE server
  • PostgreSQL database (with pgvector)
  • Redis for caching
  • Migration job
5

Access Your Instance

Open your browser and navigate to:
http://localhost:3010
Or use your server’s IP address if deploying remotely.

Docker Compose Configuration

The complete compose.yml configuration from the AFFiNE repository:
name: affine
services:
  affine:
    image: ghcr.io/toeverything/affine:${AFFINE_REVISION:-stable}
    container_name: affine_server
    ports:
      - '${PORT:-3010}:3010'
    depends_on:
      redis:
        condition: service_healthy
      postgres:
        condition: service_healthy
      affine_migration:
        condition: service_completed_successfully
    volumes:
      - ${UPLOAD_LOCATION}:/root/.affine/storage
      - ${CONFIG_LOCATION}:/root/.affine/config
    env_file:
      - .env
    environment:
      - REDIS_SERVER_HOST=redis
      - DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
    restart: unless-stopped

  postgres:
    image: pgvector/pgvector:pg16
    container_name: affine_postgres
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_DATABASE:-affine}
    restart: unless-stopped

  redis:
    image: redis
    container_name: affine_redis
    restart: unless-stopped

Environment Variables Reference

VariableDescriptionDefault
AFFINE_REVISIONVersion to deploy (stable, beta, canary)stable
PORTPort to expose the server3010

System Requirements

Minimum (< 10 users):
  • 2 CPU cores
  • 4 GB RAM
  • 20 GB disk space
  • Docker 20.10+
Recommended (10-50 users):
  • 4 CPU cores
  • 8 GB RAM
  • 100 GB disk space
  • Docker 20.10+
Production (50+ users):
  • 8+ CPU cores
  • 16+ GB RAM
  • 500+ GB disk space (SSD recommended)
  • Docker 20.10+
  • Reverse proxy (nginx/Caddy) for SSL

Advanced Deployment

To expose AFFiNE on a custom domain with HTTPS:
  1. Update .env file:
    AFFINE_SERVER_HTTPS=true
    AFFINE_SERVER_HOST=affine.yourdomain.com
    
  2. Set up reverse proxy (nginx example):
    server {
        listen 443 ssl http2;
        server_name affine.yourdomain.com;
        
        ssl_certificate /path/to/cert.pem;
        ssl_certificate_key /path/to/key.pem;
        
        location / {
            proxy_pass http://localhost:3010;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }
    
  3. Restart AFFiNE:
    docker-compose restart
    
To update to the latest version:
# Pull the latest images
docker-compose pull

# Restart services
docker-compose up -d

# Clean up old images (optional)
docker image prune -f
Your data persists in the volumes defined in .env, so updates are safe.
Backup:
# Stop the services
docker-compose stop

# Backup data directories
tar -czf affine-backup-$(date +%Y%m%d).tar.gz \
  ~/.affine/self-host/postgres \
  ~/.affine/self-host/storage \
  ~/.affine/self-host/config

# Restart services
docker-compose start
Restore:
# Stop services
docker-compose down

# Restore from backup
tar -xzf affine-backup-YYYYMMDD.tar.gz -C ~/

# Start services
docker-compose up -d

Deploy to Cloud Platforms


Troubleshooting

Windows:
  • Run as administrator
  • Check Windows Defender/antivirus isn’t blocking it
  • Ensure .NET Framework 4.7.2+ is installed
macOS:
  • Check Security & Privacy settings
  • Try removing quarantine attribute: xattr -cr /Applications/AFFiNE.app
Linux:
  • Check file permissions: chmod +x AFFiNE.AppImage
  • Install FUSE for AppImage: sudo apt install libfuse2
  1. Check Docker is running: docker ps
  2. View logs: docker-compose logs affine
  3. Ensure ports are available: sudo netstat -tlnp | grep 3010
  4. Verify environment variables in .env
  5. Check disk space: df -h
  1. Verify services are running: docker-compose ps
  2. Check firewall rules allow port 3010
  3. Test locally: curl http://localhost:3010
  4. Verify AFFINE_SERVER_HOST matches your domain
  5. Check reverse proxy configuration if using one
  1. Ensure you’re signed in with the same account on all devices
  2. Check internet connection
  3. Verify sync is enabled in Settings > Sync
  4. For self-hosted: ensure AFFINE_SERVER_EXTERNAL_URL is accessible from all devices

Next Steps

Need more help? Check out the GitHub Issues or join our Discord community for support.