Skip to content

Commit 91bdbab

Browse files
[CF1] local tunnel update instructions (#21410)
* [CF1] local tunnel update instructions * link
1 parent 35fb647 commit 91bdbab

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

Diff for: src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx

+29-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { TabItem, Tabs, Render } from "~/components";
99

1010
Updates will cause `cloudflared` to restart which will impact traffic currently being served. You can perform zero-downtime upgrades by using Cloudflare's [Load Balancer product](/cloudflare-one/connections/connect-networks/downloads/update-cloudflared/#update-with-cloudflare-load-balancer) or by using [multiple `cloudflared` instances](/cloudflare-one/connections/connect-networks/downloads/update-cloudflared/#update-with-multiple-cloudflared-instances).
1111

12-
## Remotely-managed tunnels
12+
## Update the `cloudflared` service
1313

14-
To update `cloudflared` for a tunnel [created through the dashboard](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/):
14+
Refer to the following commands to update `cloudflared` for a [remotely-managed tunnel](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/) created through the dashboard or a [locally-managed tunnel](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/). Locally-managed tunnels must be set up to [run as a service](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/as-a-service/) for the following commands to execute successfully.
1515

1616
<Tabs> <TabItem label="Windows">
1717

@@ -92,12 +92,36 @@ sudo systemctl restart cloudflared.service
9292

9393
</TabItem> <TabItem label="Docker">
9494

95-
1. In Zero Trust, go to **Networks** > **Tunnels**.
95+
**If you created a remotely-managed tunnel using the [dashboard](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/):**
96+
97+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**.
9698
2. Select your tunnel and select **Configure**.
97-
3. Select **Docker** and copy the installation command shown in the dashboard.
99+
3. Select **Docker** and copy the installation command shown in the dashboard. The copied command will contain your token.
98100
4. Paste this command into a terminal window.
99101

100-
This creates a new container from the latest `cloudflared` image. You can now delete the old container.
102+
This command creates a new container from the latest `cloudflared` image. You can now delete the old container.
103+
104+
:::caution
105+
106+
Cloudflare recommends creating remotely-managed tunnels when working with Docker.
107+
108+
:::
109+
110+
**If you created a remotely or locally-managed tunnel using the [API](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api/), run the following command:**
111+
112+
```sh
113+
docker run --pull always cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <TOKEN>
114+
```
115+
116+
**If you created a locally-managed tunnel using the [CLI](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/create-local-tunnel/#2-authenticate-cloudflared):**
117+
118+
1. Mount your local `.cloudflared` [directory](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/local-tunnel-terms/#default-cloudflared-directory) into the Docker container using a volume.
119+
120+
2. Run the following command to update `cloudflared`:
121+
122+
```sh
123+
docker run --pull always -v <PATH-TO-YOUR-LOCAL-CLOUDFLARED>:/home/nonroot/.cloudflared cloudflare/cloudflared:latest tunnel --no-autoupdate run <TUNNEL-ID>
124+
```
101125

102126
</TabItem> <TabItem label="Other">
103127

0 commit comments

Comments
 (0)