Skip to content

Commit 6915703

Browse files
authored
Update remote-management.mdx
Updated instructions to create systemd service for linux. - use sensible log location - add [install] section so service can be enabled - add systemctl commands to enable and start service - add system log command to debug any potential issues
1 parent ecd9bca commit 6915703

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management.mdx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ You can modify the Cloudflare Tunnel service with one or more [general-purpose t
1717

1818
On Linux, Cloudflare Tunnel installs itself as a system service using `systemctl`. By default, the service will be named `cloudflared.service`. To configure your tunnel on Linux:
1919

20-
1. Open `cloudflared.service`.
20+
1. Create `cloudflared.service`.
2121

2222
```sh
23-
sudo systemctl edit --full cloudflared.service
23+
sudo systemctl edit --force --full cloudflared.service
2424
```
2525

2626
2. Modify the `cloudflared tunnel run` command with the desired configuration flag. For example,
@@ -33,9 +33,29 @@ On Linux, Cloudflare Tunnel installs itself as a system service using `systemctl
3333
[Service]
3434
TimeoutStartSec=0
3535
Type=notify
36-
ExecStart=/usr/local/bin/cloudflared tunnel --loglevel debug --logfile <PATH> run --token <TOKEN VALUE>
36+
ExecStart=/usr/local/bin/cloudflared tunnel --loglevel debug --logfile /var/log/cloudflared/cloudflared.log run --token <TOKEN VALUE>
3737
Restart=on-failure
3838
RestartSec=5s
39+
40+
[Install]
41+
WantedBy=multi-user.target
42+
```
43+
44+
3. Enable `cloudflared.service` to start when system starts. For example,
45+
46+
```sh
47+
# restart systemctl
48+
sudo systemctl daemon-reload
49+
50+
# enable and start service
51+
sudo systemctl enable cloudflared
52+
sudo systemctl start cloudflared
53+
54+
# check service status
55+
sudo systemctl status cloudflared
56+
57+
# view system logs if any issues
58+
journalctl -u cloudflared
3959
```
4060

4161
</TabItem> <TabItem label="macOS">

0 commit comments

Comments
 (0)