AFFiNE

Docs, whiteboards and databases in one local-first workspace

  • ghcr.io/hsinghhira/affine:latest
  • port 6102
  • Productivity
AFFiNE screenshot 1: WhiteboardAFFiNE screenshot 2: Brainstorm with AIAFFiNE screenshot 3: DocumentsAFFiNE screenshot 4: Admin panel

Web App

/
http://localhost:6102/

Admin Panel

/admin
http://localhost:6102/admin

AFFiNE is an open-source workspace that puts documents, an endless whiteboard and databases in one editor, like Notion and Miro together. This is AFFiNE in a single container, with one port and one data folder. Database passwords and the server key are made for you on first start.

Features

  • Rich documents for notes, wikis and knowledge bases
  • An endless canvas for whiteboards, brainstorming and planning
  • Databases with table and kanban views
  • Real-time collaboration and sharing
  • Built-in search across all your workspaces
  • Sign in with Google, GitHub or your own OIDC service (Authentik, Keycloak...)
  • Change sign-up rules, email and more by adding a setting in the app settings
  • Admin panel for users, settings, email and AI (bring your own key)
  • PostgreSQL with pgvector and Redis inside, nothing else to install

How to use

  1. Open AFFiNE from your dashboard.
  2. The first time, AFFiNE asks you to create the admin account. Fill in your name, email and a password.
  3. Sign in and create your first workspace.
  4. Change server settings, email and AI any time in the admin panel at http://your-server-ip:6102/admin.

The settings in the first table are already in the app settings. To use any other one, open the app settings, add the variable with your value, save, and the app restarts with it. A setting you leave out uses its default.

In the app settings

VariableDefault valueDescription
TZ$TZYour time zone. It is filled in from your ZimaOS time zone. Leave it unless you need another.
PUBLIC_URLhttp://localhost:6102The address you type in your browser. It starts as localhost, which only works on this device. For other devices, change localhost to your ZimaOS IP. Keep the port at 6102. Links in emails and shared pages use this address.

Server

VariableDefault valueDescription
AFFINE_SERVER_NAMEAFFiNE Self Hosted ServerThe name shown when you connect from the AFFiNE desktop or mobile app.

Sign-up and accounts

VariableDefault valueDescription
AFFINE_ALLOW_SIGNUPtrueSet to false so only people you invite can join. Default: anyone who can open the page can sign up.
AFFINE_ALLOW_SIGNUP_FOR_OAUTHtrueSet to false to stop new accounts made with Google, GitHub or OIDC sign-in.
AFFINE_PASSWORD_MIN_LENGTH8The shortest password people may choose.
AFFINE_PASSWORD_MAX_LENGTH32The longest password people may choose.
AFFINE_ALLOW_GUEST_DEMO_WORKSPACEtrueSet to false so visitors who are not signed in can't make a demo workspace.

Email (SMTP)

VariableDefault valueDescription
MAILER_HOST—Your email server, like smtp.gmail.com. AFFiNE uses email for invites, sign-in links and password resets. Leave it out and AFFiNE sends no emails.
MAILER_PORT465Your email server port, usually 465 or 587.
MAILER_USER—The username for your email server.
MAILER_PASSWORD—The password for your email server. For Gmail, use an app password.
MAILER_SENDERAFFiNE Self Hosted <[email protected]>The "from" address on emails, like AFFiNE <[email protected]>.
MAILER_IGNORE_TLSfalseSet to true if your email server uses a self-signed certificate.
MAILER_SERVERNAME—The name AFFiNE gives itself when it talks to the email server (HELO), like mail.example.com. Leave it out to use the container hostname.

Sign in with Google, GitHub or OIDC

VariableDefault valueDescription
AFFINE_OAUTH_GOOGLE_CLIENT_ID—Client ID for "Sign in with Google". In Google Cloud, set the redirect URL to your PUBLIC_URL followed by /oauth/callback. Leave it out to keep Google sign-in off.
AFFINE_OAUTH_GOOGLE_CLIENT_SECRET—Client secret for "Sign in with Google".
AFFINE_OAUTH_GITHUB_CLIENT_ID—Client ID for "Sign in with GitHub". In GitHub, set the callback URL to your PUBLIC_URL followed by /oauth/callback. Leave it out to keep GitHub sign-in off.
AFFINE_OAUTH_GITHUB_CLIENT_SECRET—Client secret for "Sign in with GitHub".
AFFINE_OAUTH_OIDC_ISSUER—The issuer URL of your own sign-in service (Authentik, Keycloak, Pocket ID...), like https://auth.example.com/application/o/affine/. Leave it out to keep OIDC sign-in off.
AFFINE_OAUTH_OIDC_CLIENT_ID—Client ID from your OIDC sign-in service. Set its redirect URL to your PUBLIC_URL followed by /oauth/callback.
AFFINE_OAUTH_OIDC_CLIENT_SECRET—Client secret from your OIDC sign-in service.

AI and search

VariableDefault valueDescription
AFFINE_COPILOT_ENABLEDfalseSet to true to turn on AI features. Each workspace owner then adds their own AI provider key in Workspace Settings, Integrations, AI BYOK.
AFFINE_COPILOT_ALLOW_CUSTOM_ENDPOINTfalseSet to true to let workspace owners use a custom AI endpoint (like a local Ollama or an OpenAI-compatible server).
AFFINE_INDEXER_ENABLEDtrueSet to false to turn off full-text search across documents.
docker-compose.yml
name: affine

services:
  affine:
    image: ghcr.io/hsinghhira/affine:latest
    container_name: affine
    restart: unless-stopped
    stop_grace_period: 90s
    privileged: true
    environment:
      - TZ=$TZ
      - PUBLIC_URL=http://localhost:6102
    ports:
      - target: 8080
        published: "6102"
        protocol: tcp
    volumes:
      - type: bind
        source: /DATA/AppData/$AppID/data
        target: /data
        bind:
          create_host_path: true
    healthcheck:
      test: ["CMD", "curl", "-fsS", "-o", "/dev/null", "http://127.0.0.1:8080/info"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 300s
    deploy:
      resources:
        limits:
          cpus: "2.00"
          memory: 3072M
        reservations:
          cpus: "0.00"
          memory: 512M
    labels:
      icon: https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/icon.png
    x-casaos:
      id: com.icestore.affine
      envs:
        - container: TZ
          description:
            en_US: >-
              Your time zone. It is filled in from your ZimaOS time zone.
              Leave it unless you need another.
        - container: PUBLIC_URL
          description:
            en_US: >-
              The address you type in your browser. It starts as localhost,
              which only works on this device. For other devices, change
              `localhost` to your ZimaOS IP. Keep the port at 6102. Links in
              emails and shared pages use this address.
      ports:
        - container: "8080"
          description:
            en_US: AFFiNE web app, admin panel (/admin) and API, published on host as 6102
      volumes:
        - container: /data
          description:
            en_US: >-
              Everything AFFiNE keeps: the database, uploaded files,
              config.json, the server key and the database passwords.

x-casaos:
  id: com.icestore.affine
  architectures:
    - amd64
    - arm64
  main: affine
  author: HSinghHira
  category: Productivity
  developer: Toeverything
  icon: https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/icon.png
  screenshot_link:
    - https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/screenshot-1.png
    - https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/screenshot-2.png
    - https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/screenshot-3.png
    - https://cdn.jsdelivr.net/gh/HSinghHira/IceStore@main/Apps/affine/screenshot-4.png
  title:
    en_US: AFFiNE
  tagline:
    en_US: Docs, whiteboards and databases in one local-first workspace
  description:
    en_US: >-
      Visit: [https://icestore.hsinghhira.me/app/affine/](https://icestore.hsinghhira.me/app/affine/) for full details


      AFFiNE is an open-source workspace that puts documents, an endless
      whiteboard and databases in one editor, like Notion and Miro together.
      This is AFFiNE in a single container, with one port and one data folder.
      Database passwords and the server key are made for you on first start.


      **Features**


      - Rich documents for notes, wikis and knowledge bases

      - An endless canvas for whiteboards, brainstorming and planning

      - Databases with table and kanban views

      - Real-time collaboration and sharing

      - Built-in search across all your workspaces

      - Sign in with Google, GitHub or your own OIDC service (Authentik, Keycloak...)

      - Change sign-up rules, email and more by adding a setting in the app
        settings

      - Admin panel for users, settings, email and AI (bring your own key)

      - PostgreSQL with pgvector and Redis inside, nothing else to install


      **How to use?**


      1. Open AFFiNE from the Zima OS dashboard.


      2. The first time, AFFiNE asks you to create the admin account. Fill in
         your name, email and a password.


      3. Sign in and create your first workspace.


      4. Change server settings, email and AI any time in the admin panel at
         http://your-zimaos-ip:6102/admin.
  tips:
    before_install:
      en_US: >-
        Visit: [https://icestore.hsinghhira.me/app/affine/](https://icestore.hsinghhira.me/app/affine/) for full details
  index: /
  port_map: "6102"
  scheme: http
  is_uncontrolled: false
  version: "0.27.4"
  update_at: "2026-10-18"
  release_notes:
    en_US: |-
      - Single-container AFFiNE with one port (6102) and one data folder
      - The migration job runs inside the container before every start, so updates migrate by themselves
      - Database passwords are made on first start, so each install gets its own
      - The app settings stay short; every other setting is listed on the IceStore app page (Variables tab) and can be added in the app settings
      - Added settings are written into AFFiNE's config.json on every start, so changing them later works; removing one brings the default back
      - ghcr.io/toeverything/affine 0.27.4
      - PostgreSQL 16 with pgvector and Redis from Debian trixie
  repo: "https://github.com/toeverything/AFFiNE"
  support: "https://github.com/toeverything/AFFiNE/issues"
  docs: "https://docs.affine.pro/self-host-affine"