Cloudflare Docs
Cloudflare-One
Visit Cloudflare Zero Trust on GitHub
Set theme to dark (⇧+D)

Run as a service on Linux

You can install cloudflared as a system service on Linux. Before you install Cloudflare Tunnel as a service, follow the Tunnel guide to install cloudflared on your machine, create a tunnel, route traffic to your tunnel, and then run it.

Configuring cloudflared as a service

By default, Cloudflare Tunnel expects all of the configuration to exist in the $HOME/.cloudflared/config.yml configuration file . The available options are documented on the configuration file reference , but at a minimum you must specify the following arguments to run as a service:

ArgumentDescription
tunnelThe UUID of your Tunnel
credentials-fileThe location of the credentials file for your Tunnel

Running cloudflared as a service

Complete steps 1 through 4 in the CLI setup guide . At this point cloudflared should be installed, authenticated, and have a config.yml file in the .cloudflared directory.

Next, run the following three commands to run cloudflared as a service:

$ cloudflared service install
$ systemctl start cloudflared
$ systemctl status cloudflared