A modern web-based control panel for managing Cloudflare Tunnel (cloudflared) with an intuitive interface.
- Easy Management: Start, stop, and monitor your Cloudflare Tunnel from a web interface
- Multi-language Support: Available in English, Chinese (中文), and Japanese (日本語)
- Auto-restart: Automatically restart tunnel on failure with configurable options
- Advanced Configuration: Support for all major cloudflared parameters
- Protocol selection (Auto, HTTP/2, QUIC)
- Region selection
- Custom tunnel identifiers
- Metrics server
- Post-quantum cryptography
- And more...
- Real-time Logs: View system logs and tunnel status in real-time
- Responsive Design: Works on desktop, tablet, and mobile devices
docker run -d \
--name cfui \
-p 14333:14333 \
-v cloudflared-data:/app/data \
--restart unless-stopped \
czyt/cfui:latestAccess the web interface at http://localhost:14333
version: '3.8'
services:
cfui:
image: ghcr.io/dockers-x/cfui:latest
# Or use Docker Hub:
# image: czyt/cfui:latest
container_name: cfui
restart: unless-stopped
ports:
- "14333:14333"
volumes:
# Persist configuration and data
- cloudflared-data:/app/data
environment:
# Optional: Override default bind address (default is 0.0.0.0)
- BIND_HOST=0.0.0.0
# Optional: Override default port (default is 14333)
- PORT=14333
# Optional: Set timezone
- TZ=UTC
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:$$PORT/ || exit 1"]
interval: 30s
timeout: 3s
start_period: 5s
retries: 3
# Optional: Resource limits
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
volumes:
cloudflared-data:
driver: local
- Download the latest release from GitHub Releases
- Extract and run:
# Linux/macOS
chmod +x cloudflared-web
./cloudflared-web
# Windows
cloudflared-web.exe- Open your browser and navigate to
http://localhost:14333
- Go 1.25 or higher
- Git
- Make (optional, for easier building)
# Clone the repository
git clone https://github.com/yourusername/cloudflared-ui.git
cd cloudflared-ui
# Build with version info injected
make build
# Or build specific version
VERSION=v1.0.0 make build
# Run
./cfui# Clone the repository
git clone https://github.com/yourusername/cloudflared-ui.git
cd cloudflared-ui
# Build with version info
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
BUILD_TIME=$(date -u '+%Y-%m-%d_%H:%M:%S_UTC')
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
go build -trimpath \
-ldflags="-s -w \
-X 'cfui/version.Version=${VERSION}' \
-X 'cfui/version.BuildTime=${BUILD_TIME}' \
-X 'cfui/version.GitCommit=${GIT_COMMIT}'" \
-o cfui .
# Run
./cfuiThe application stores its configuration in the data directory:
data/config.json- Main configuration filedata/logs/- Application logs (if configured)
BIND_HOST- Server bind address (default: 0.0.0.0)PORT- Server port (default: 14333)DATA_DIR- Data directory path (default: ./data)LOG_DIR- Log directory path (default: {DATA_DIR}/logs)LOG_LEVEL- Log level: debug, info, warn, error (default: info)
- Token: Your Cloudflare Tunnel token (required)
- Auto-start on launch: Start tunnel automatically when the application starts
- Auto-restart on failure: Automatically restart tunnel on abnormal exit
- Custom Tunnel Identifier: Custom tag shown in Cloudflare dashboard
- Protocol: Connection protocol (Auto, HTTP/2, QUIC)
- Region: Preferred connection region
- Grace Period: Shutdown grace period (e.g., 30s)
- Max Retries: Maximum connection retry attempts
- Metrics: Enable Prometheus metrics endpoint
- Edge Bind IP Address: Local IP address to bind for outgoing connections to Cloudflare edge (optional)
- Disable Backend TLS Verification: Disable TLS certificate verification for backend services (not recommended for production)
- Go to Cloudflare Zero Trust Dashboard
- Navigate to Networks > Tunnels
- Create a new tunnel or select an existing one
- Copy the token from the tunnel configuration
GET /api/status- Get tunnel statusGET /api/config- Get current configurationPOST /api/config- Update configurationPOST /api/control- Control tunnel (start/stop)GET /api/i18n/:lang- Get translations
cloudflared-ui/
├── config/ # Configuration management
├── server/ # HTTP server and API handlers
├── service/ # Tunnel runner and management
├── locales/ # Translation files
├── web/ # Frontend files
│ └── dist/ # Built frontend assets
├── main.go # Application entry point
└── README.md
go run main.go# Build Docker image with version info
make build-docker
# Or build specific version
VERSION=v1.0.0 make build-docker# Build image with version info
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
BUILD_TIME=$(date -u '+%Y-%m-%d_%H:%M:%S_UTC')
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
docker build \
--build-arg VERSION=${VERSION} \
--build-arg BUILD_TIME=${BUILD_TIME} \
--build-arg GIT_COMMIT=${GIT_COMMIT} \
-t cfui:${VERSION} \
-t cfui:latest \
.
# Run container
docker run -d -p 14333:14333 -v $(pwd)/data:/app/data cfui:latestContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Never expose the web interface directly to the internet without proper authentication
- Keep your tunnel token secure
- Use HTTPS if exposing the interface externally
- Regularly update to the latest version for security patches
- Verify your tunnel token is correct
- Check system logs for error messages
- Ensure cloudflared binary is accessible
- Check firewall settings
- Restart the application (not just the tunnel)
- Disable metrics if not needed
- Check for port conflicts
- Enable "Auto-restart on failure" in settings
- Check that the error is retryable (authentication errors won't auto-restart)
- Review system logs for restart attempts
- Built with Cloudflare Tunnel
- Uses urfave/cli for CLI framework
- Frontend built with vanilla JavaScript and modern CSS
- GitHub Issues: Report a bug or request a feature
- Documentation: Cloudflare Tunnel Docs
Made with ❤️ for the Cloudflare community