How to Self-Host AFFiNE on Ubuntu Cloud VPS with Docker: Complete Notion Alternative
Hostinger vs. Contabo: Full Specifications Breakdown
Data verified from our lab benchmarks • Updated for 2026
| Feature / Metric | HostingerEditor's Choice UI | ContaboMax RAM Value |
|---|---|---|
| Starting Price | $2.99 / month (Web) | $4.99 / mo (VPS) | $5.50 / month (Cloud VPS S) |
| vCPU Cores | 1 to 8 vCPU (Dedicated resources) | 4 to 12 vCPU (High Core Count) |
| RAM Memory | 4 GB to 32 GB | 6 GB to 64 GB (Gigantic RAM) |
| Storage Technology | 50 GB – 400 GB NVMe SSD | 50 GB NVMe or 300 GB SSD |
| Traffic / Bandwidth | 4 TB to 32 TB | 32 TB Outgoing + Unlimited In |
| Control Panel & UI | hPanel (Ultra Modern & Easy) | cPanel, Plesk, Webmin, or CLI |
| Customer Support | 24/7 Live Chat & AI Support (Multi-lingual) | Email Ticket Support (German Business Hours) |
| Best For | Bloggers, WordPress Sites & Devs wanting easy UI | Heavy Database, Docker, Game Servers & SysAdmins |
| Money-Back Guarantee | 30-Day Money-Back Guarantee | 14-Day EU Statutory Cancellation |
| Official Links | Visit Hostinger | Visit Contabo |
Regain complete privacy and data sovereignty over your documents and whiteboards. Learn how to install self-hosted AFFiNE workspace with Docker and Caddy reverse proxy.
- Bridges the gap between structured Notion-like documents and Miro-style infinite canvas whiteboards
- True local-first architecture: edits are stored on-device and synced securely without corporate telemetry
- Zero recurring per-user SaaS license fees ($10-$20/user/mo saved compared to Notion Team)
The Fragility of Proprietary Cloud Workspaces
Modern product teams, independent creators, and knowledge workers rely heavily on productivity suites like Notion, Miro, and Confluence. We entrust them with our intellectual property, project roadmaps, research notes, and personal journals. However, storing proprietary documentation on closed, US-hosted SaaS platforms presents significant operational vulnerabilities:
- Privacy & Telemetry: Enterprise AI features on commercial workspaces frequently scrape document contents to train underlying LLMs unless expensive enterprise opt-outs are negotiated.
- Vendor Lock-in: Exporting complex hierarchical workspaces with nested databases from proprietary clouds frequently produces corrupted files and broken links.
- Skyrocketing Per-Seat Fees: Notion charges $10 to $18 per user per month. A small team of 10 people quickly spends upwards of $1,800 to $2,160 annually simply to write text documents.
AFFiNE is the revolutionary open-source, local-first alternative. Built from the ground up to respect data sovereignty, AFFiNE unifies document writing, spatial mind-mapping, and structured relational tables into a single interface. With a single click, any document transforms from a standard Markdown text page into an infinite whiteboard canvas.
By self-hosting AFFiNE on a reliable Contabo Cloud VPS ($4.95/mo for 8GB RAM) or Hostinger KVM VPS ($6.99/mo), you gain total control over your knowledge headquarters with zero recurring user licensing costs.
Recommended Cloud Hardware Sizing
AFFiNE utilizes PostgreSQL for transactional data persistence and Redis for real-time multiplayer cursor synchronization:
| Workspace Size | Active Collaborators | Recommended Server | RAM Allocation |
|---|---|---|---|
| Solo Professional | 1 User | Hostinger KVM 1 / Contabo Cloud 1 | 4 GB - 8 GB RAM |
| Small Team | 2 - 15 Users | Contabo Cloud VPS 1 ($4.95/mo) | 8 GB RAM (Ideal) |
| Agency / Enterprise | 20+ Users | Contabo Cloud VPS 2 ($8.95/mo) | 16 GB RAM |
Step 1: Initial Server Preparation & Docker Engine
Connect to your VPS via SSH as root and update the package repositories:
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
apt install -y curl git ufw fail2ban jq
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
Configure the UFW firewall to secure host ports:
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw --force enable
Step 2: Domain DNS Pointing
Navigate to your domain DNS registrar (or Cloudflare) and create an A record pointing your chosen workspace subdomain to your server's public IP address:
- Host / Name:
workspace(forworkspace.yourdomain.com) - Target / Value:
YOUR_SERVER_PUBLIC_IP - TTL: 3600 (or Auto)
Step 3: Creating the AFFiNE Container Architecture
Create a dedicated directory to store the configuration and persistent database volumes:
mkdir -p /opt/affine
cd /opt/affine
Generate a secure random password for your PostgreSQL database:
openssl rand -hex 16
Create the docker-compose.yml file:
cat << 'EOF' > /opt/affine/docker-compose.yml
services:
affine:
image: ghcr.io/toeverything/affine-graphql:stable
container_name: affine_server
restart: unless-stopped
ports:
- "127.0.0.1:3010:3010"
environment:
- NODE_ENV=production
- AFFINE_ENV=production
- DATABASE_URL=postgres://affine:YOUR_SECURE_PASSWORD@postgres:5432/affine
- REDIS_SERVER_HOST=redis
- REDIS_SERVER_PORT=6379
- AFFINE_SERVER_HOST=workspace.yourdomain.com
- AFFINE_SERVER_PORT=3010
- AFFINE_SERVER_HTTPS=true
depends_on:
- postgres
- redis
volumes:
- /opt/affine/storage:/root/.affine/storage
- /opt/affine/config:/root/.affine/config
postgres:
image: postgres:16-alpine
container_name: affine_postgres
restart: unless-stopped
environment:
- POSTGRES_USER=affine
- POSTGRES_PASSWORD=YOUR_SECURE_PASSWORD
- POSTGRES_DB=affine
volumes:
- /opt/affine/pgdata:/var/lib/postgresql/data
redis:
image: redis:7-alpine
container_name: affine_redis
restart: unless-stopped
volumes:
- /opt/affine/redisdata:/data
EOF
Replace YOUR_SECURE_PASSWORD with your generated token, and set AFFINE_SERVER_HOST to your exact domain name.
Step 4: Launching the Stack & Automated SSL with Caddy
Start the container fleet in detached mode:
docker compose up -d
Install Caddy to handle automatic Let's Encrypt SSL issuance and HTTP/2 reverse proxying:
apt install -y caddy
cat << 'EOF' > /etc/caddy/Caddyfile
workspace.yourdomain.com {
encode gzip zstd
reverse_proxy 127.0.0.1:3010
}
EOF
systemctl restart caddy
Step 5: First-Time Onboarding & Admin Account
Open your browser and navigate to https://workspace.yourdomain.com.
- Click Sign in / Register.
- The very first account registered on the instance is automatically designated as the system administrator.
- Once inside, create your first workspace. You can immediately create notes, Kanban task boards, and infinite canvas brainstorm layouts.
Step 6: Syncing with Desktop Clients (macOS, Windows, Linux)
One of AFFiNE's greatest strengths is its native desktop applications. You do not have to work exclusively in a browser tab:
- Download the official client from affine.pro/download.
- Launch the desktop app on your laptop.
- Click Settings > Cloud Sync > Add Self-Hosted Server.
- Input your instance URL:
https://workspace.yourdomain.comand authenticate.
Now all your work is saved locally on your laptop SSD for lightning-fast offline editing, and automatically pushes encrypted diffs to your VPS whenever an internet connection is available.
Recommended Reading & Related Guides
Frequently Asked Questions (FAQ)
Can I import existing documents from Notion?
Yes. In Notion, navigate to Settings > Export all workspace content as Markdown & CSV. Inside AFFiNE, click Settings > Import and select your Notion zip archive. Your pages and hierarchy will be reconstructed automatically.
How can I automate database backups?
Create a simple daily cron job running docker exec affine_postgres pg_dump -U affine affine > /opt/affine/backups/affine_$(date +%F).sql to safeguard all your team documents.
Final Verdict
Self-hosting AFFiNE on a budget cloud VPS like Contabo or Hostinger gives your team a private, distraction-free creative operating system matching Notion's polish while preserving complete data ownership.
Video Walkthrough & Official References
How to Use Docker Compose to Manage Containers on Linux VPS • syncbricks
Official External Documentation
Official reference for multi-container YAML specifications and production flags.
Official hPanel guides for DNS, LiteSpeed Cache, and WordPress staging.
Server rescue mode, VNC console access, and Object Storage S3 endpoints.
Editorial Verdict: Pros & Cons
What We Love (Pros)
- Bridges the gap between structured Notion-like documents and Miro-style infinite canvas whiteboards
- True local-first architecture: edits are stored on-device and synced securely without corporate telemetry
- Zero recurring per-user SaaS license fees ($10-$20/user/mo saved compared to Notion Team)
- Native cross-platform synchronization with desktop apps for macOS, Windows, Linux, and mobile browsers
Drawbacks (Cons)
- Requires a server with at least 4 GB RAM for smooth multi-user WebSocket document collaboration
Written by Marcus Vance
Full-Stack Cloud Engineer
Alex and the ServerCraft engineering lab run routine benchmarks on over 25 web hosting providers, maintaining strict objectivity and reproducibility.
Recommended Next Reads
How to Deploy Docker & Docker Compose on Contabo VPS (Production Ready)
A complete guide to installing Docker Engine 26 and Docker Compose on Contabo Ubuntu 24.04 VPS. Includes Docker daemon tuning, UFW firewall integration, and a Traefik reverse proxy demo.
How to Set Up WireGuard VPN on a Contabo VPS: Fast & Secure Tunnel
Turn your high-bandwidth Contabo VPS into a lightning-fast, self-hosted WireGuard VPN server. Complete with IP forwarding, NAT iptables routing, and client profiles.
How to Build a Private Cloud with Nextcloud on Contabo VPS (Complete Guide)
Replace Google Drive and Dropbox with a self-hosted Nextcloud server on a Contabo high-storage VPS. Full guide with Docker, PostgreSQL, Redis caching, and Let's Encrypt SSL.