Skip to content

Commit ec79d48

Browse files
[CF1] local tunnel install
1 parent 09335b6 commit ec79d48

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

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

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,37 @@ 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. You must mount your local `cloudflared` [directory](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/local-tunnel-terms/#default-cloudflared-directory) into the container.
119+
120+
2. Run the following command to update `cloudflared`:
121+
122+
```sh
123+
docker run --pull always -v /root/.cloudflared:/home/nonroot/.cloudflared cloudflare/cloudflared:latest tunnel --no-autoupdate run <TUNNEL-ID>
124+
```
125+
101126

102127
</TabItem> <TabItem label="Other">
103128

0 commit comments

Comments
 (0)