Self-Host a Notion Alternative for Free Using AppFlowy + Cloudflare
Sh Raj

Sh Raj @sh20raj

About: IamSh

Location:
🔆💖 INDIA💖🔆
Joined:
Jan 9, 2022

Self-Host a Notion Alternative for Free Using AppFlowy + Cloudflare

Publish Date: Jun 6
0 0

🚀 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
Enter fullscreen mode Exit fullscreen mode

Create a .env file (or use the example)

cp .env.example .env
Enter fullscreen mode Exit fullscreen mode

Set basic credentials:

USERNAME=admin
PASSWORD=yourpassword
Enter fullscreen mode Exit fullscreen mode

Start the App

docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Login and connect your domain:

cloudflared tunnel login
Enter fullscreen mode Exit fullscreen mode

Create and run a tunnel:

cloudflared tunnel create appflowy-tunnel
cloudflared tunnel route dns yourdomain.com appflowy.yourdomain.com
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Run the tunnel:

cloudflared tunnel --config config.yml run appflowy-tunnel
Enter fullscreen mode Exit fullscreen mode

✅ 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:
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

💬 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


🧠 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!

Comments 0 total

    Add comment