Linux command
cloudflared 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Login to Cloudflare
cloudflared tunnel login
Create tunnel
cloudflared tunnel create [tunnel-name]
List tunnels
cloudflared tunnel list
Run tunnel
cloudflared tunnel run [tunnel-name]
Route DNS to tunnel
cloudflared tunnel route dns [tunnel-name] [hostname]
Quick tunnel (temporary)
cloudflared tunnel --url http://localhost:[8080]
Delete tunnel
cloudflared tunnel delete [tunnel-name]
说明
cloudflared is the Cloudflare Tunnel client that creates secure, outbound-only connections from your origin server to Cloudflare's global network. This eliminates the need to expose public IP addresses or open inbound firewall ports, as all traffic is routed through Cloudflare's edge. The tool supports tunneling HTTP, SSH, RDP, and arbitrary TCP protocols. Named tunnels provide persistent configurations, while quick tunnels offer temporary public URLs for development and testing. Tunnels can be configured to route traffic based on hostname and path rules defined in a YAML configuration file. cloudflared also provides Cloudflare Access integration for authenticating users before they reach your origin, and can run as a system service for production deployments.
参数
- --url _url_
- Local service URL
- --hostname _host_
- Public hostname
- --config _file_
- Configuration file path
- --credentials-file _file_
- Tunnel credentials
- --origincert _file_
- Origin certificate path
- --no-autoupdate
- Disable auto-updates
FAQ
What is the cloudflared command used for?
cloudflared is the Cloudflare Tunnel client that creates secure, outbound-only connections from your origin server to Cloudflare's global network. This eliminates the need to expose public IP addresses or open inbound firewall ports, as all traffic is routed through Cloudflare's edge. The tool supports tunneling HTTP, SSH, RDP, and arbitrary TCP protocols. Named tunnels provide persistent configurations, while quick tunnels offer temporary public URLs for development and testing. Tunnels can be configured to route traffic based on hostname and path rules defined in a YAML configuration file. cloudflared also provides Cloudflare Access integration for authenticating users before they reach your origin, and can run as a system service for production deployments.
How do I run a basic cloudflared example?
Run `cloudflared tunnel login` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --url _url_ do in cloudflared?
Local service URL