Skip to content

Commit b8d84aa

Browse files
deadlypants1973RebeccaTamachiro
authored andcommitted
[CF1] tunnel run flag note (#20781)
* [CF1] tunnel run flag note * update step 2 * link * error * partial
1 parent 74108e2 commit b8d84aa

File tree

5 files changed

+89
-74
lines changed

5 files changed

+89
-74
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters.mdx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ pcx_content_type: reference
33
title: Tunnel run parameters
44
sidebar:
55
order: 4
6-
76
---
87

8+
import { Render } from "~/components";
9+
910
This page lists general-purpose configuration options that you can [add](/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/#update-tunnel-run-parameters) to the `cloudflared tunnel run` command.
1011

1112
Alternatively, if you are running a [locally-managed tunnel](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/) you can add these flags to your [configuration file](/cloudflare-one/connections/connect-networks/do-more-with-tunnels/local-management/configuration-file/) as key/value pairs.
@@ -49,7 +50,7 @@ The IP version of `edge-bind-address` will override [`edge-ip-version`](#edge-ip
4950

5051
| Syntax | Default | Environment Variable |
5152
| ------------------------------------------------------------------- | ------- | ------------------------ |
52-
| `cloudflared tunnel --edge-ip-version <VERSION> run <UUID or NAME>` | `4` | `TUNNEL_EDGE_IP_VERSION` |
53+
| `cloudflared tunnel --edge-ip-version <VERSION> run <UUID or NAME>` | `4` | `TUNNEL_EDGE_IP_VERSION` |
5354

5455
Specifies the IP address version (IPv4 or IPv6) used to establish a connection between `cloudflared` and the Cloudflare global network. Available values are `auto`, `4`, and `6`.
5556

@@ -81,14 +82,20 @@ Specifies the verbosity of logging for the local `cloudflared` instance. Availab
8182

8283
## `metrics`
8384

84-
| Syntax | Default | Environment Variable |
85-
| ----------------------------------------------------------- | ------------ | -------------------- |
86-
| `cloudflared tunnel --metrics <IP:PORT> run <UUID or NAME>` | Refer to [Tunnel metrics](/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/)| `TUNNEL_METRICS` |
85+
| Syntax | Default | Environment Variable |
86+
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------- |
87+
| `cloudflared tunnel --metrics <IP:PORT> run <UUID or NAME>` | Refer to [Tunnel metrics](/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/) | `TUNNEL_METRICS` |
8788

8889
Exposes a Prometheus endpoint on the specified IP address and port, which you can then query for [usage metrics](/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/).
8990

9091
## `no-autoupdate`
9192

93+
:::note
94+
95+
Does not apply if you installed `cloudflared` using a package manager. <Render file="tunnel/package-manager" product="cloudflare-one" />
96+
97+
:::
98+
9299
| Syntax | Environment Variable |
93100
| ------------------------------------------------------- | -------------------- |
94101
| `cloudflared tunnel --no-autoupdate run <UUID or NAME>` | `NO_AUTOUPDATE` |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 5
66
---
77

8-
import { TabItem, Tabs } from "~/components";
8+
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

@@ -62,7 +62,7 @@ sudo systemctl restart cloudflared.service
6262

6363
**If installed manually via `dpkg -i`:**
6464

65-
You can check if `cloudflared` was installed by a package manager by running `ls -la /usr/local/etc/cloudflared/` and looking for `.installedFromPackageManager` in the output.
65+
<Render file="tunnel/package-manager" product="cloudflare-one" />
6666

6767
1. Update the `cloudflared` package:
6868

@@ -107,7 +107,7 @@ If you installed `cloudflared` from GitHub-provided binaries or from source, run
107107
cloudflared update
108108
```
109109

110-
If you installed `cloudflared` with a package manager, you must update it using the same package manager. You can check if `cloudflared` was installed by a package manager by running `ls -la /usr/local/etc/cloudflared/` and looking for `.installedFromPackageManager` in the output.
110+
If you installed `cloudflared` with a package manager, you must update it using the same package manager. <Render file="tunnel/package-manager" product="cloudflare-one" />
111111

112112
</TabItem> </Tabs>
113113

src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api.mdx

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Follow this guide to set up a Cloudflare Tunnel using the API.
1313

1414
[Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions:
1515

16-
| Type | Item | Permission |
17-
| ------- | ---------------- | ---------- |
18-
| Account | Cloudflare Tunnel | Edit |
19-
| Zone | DNS | Edit |
16+
| Type | Item | Permission |
17+
| ------- | ----------------- | ---------- |
18+
| Account | Cloudflare Tunnel | Edit |
19+
| Zone | DNS | Edit |
2020

2121
## 2. Create a tunnel
2222

23-
Make a `POST` request to the [Cloudflare Tunnel](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint:
23+
Make a `POST` request to the [Cloudflare Tunnel](/api/resources/zero_trust/subresources/tunnels/subresources/cloudflared/methods/create/) endpoint:
2424

2525
```sh
2626
curl 'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel' \
@@ -76,47 +76,48 @@ Follow these steps to connect an application through your tunnel. If you are loo
7676

7777
1. Make a [`PUT` request](/api/resources/zero_trust/subresources/tunnels/subresources/cloudflared/subresources/configurations/methods/update/) to route your local service URL to a public hostname. For example,
7878

79-
```sh
80-
curl --request PUT \
81-
'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/c1744f8b-faa1-48a4-9e5c-02ac921467fa/configurations' \
82-
--header 'Content-Type: application/json' \
83-
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
84-
--data '{
85-
"config": {
86-
"ingress": [
87-
{
88-
"hostname": "app.example.com",
89-
"service": "http://localhost:8001",
90-
"originRequest": {}
91-
},
92-
{
93-
"service": "http_status:404"
94-
}
95-
]
96-
}
97-
}'
98-
```
99-
100-
:::note
101-
If you add a multi-level subdomain (more than one level of subdomain), you must [order an Advanced Certificate for the hostname](/cloudflare-one/faq/troubleshooting/#i-see-this-site-cant-provide-a-secure-connection).
102-
:::
103-
104-
Your ingress rules must include a catch-all rule at the end. In this example, `cloudflared` will respond with a 404 status code when the request does not match any of the previous hostnames.
79+
```sh
80+
curl --request PUT \
81+
'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/c1744f8b-faa1-48a4-9e5c-02ac921467fa/configurations' \
82+
--header 'Content-Type: application/json' \
83+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
84+
--data '{
85+
"config": {
86+
"ingress": [
87+
{
88+
"hostname": "app.example.com",
89+
"service": "http://localhost:8001",
90+
"originRequest": {}
91+
},
92+
{
93+
"service": "http_status:404"
94+
}
95+
]
96+
}
97+
}'
98+
```
99+
100+
:::note
101+
If you add a multi-level subdomain (more than one level of subdomain), you must [order an Advanced Certificate for the hostname](/cloudflare-one/faq/troubleshooting/#i-see-this-site-cant-provide-a-secure-connection).
102+
:::
103+
104+
Your ingress rules must include a catch-all rule at the end. In this example, `cloudflared` will respond with a 404 status code when the request does not match any of the previous hostnames.
105105

106106
2. [Create a DNS record](/api/resources/dns/subresources/records/methods/create/) for your application:
107-
```sh
108-
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \
109-
--header 'Content-Type: application/json' \
110-
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
111-
--data '{
112-
"type": "CNAME",
113-
"proxied": true,
114-
"name": "app.example.com",
115-
"content": "c1744f8b-faa1-48a4-9e5c-02ac921467fa.cfargotunnel.com"
116-
}'
117-
```
118-
119-
This DNS record allows Cloudflare to proxy `app.example.com` traffic to your Cloudflare Tunnel (`<tunnel-id>.cfargotunnel.com`).
107+
108+
```sh
109+
curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \
110+
--header 'Content-Type: application/json' \
111+
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
112+
--data '{
113+
"type": "CNAME",
114+
"proxied": true,
115+
"name": "app.example.com",
116+
"content": "c1744f8b-faa1-48a4-9e5c-02ac921467fa.cfargotunnel.com"
117+
}'
118+
```
119+
120+
This DNS record allows Cloudflare to proxy `app.example.com` traffic to your Cloudflare Tunnel (`<tunnel-id>.cfargotunnel.com`).
120121

121122
This application will be publicly available on the Internet once you [run the tunnel](#4-install-and-run-the-tunnel). To allow or block specific users, [create an Access application](/cloudflare-one/applications/configure-apps/self-hosted-public-app/).
122123

@@ -143,45 +144,46 @@ Install `cloudflared` on your server and run the tunnel using the `token` value
143144

144145
<Tabs> <TabItem label="Windows">
145146

146-
1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#windows) `cloudflared`.
147+
1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#windows) `cloudflared`.
147148

148-
2. Open Command Prompt as administrator.
149+
2. Open Command Prompt as administrator.
149150

150-
3. Run the following command:
151+
3. Run the following command:
151152

152-
```txt
153-
cloudflared.exe service install <tunnel-token>
154-
```
153+
```txt
154+
cloudflared.exe service install <tunnel-token>
155+
```
155156

156157
</TabItem> <TabItem label="macOS">
157158

158-
1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#macos) `cloudflared`.
159+
1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#macos) `cloudflared`.
159160

160-
2. Run the following command:
161+
2. Run the following command:
161162

162-
```sh
163-
sudo cloudflared service install <tunnel-token>
164-
```
163+
```sh
164+
sudo cloudflared service install <tunnel-token>
165+
```
165166

166167
</TabItem> <TabItem label="Linux">
167168

168-
1. [Download and install](https://pkg.cloudflare.com/index.html) `cloudflared`.
169+
1. [Download and install](https://pkg.cloudflare.com/index.html) `cloudflared`.
169170

170-
2. Run the following command:
171+
2. Run the following command:
171172

172-
```sh
173-
sudo cloudflared service install <tunnel-token>
174-
```
173+
```sh
174+
sudo cloudflared service install <tunnel-token>
175+
```
175176

176177
</TabItem> <TabItem label="Docker">
177178

178-
1. Open a terminal window.
179+
1. Open a terminal window.
180+
181+
2. Run the following command:
179182

180-
2. Run the following command:
183+
```sh
184+
docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <tunnel-token>
185+
```
181186

182-
```sh
183-
docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <tunnel-token>
184-
```
185187
</TabItem> </Tabs>
186188

187189
## 5. Verify tunnel status

src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar:
77

88
import { Render } from "~/components";
99

10-
Follow this step-by-step guide to get your first tunnel up and running using Zero Trust.
10+
Follow this step-by-step guide to create your first [remotely-managed tunnel](/cloudflare-one/connections/connect-networks/get-started/tunnel-useful-terms/#remotely-managed-tunnel) using Zero Trust.
1111

1212
## 1. Create a tunnel
1313

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
{}
3+
4+
---
5+
6+
You can check if `cloudflared` was installed by a package manager by running `ls -la /usr/local/etc/cloudflared/` and looking for `.installedFromPackageManager` in the output.

0 commit comments

Comments
 (0)