🚀 How to Self-Host a Notion Alternative for Free Using AppFlowy + Cloudflare
Tired of Notion's pricing or privacy concerns? Here's how you can self-host AppFlowy, a powerful open-source alternative to Notion, completely free using Cloudflare Tunnels and Cloudflare Pages/Workers.
🧠 What is AppFlowy?
AppFlowy is a privacy-first, open-source alternative to Notion built using Flutter and Rust. It lets you create rich text documents, kanban boards, and more — all offline, or you can host it yourself for full control.
🛠️ Tech Stack
Tool | Purpose |
---|---|
AppFlowy | Notion-like app |
Docker | Easy deployment |
Cloudflare Tunnels | Secure, public URLs without exposing ports |
Cloudflare Pages/Workers | Optional reverse proxy/CDN edge caching |
✅ Why Self-Host?
- 🆓 Free & open source
- 🔒 Full control over your data
- 🌍 Access from anywhere (Cloudflare Tunnel)
- ⚡ No server management required
🧰 Requirements
- A machine to run AppFlowy (e.g., local PC or VPS)
- Docker installed on your system
- A Cloudflare account
- A custom domain (optional, but recommended)
🧑🍳 Step-by-Step Guide
1. 🚀 Clone and Set Up AppFlowy with Docker
git clone https://github.com/AppFlowy-IO/AppFlowy.git
cd AppFlowy
Create a .env
file (or use the example)
cp .env.example .env
Set basic credentials:
USERNAME=admin
PASSWORD=yourpassword
Start the App
docker-compose up -d
By default, AppFlowy runs on http://localhost:3000
.
2. 🔓 Expose It to the Web with Cloudflare Tunnel
Install Cloudflare Tunnel (cloudflared)
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
sudo dpkg -i cloudflared-linux-amd64.deb
Login and connect your domain:
cloudflared tunnel login
Create and run a tunnel:
cloudflared tunnel create appflowy-tunnel
cloudflared tunnel route dns yourdomain.com appflowy.yourdomain.com
Now configure a tunnel for AppFlowy:
# config.yml
tunnel: appflowy-tunnel
credentials-file: /home/youruser/.cloudflared/appflowy-tunnel.json
ingress:
- hostname: appflowy.yourdomain.com
service: http://localhost:3000
- service: http_status:404
Run the tunnel:
cloudflared tunnel --config config.yml run appflowy-tunnel
✅ Your AppFlowy instance is now publicly accessible via https://appflowy.yourdomain.com
.
3. 🌐 Optional: Add SSL, CDN & Caching with Cloudflare Pages/Workers
If you want more speed, you can:
- Add caching rules in Cloudflare Dashboard
- Use Cloudflare Workers as a reverse proxy
- Use Cloudflare Access to secure it with Google Auth
🔐 Secure Your Instance
- Change your password regularly
- Use Cloudflare Zero Trust for login protection
- Optionally, restrict access via IP or email address
💾 Optional: Persistent Storage
Ensure that Docker saves user data to a volume:
services:
appflowy:
...
volumes:
- appflowy_data:/appflowy/data
volumes:
appflowy_data:
This way, your content is preserved even if the container restarts.
🧪 Test It
Go to https://appflowy.yourdomain.com
and log in with your credentials. You’ll be able to:
- Create documents
- Build kanban boards
- Use offline and sync when needed
🔄 Auto-Restart on Reboot (Optional)
Install Docker Compose as a system service or use:
sudo crontab -e
# Add:
@reboot docker-compose -f /path/to/docker-compose.yml up -d && cloudflared tunnel run appflowy-tunnel
💬 Final Thoughts
AppFlowy is a brilliant choice if you love Notion's interface but want more control, privacy, and no cost. Hosting it using Cloudflare Tunnels makes it extremely easy, secure, and fast — all without any paid infrastructure.
📎 Useful Links
- 🌐 AppFlowy GitHub
- ☁️ Cloudflare Tunnel Docs
- 📹 Want a video guide? Let me know, and I’ll record one!
🧠 Bonus Idea
Want multiple users and team sharing? Set up a PostgreSQL database and reverse proxy with Nginx, or integrate with your organization's SSO via Cloudflare Access.
If you found this helpful, consider ⭐ starring the repo or sharing this article with your friends. Happy hosting!