Self-hosted personal operations dashboard for managing Cloudflare zones, DNS, Pages deployments, bulk redirects, and deployed apps — with stubs for Porkbun, Migadu, and a server console.
Runs at 3c.lol. Protected by Cloudflare Access (Google OAuth). No login
code in the app itself.
- Zone management — list, search, filter, and add Cloudflare zones
- DNS manager — full CRUD for A, AAAA, CNAME, TXT, MX, NS, SRV records
- Analytics — 7-day request/bandwidth/visitor charts via Cloudflare GraphQL
- Bulk redirects — manage redirect lists and items
- Pages — list projects, trigger deployments, create new projects
- Apps — deploy, pull & restart, stop, delete Docker apps with log viewer
- Porkbun integration — auto-update nameservers when adding zones
- Self-update — pull & restart 3C from its own UI
One docker compose up -d starts everything:
- cloudflared — Cloudflare Tunnel (sole internet entry point)
- traefik — reverse proxy (internal only, no exposed ports)
- panel — 3C Panel (FastAPI app)
Traffic flow: internet → cloudflared → traefik → app containers
Traefik auto-discovers containers via Docker socket and routes by Host
header labels. All deployed apps join 3c-network.
- Docker + Docker Compose
- A Cloudflare Tunnel token
- A Cloudflare API token (see scopes below)
- GitHub token for private repos (optional)
- Porkbun API keys (optional)
-
Clone the repo:
git clone https://github.com/youruser/3c.git /opt/3c cd /opt/3c -
Create
.env:cp .env.example .env # Edit with your tokens -
Create
~/.config/3c/config.toml:[cloudflare] api_token = "your-cf-api-token" account_id = "your-account-id" [porkbun] api_key = "your-porkbun-api-key" secret_api_key = "your-porkbun-secret-key" # Porkbun section is optional — remove if not using
chmod 600 ~/.config/3c/config.toml -
Start:
docker compose up -d
python3 -m venv venv
source venv/bin/activate
pip install -e .
python -m panelOpen http://localhost:8000. Note: apps module requires Docker.
Apps are managed via apps.json at the repo root. Each app entry:
{
"name": "myapp",
"type": "stack",
"repo": "https://github.com/user/myapp",
"branch": "main",
"domain": "myapp.com",
"port": 8000,
"enabled": true
}App types:
stack— has its owndocker-compose.yml, deployed viadocker compose up -dweb— single container with Traefik routing, auto-generates Dockerfile if missingworker— background container, no HTTP routing
Apps are cloned to apps/{name}/ (gitignored). Deploy flow: clone → build → run.
When deploying, 3C auto-injects 3c-network and Traefik labels so apps
are routed correctly through the tunnel.
CLOUDFLARE_TUNNEL_TOKEN=your-tunnel-token
GITHUB_TOKEN=your-github-token-for-private-repos
Create a token at https://dash.cloudflare.com/profile/api-tokens with:
| Permission | Access |
|---|---|
| Zone | Read |
| Zone Settings | Edit |
| DNS | Edit |
| Account Analytics | Read |
| Cloudflare Pages | Edit |
| Account Rulesets | Edit |
Zone Resources: All zones
- Log in to https://porkbun.com/account/api
- Enable API access
- Generate an API key and secret key
- Add both to your
config.tomlunder[porkbun]
This app has no authentication code. It is protected by Cloudflare Access:
- Add
3c.lolas an application in Cloudflare Access - Configure a policy (e.g. Google OAuth, allow specific email)
- All requests reaching the app are already authenticated
- Create a tunnel in the Cloudflare dashboard
- Add a public hostname rule:
3c.lol→http://traefik:80 - Add rules for each app domain:
app.com→http://traefik:80 - Copy the tunnel token to
.env
If migrating from the previous C3 panel:
- Network renamed from
c3-networkto3c-network - Container prefix changed from
c3-to3c- - Ensure existing app containers are restarted with the new network
docker-compose.yml cloudflared + traefik + panel
apps.json App registry
apps/ Cloned app repos (gitignored)
.env Tunnel token, GitHub token
static/ Vanilla HTML + CSS + JS (no build step)
index.html Single HTML shell
css/main.css Brutalist dark theme
js/app.js SPA router, sidebar, shared utilities
js/zones.js Zone list + add zone modal
js/dns.js DNS record manager
js/analytics.js Zone analytics + Chart.js
js/redirects.js Bulk redirect manager
js/pages.js Cloudflare Pages manager
js/apps.js App management UI
panel/ Python backend (FastAPI, async)
__main__.py Entry point
app.py REST API endpoints + static serving
config.py TOML config loading
api/
cloudflare.py All Cloudflare REST + GraphQL API calls
porkbun.py Porkbun nameserver update API
apps.py App deploy/git/Docker operations