π 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!
Top comments (0)