docker.recipes

AppFlowy Notion Alternative

intermediate

AppFlowy open-source Notion alternative.

Overview

AppFlowy is an open-source alternative to Notion that provides a privacy-focused, self-hosted workspace for notes, documents, and project management. Originally developed as a desktop application, AppFlowy Cloud extends the platform with server-side synchronization capabilities, allowing teams to collaborate on documents while maintaining full control over their data. The platform combines the familiar block-based editing experience of Notion with the security and customization benefits of self-hosting. This deployment creates a complete AppFlowy Cloud infrastructure using four containerized services: the main AppFlowy Cloud application server, a PostgreSQL database for structured data storage, Redis for caching and real-time features, and MinIO for S3-compatible object storage. The AppFlowy Cloud service handles user authentication, document synchronization, and API endpoints, while PostgreSQL stores user data and document metadata with ACID compliance. Redis provides sub-millisecond response times for session management and real-time collaboration features, and MinIO offers high-performance object storage for file attachments and media assets. This stack is ideal for teams and organizations seeking a self-hosted Notion alternative with enterprise-grade data control. The combination provides the scalability needed for growing teams while ensuring data sovereignty and customization flexibility that cloud-hosted solutions cannot offer.

Key Features

  • Self-hosted Notion-like workspace with block-based document editing and real-time collaboration
  • PostgreSQL backend with ACID compliance ensuring data integrity for collaborative document editing
  • Redis-powered real-time synchronization enabling instant updates across multiple AppFlowy clients
  • S3-compatible object storage via MinIO for secure file attachments and media management
  • Multi-user authentication and workspace management with granular permission controls
  • Cross-platform synchronization supporting AppFlowy desktop, web, and mobile applications
  • Privacy-focused architecture keeping all data within your infrastructure boundaries
  • RESTful API endpoints for custom integrations and third-party application connectivity

Common Use Cases

  • 1Teams migrating from Notion who need data sovereignty and privacy compliance
  • 2Software development teams requiring technical documentation with code snippet support
  • 3Educational institutions managing course materials and student collaboration spaces
  • 4Consulting firms organizing client projects with secure document sharing capabilities
  • 5Startups building knowledge bases while maintaining control over intellectual property
  • 6Remote teams needing collaborative workspaces without relying on external cloud services
  • 7Organizations in regulated industries requiring on-premises document management solutions

Prerequisites

  • Docker and Docker Compose installed with at least 3GB available RAM for optimal performance
  • Port 8080 available for AppFlowy Cloud web interface access
  • Environment variables configured: DB_USER, DB_PASSWORD, MINIO_USER, MINIO_PASSWORD
  • Understanding of AppFlowy desktop application setup for client-server synchronization
  • Basic knowledge of PostgreSQL and Redis for performance tuning and maintenance
  • Sufficient storage space for PostgreSQL data and MinIO object storage volumes

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 appflowy-cloud:
3 image: appflowy/appflowy-cloud:latest
4 container_name: appflowy-cloud
5 restart: unless-stopped
6 ports:
7 - "${AF_PORT:-8080}:8080"
8 environment:
9 - APPFLOWY_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@appflowy-db/appflowy
10 - APPFLOWY_REDIS_URL=redis://appflowy-redis:6379
11 - APPFLOWY_S3_URL=http://appflowy-minio:9000
12 depends_on:
13 - appflowy-db
14 - appflowy-redis
15 - appflowy-minio
16
17 appflowy-db:
18 image: postgres:15-alpine
19 container_name: appflowy-db
20 restart: unless-stopped
21 environment:
22 - POSTGRES_USER=${DB_USER}
23 - POSTGRES_PASSWORD=${DB_PASSWORD}
24 - POSTGRES_DB=appflowy
25 volumes:
26 - appflowy_db_data:/var/lib/postgresql/data
27
28 appflowy-redis:
29 image: redis:7-alpine
30 container_name: appflowy-redis
31 restart: unless-stopped
32
33 appflowy-minio:
34 image: minio/minio:latest
35 container_name: appflowy-minio
36 restart: unless-stopped
37 environment:
38 - MINIO_ROOT_USER=${MINIO_USER}
39 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
40 volumes:
41 - minio_data:/data
42 command: server /data
43
44volumes:
45 appflowy_db_data:
46 minio_data:

.env Template

.env
1# AppFlowy
2AF_PORT=8080
3DB_USER=appflowy
4DB_PASSWORD=appflowy_password
5MINIO_USER=minioadmin
6MINIO_PASSWORD=minioadmin

Usage Notes

  1. 1AppFlowy Cloud at http://localhost:8080
  2. 2Use with AppFlowy desktop app
  3. 3Self-hosted sync server
  4. 4Notion-like experience

Individual Services(4 services)

Copy individual services to mix and match with your existing compose files.

appflowy-cloud
appflowy-cloud:
  image: appflowy/appflowy-cloud:latest
  container_name: appflowy-cloud
  restart: unless-stopped
  ports:
    - ${AF_PORT:-8080}:8080
  environment:
    - APPFLOWY_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@appflowy-db/appflowy
    - APPFLOWY_REDIS_URL=redis://appflowy-redis:6379
    - APPFLOWY_S3_URL=http://appflowy-minio:9000
  depends_on:
    - appflowy-db
    - appflowy-redis
    - appflowy-minio
appflowy-db
appflowy-db:
  image: postgres:15-alpine
  container_name: appflowy-db
  restart: unless-stopped
  environment:
    - POSTGRES_USER=${DB_USER}
    - POSTGRES_PASSWORD=${DB_PASSWORD}
    - POSTGRES_DB=appflowy
  volumes:
    - appflowy_db_data:/var/lib/postgresql/data
appflowy-redis
appflowy-redis:
  image: redis:7-alpine
  container_name: appflowy-redis
  restart: unless-stopped
appflowy-minio
appflowy-minio:
  image: minio/minio:latest
  container_name: appflowy-minio
  restart: unless-stopped
  environment:
    - MINIO_ROOT_USER=${MINIO_USER}
    - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
  volumes:
    - minio_data:/data
  command: server /data

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 appflowy-cloud:
5 image: appflowy/appflowy-cloud:latest
6 container_name: appflowy-cloud
7 restart: unless-stopped
8 ports:
9 - "${AF_PORT:-8080}:8080"
10 environment:
11 - APPFLOWY_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@appflowy-db/appflowy
12 - APPFLOWY_REDIS_URL=redis://appflowy-redis:6379
13 - APPFLOWY_S3_URL=http://appflowy-minio:9000
14 depends_on:
15 - appflowy-db
16 - appflowy-redis
17 - appflowy-minio
18
19 appflowy-db:
20 image: postgres:15-alpine
21 container_name: appflowy-db
22 restart: unless-stopped
23 environment:
24 - POSTGRES_USER=${DB_USER}
25 - POSTGRES_PASSWORD=${DB_PASSWORD}
26 - POSTGRES_DB=appflowy
27 volumes:
28 - appflowy_db_data:/var/lib/postgresql/data
29
30 appflowy-redis:
31 image: redis:7-alpine
32 container_name: appflowy-redis
33 restart: unless-stopped
34
35 appflowy-minio:
36 image: minio/minio:latest
37 container_name: appflowy-minio
38 restart: unless-stopped
39 environment:
40 - MINIO_ROOT_USER=${MINIO_USER}
41 - MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
42 volumes:
43 - minio_data:/data
44 command: server /data
45
46volumes:
47 appflowy_db_data:
48 minio_data:
49EOF
50
51# 2. Create the .env file
52cat > .env << 'EOF'
53# AppFlowy
54AF_PORT=8080
55DB_USER=appflowy
56DB_PASSWORD=appflowy_password
57MINIO_USER=minioadmin
58MINIO_PASSWORD=minioadmin
59EOF
60
61# 3. Start the services
62docker compose up -d
63
64# 4. View logs
65docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/appflowy-stack/run | bash

Troubleshooting

  • AppFlowy client connection failed: Verify AF_PORT environment variable matches client configuration and port 8080 is accessible
  • PostgreSQL connection errors in appflowy-cloud logs: Check DB_USER and DB_PASSWORD environment variables match between appflowy-cloud and appflowy-db services
  • Redis connection timeout errors: Ensure appflowy-redis container is running and accessible on default port 6379 within Docker network
  • File upload failures: Verify MINIO_USER and MINIO_PASSWORD are set correctly and appflowy-minio service is responding on port 9000
  • Slow document synchronization: Monitor Redis memory usage and consider increasing Redis memory limits for better caching performance
  • AppFlowy Cloud startup failures: Check Docker logs for database migration errors and ensure PostgreSQL is fully initialized before AppFlowy Cloud starts

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space