How it helps your business

Best for:Product & Design TeamsAcademic & Research GroupsModern Software Engineering TeamsStrategic Consultants & PlannersIndividual Power Users
AFFiNE is the leading open-source alternative to proprietary "everything workspaces" like Notion and Miro. It solves the fragmentation of digital tools by providing a single workspace where you can seamlessly transition between document drafting, whiteboard brainstorming, and structured database management. Every page in AFFiNE is a living canvas that can be viewed as a traditional text document, an infinite whiteboard, or a powerful database.
The platform is built on an offline-first architecture, ensuring that your work is never interrupted by a slow network connection. By using CRDTs (Conflict-free Replicated Data Types), AFFiNE delivers real-time collaboration that is both fast and resilient. Because it is fully open-source, organizations can self-host the entire stack, ensuring that their intellectual property remains entirely under their own control and sovereign.
Self-hosting AFFiNE provides teams with a world-class, multi-modal workspace that combines the best of document editing and visual collaboration while maintaining absolute data privacy.

Key Benefits

  • Multi-Modal Design: One page, three views (Paper, Whiteboard, Database).
  • Privacy First: You own the database, the server, and every byte of data.
  • Offline First: Work at lightning speed locally, sync whenever you're ready.
  • Collaboration Power: Real-time editing for teams without proprietary lock-in.
  • Extreme Portability: Export your work as standard Markdown or JSON at any time.

Production Architecture Overview

A production-grade AFFiNE self-hosted setup involves:
  • AFFiNE Server: The Node.js application backend.
  • PostgreSQL: The primary database for metadata and workspace organization.
  • Redis: Used for real-time synchronization and session management.
  • S3 / MinIO: Used for persistent storage of user-uploaded files and attachments.
  • NGINX / Caddy: A reverse proxy for SSL/TLS and load balancing.

How we deploy this for you

Security Hardened

Firewalls, SSL, and hardened kernels out of the box.

Performance Tuned

Optimized for speed with cache and DB fine-tuning.

Automated Backups

Daily off-site backups so you never lose your data.

Private Cloud

You own the server and the data. No middleman.

Implementation Blueprint

Prerequisites

sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose -y
sudo systemctl enable docker
sudo systemctl start docker
shell

Docker Compose Production Setup

This configuration runs the core AFFiNE services with PostgreSQL and Redis.
version: '3'

services:
  affine:
    image: ghcr.io/toeverything/affine-graphql:latest
    ports:
      - "8080:8080"
    environment:
      - AFFINE_CONFIG_PATH=/root/.affine/config
      - DATABASE_URL=postgres://affine:password@db:5432/affine
      - REDIS_URL=redis://redis:6379
    depends_on:
      - db
      - redis
    volumes:
      - affine_data:/root/.affine
    restart: always

  db:
    image: postgres:15-alpine
    environment:
      - POSTGRES_USER=affine
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=affine
    volumes:
      - pg_data:/var/lib/postgresql/data
    restart: always

  redis:
    image: redis:7-alpine
    restart: always

volumes:
  affine_data:
  pg_data:

Kubernetes Production Deployment (Recommended)

AFFiNE is designed for horizontal scalability and fits perfectly into Kubernetes.
# Deploy using a standard Deployment and Service
kubectl create deployment affine --image=ghcr.io/toeverything/affine-graphql:latest
kubectl expose deployment affine --port=8080
Benefits:
  • Elastic Scalability: Scale your application pods as your team grows and your document count increases.
  • Reliable Persistence: Use Kubernetes PersistentVolumeClaims for your workspace data and S3 for attachments.
  • Zero-Downtime Updates: Deploy the latest AFFiNE features without interrupting your team's workflow.

Scaling Strategy

  • Object Storage: Always use a dedicated S3-compatible provider for file attachments in production environments.
  • Database Tuning: Regularly optimize your PostgreSQL instance for high-frequency metadata queries.
  • Caching: Leverage Redis for high-performance real-time synchronization states.
  • CDN Strategy: Serve AFFiNE's static frontend assets via a global CDN to improve loading times.

Backup & Safety

  • Database Dumps: Automate daily PostgreSQL backups and store them offsite securely.
  • Volume Snapshots: Regularly snapshot the persistent volumes containing your workspace data.
  • HTTPS Enforcement: Always run AFFiNE behind a secure reverse proxy to encrypt team collaboration.
  • Private Network: Keep your AFFiNE instance accessible only via your corporate VPN or a zero-trust network.

Best place to host AFFiNE

We recommend Hostinger for its reliability and low cost. It's the perfect home for your new apps, featuring easy setup and 24/7 support.

Get Started on Hostinger

Compare Similar Tools

Kubernetes

Kubernetes

Kubernetes is a production-grade, open-source platform for automating deployment, scaling, and operations of application containers.

Supabase

Supabase

Supabase is the leading open-source alternative to Firebase. It provides a full backend-as-a-service (BaaS) powered by PostgreSQL, including authentication, real-time subscriptions, and storage.

Godot

Godot

Godot is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface.

Professional Setup
$99one-time
Get Started
Free Setup Consultation

Need Help with Your Setup?

If you're not sure how to get started or want our team to handle the technical setup for you, we're here to help. We build custom business tools and automate your daily tasks so you can focus on growing your business.

Trusted by business owners at

Professional Setup

We install and secure any app on your private server for a one-time fee.

Custom Business Tools

We build bespoke dashboards and tools tailored to your specific needs.

Automate Your Work

Connect your apps and automate repetitive tasks to save time and money.

Included in every $99 setup

Security
Performance
SSL Setup
Private Cloud
Faster ImplementationQuick Turnaround
100% Free ConsultationFree Project Review