selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Affine logo

Self-host Affine

v0.27.4
ReleaseOpen SourceMIT
Updated2 months ago
LanguageTypescript
Setup difficultyModerate
MobilePWA
ThemeDark mode
Stars
74 571
CPU
4 cores
RAM
2 GB
Storage
10 GB
Port
3010
Requires
postgres, Redis
Docker
ghcr.io/toeverything/cloud-self-hosted:nightly-latest
Install with Docker Compose
Affine screenshot 1Affine screenshot 2Affine screenshot 3

What is Affine?

Affine is an open-source knowledge base software designed to bring planning, sorting, and creating together in a unified workspace. It is privacy-first, open-source, customizable, and ready to use. Affine combines the functionality of docs, whiteboards, databases, and AI to provide a comprehensive solution for knowledge management and collaboration. It is an alternative to Notion and Miro, offering a local-first approach to data control and management.

Affine alternatives

All self-hosted alternatives to Miro → All self-hosted alternatives to Notion →

Should you self-host Affine?

Affine scores 81/100 on selfhost.directory (how scoring works) and ranks #4 of 42 in Knowledge Management. It has 74 571 GitHub stars, +1 138 in the last 30 days.

It shipped 4 stable releases in the past year. The latest, v0.27.4, came out on 17 August 2026. New versions land roughly every 5 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Memos (85/100, 64 500 stars). It scores higher overall, so compare the two before you pick. See Affine vs Memos side by side.

Features

  • AI Integration
  • Collaboration
  • Databases
  • Docs
  • Local-first
  • Privacy-focused
  • Templates
  • Whiteboards

Affine README

AFFiNE.Pro
Write, Draw and Plan All at Once

affine logo

A privacy-focused, local-first, open-source, and ready-to-use alternative for Notion & Miro.
One hyper-fused platform for wildly creative minds.



AFFiNE - One app for all - Where Notion meets Miro | Product Hunt


Releases All Contributors TypeScript-version-icon


Docs, canvas and tables are hyper-merged with AFFiNE - just like the word affine (əˈfʌɪn | a-fine).

How to install Affine

Install Affine with Docker Compose

version: '3.9'
services:
  db:
    image: ghcr.io/toeverything/cloud-self-hosted:nightly-latest
    environment:
      - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
      - JWST_DEV=1
      - RUST_LOG=debug
      - SIGN_KEY=test123
      - RUST_BACKTRACE=full
    networks:
      - default
  web:
    image: paulknulst/affine
    depends_on:
      - db
    ports:
      - "8080:3000"
    networks:
      - default
    environment:
      - NEXT_PUBLIC_FIREBASE_API_KEY=
      - NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
      - NEXT_PUBLIC_FIREBASE_PROJECT_ID=
      - NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
      - NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
      - NEXT_PUBLIC_FIREBASE_APP_ID=
      - NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=
      - LOCAL_BLOCK_SUITE=
      - API_SERVER_PROFILE=local
      - ENABLE_IDB_PROVIDER=1
      - PREFETCH_WORKSPACE=1
      - ENABLE_BC_PROVIDER=1
      - EXPOSE_INTERNAL=1
      - ENABLE_DEBUG_PAGE=0
      - ENABLE_SUBPAGE=1
      - ENABLE_CHANGELOG=1
volumes:
  data:
networks:
  default:
    external: false

How to configure Affine

  • AFFINE_REVISIONstableThe AFFiNE revision to deploy. Available values are `stable`, `beta`, and `canary`.

    values: stable, beta, canary

  • DB_DATA_LOCATIONLocation of the Postgres data directory to persist.
  • UPLOAD_LOCATIONLocation of uploaded blobs, such as images and files, to persist.
  • CONFIG_LOCATIONLocation of user custom configuration files to persist.
  • AFFINE_PRIVATE_KEYPrivate key used by the crypto module to create signed tokens or encrypt data. If not provided, AFFiNE auto-generates one under `CONFIG_LOCATION` on first start.

Affine releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Does Affine support local-first knowledge management?

Yes, Affine is designed around local-first and privacy-focused workflows, giving individuals and teams more control over how their documents, plans, and knowledge base data are managed.

How is Affine different from single-purpose wiki or whiteboard tools?

Affine brings structured docs, visual whiteboards, databases, templates, and AI workflows together, so teams can write, draw, plan, and organize knowledge without switching tools.

Can Affine be used as a team knowledge base?

Yes, teams can use Affine to build internal knowledge bases, organize project plans, document decisions, map ideas visually, and keep related knowledge connected in one workspace.

What is Affine?

Affine is an open-source knowledge base software that combines docs, whiteboards, databases, and AI in a privacy-focused workspace for teams and creators.

More in Knowledge Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…