Linux
You can install cloudflared
as a system service on Linux.
Prerequisites
Section titled “Prerequisites”Before you install Cloudflare Tunnel as a service on Linux, follow Steps 1 through 4 of the Tunnel CLI setup guide. At this point you should have a named tunnel and a config.yml
file in your .cloudflared
directory.
1. Configure cloudflared
as a service
Section titled “1. Configure cloudflared as a service”By default, Cloudflare Tunnel expects all of the configuration to exist in the $HOME/.cloudflared/config.yml
configuration file. At a minimum you must specify the following arguments to run as a service:
Argument | Description |
---|---|
tunnel | The UUID of your tunnel |
credentials-file | The location of the credentials file for your Tunnel |
2. Run cloudflared
as a service
Section titled “2. Run cloudflared as a service”-
Install the
cloudflared
service.Terminal window cloudflared service install -
Start the service.
Terminal window systemctl start cloudflared -
(Optional) View the status of the service.
Terminal window systemctl status cloudflared
Next steps
Section titled “Next steps”You can now route traffic through your tunnel. If you add IP routes or otherwise change the configuration, restart the service to load the new configuration:
systemctl restart cloudflared
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark