selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

cftunnel logo

Self-host cftunnel

v0.4.4

Tunneling CLI with Cloudflare and self-hosted relay modes

BetaOpen SourceMIT
Updated9 hours ago
LanguageGo
Setup difficultyModerate
Stars
360
Install with Docker Compose
Feature comparison chart between Cloud and Relay modesTerminal demo showing cftunnel quick command in action

What is cftunnel?

cftunnel is a cross-platform command-line utility that makes local services reachable from the internet. It bundles two separate tunneling engines: Cloud mode relies on Cloudflare Tunnel to give you free HTTPS and WebSocket tunnels with automatic TLS and a global CDN, needing only a free Cloudflare account. Relay mode uses frp to provide self-hosted TCP and UDP tunnels, which work well for gaming servers, databases, SSH access, and remote desktop. Both engines can operate together. The program handles configuration, fetches engine binaries on its own, registers as a system service (systemd, launchd, or Windows Service), and includes one-command quick tunnels, custom domain support, password protection, QR-code sharing, scenario presets, a portable mode, and a desktop GUI companion. It is written in Go and released under the MIT license.

Should you self-host cftunnel?

cftunnel scores 51/100 on selfhost.directory (how scoring works) and ranks #2 of 10 in Network. It has 360 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v0.4.4, came out on 26 September 2026. New versions land roughly every 1 days.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is scanopy (64/100, 5 913 stars). It scores higher overall, so compare the two before you pick. See cftunnel vs scanopy side by side.

Features

  • AI assistant integration
  • Auto-update
  • Cloudflare Tunnel integration
  • Cross-platform binaries
  • Custom Domain Support
  • Desktop GUI client
  • Password Protection
  • Portable mode
  • Port history
  • QR Code Sharing
  • Real-time Logs
  • Scenario presets
  • Self-hosted TCP/UDP relay
  • System service management
  • Zero-config quick tunnels

cftunnel README

How to install cftunnel

Install cftunnel with Docker Compose

mkdir -p cftunnel-relay && cd cftunnel-relay curl -fsSLO https://raw.githubusercontent.com/qingchencloud/cftunnel/main/docker/relay-server/docker-compose.yml curl -fsSLO https://raw.githubusercontent.com/qingchencloud/cftunnel/main/docker/relay-server/frps.toml.example cp frps.toml.example frps.toml

Edit frps.toml and set auth.token

docker compose up -d

Deploys frps relay server in Docker

cftunnel releases & version history

More in Network

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…