diff --git a/src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters.mdx b/src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters.mdx index 3c4be080486c41..3cdbba15547e95 100644 --- a/src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/cloudflared-parameters/run-parameters.mdx @@ -3,9 +3,10 @@ pcx_content_type: reference title: Tunnel run parameters sidebar: order: 4 - --- +import { Render } from "~/components"; + 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. 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 | Syntax | Default | Environment Variable | | ------------------------------------------------------------------- | ------- | ------------------------ | -| `cloudflared tunnel --edge-ip-version run ` | `4` | `TUNNEL_EDGE_IP_VERSION` | +| `cloudflared tunnel --edge-ip-version run ` | `4` | `TUNNEL_EDGE_IP_VERSION` | 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`. @@ -81,14 +82,20 @@ Specifies the verbosity of logging for the local `cloudflared` instance. Availab ## `metrics` -| Syntax | Default | Environment Variable | -| ----------------------------------------------------------- | ------------ | -------------------- | -| `cloudflared tunnel --metrics run ` | Refer to [Tunnel metrics](/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/)| `TUNNEL_METRICS` | +| Syntax | Default | Environment Variable | +| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -------------------- | +| `cloudflared tunnel --metrics run ` | Refer to [Tunnel metrics](/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/) | `TUNNEL_METRICS` | 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/). ## `no-autoupdate` +:::note + +Does not apply if you installed `cloudflared` using a package manager. + +::: + | Syntax | Environment Variable | | ------------------------------------------------------- | -------------------- | | `cloudflared tunnel --no-autoupdate run ` | `NO_AUTOUPDATE` | diff --git a/src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx b/src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx index 4b728a5963a52c..4fef372e6e54b5 100644 --- a/src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx @@ -5,7 +5,7 @@ sidebar: order: 5 --- -import { TabItem, Tabs } from "~/components"; +import { TabItem, Tabs, Render } from "~/components"; 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). @@ -58,7 +58,7 @@ sudo systemctl restart cloudflared.service **If installed manually via `dpkg -i`:** -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. + 1. Update the `cloudflared` package: @@ -103,7 +103,7 @@ If you installed `cloudflared` from GitHub-provided binaries or from source, run cloudflared update ``` -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. +If you installed `cloudflared` with a package manager, you must update it using the same package manager. diff --git a/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api.mdx b/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api.mdx index 89c5937fd325c9..e445b2188b1240 100644 --- a/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel-api.mdx @@ -13,14 +13,14 @@ Follow this guide to set up a Cloudflare Tunnel using the API. [Create an API token](/fundamentals/api/get-started/create-token/) with the following permissions: -| Type | Item | Permission | -| ------- | ---------------- | ---------- | -| Account | Cloudflare Tunnel | Edit | -| Zone | DNS | Edit | +| Type | Item | Permission | +| ------- | ----------------- | ---------- | +| Account | Cloudflare Tunnel | Edit | +| Zone | DNS | Edit | ## 2. Create a tunnel -Make a `POST` request to the [Cloudflare Tunnel](/api/resources/zero_trust/subresources/access/subresources/applications/methods/create/) endpoint: +Make a `POST` request to the [Cloudflare Tunnel](/api/resources/zero_trust/subresources/tunnels/subresources/cloudflared/methods/create/) endpoint: ```sh 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 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, - ```sh - curl --request PUT \ - 'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/c1744f8b-faa1-48a4-9e5c-02ac921467fa/configurations' \ - --header 'Content-Type: application/json' \ - --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - --data '{ - "config": { - "ingress": [ - { - "hostname": "app.example.com", - "service": "http://localhost:8001", - "originRequest": {} - }, - { - "service": "http_status:404" - } - ] - } - }' - ``` - - :::note - 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). - ::: - - 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. + ```sh + curl --request PUT \ + 'https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cfd_tunnel/c1744f8b-faa1-48a4-9e5c-02ac921467fa/configurations' \ + --header 'Content-Type: application/json' \ + --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + --data '{ + "config": { + "ingress": [ + { + "hostname": "app.example.com", + "service": "http://localhost:8001", + "originRequest": {} + }, + { + "service": "http_status:404" + } + ] + } + }' + ``` + + :::note + 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). + ::: + + 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. 2. [Create a DNS record](/api/resources/dns/subresources/records/methods/create/) for your application: - ```sh - curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \ - --header 'Content-Type: application/json' \ - --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ - --data '{ - "type": "CNAME", - "proxied": true, - "name": "app.example.com", - "content": "c1744f8b-faa1-48a4-9e5c-02ac921467fa.cfargotunnel.com" - }' - ``` - - This DNS record allows Cloudflare to proxy `app.example.com` traffic to your Cloudflare Tunnel (`.cfargotunnel.com`). + + ```sh + curl https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records \ + --header 'Content-Type: application/json' \ + --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ + --data '{ + "type": "CNAME", + "proxied": true, + "name": "app.example.com", + "content": "c1744f8b-faa1-48a4-9e5c-02ac921467fa.cfargotunnel.com" + }' + ``` + + This DNS record allows Cloudflare to proxy `app.example.com` traffic to your Cloudflare Tunnel (`.cfargotunnel.com`). 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/). @@ -143,45 +144,46 @@ Install `cloudflared` on your server and run the tunnel using the `token` value -1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#windows) `cloudflared`. +1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#windows) `cloudflared`. -2. Open Command Prompt as administrator. +2. Open Command Prompt as administrator. -3. Run the following command: +3. Run the following command: - ```txt - cloudflared.exe service install - ``` + ```txt + cloudflared.exe service install + ``` -1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#macos) `cloudflared`. +1. [Download and install](/cloudflare-one/connections/connect-networks/downloads/#macos) `cloudflared`. -2. Run the following command: +2. Run the following command: - ```sh - sudo cloudflared service install - ``` + ```sh + sudo cloudflared service install + ``` -1. [Download and install](https://pkg.cloudflare.com/index.html) `cloudflared`. +1. [Download and install](https://pkg.cloudflare.com/index.html) `cloudflared`. -2. Run the following command: +2. Run the following command: - ```sh - sudo cloudflared service install - ``` + ```sh + sudo cloudflared service install + ``` -1. Open a terminal window. +1. Open a terminal window. + +2. Run the following command: -2. Run the following command: + ```sh + docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token + ``` - ```sh - docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token - ``` ## 5. Verify tunnel status diff --git a/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel.mdx b/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel.mdx index f00d2a4b68316a..967529acb49b8a 100644 --- a/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel.mdx +++ b/src/content/docs/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel.mdx @@ -7,7 +7,7 @@ sidebar: import { Render } from "~/components"; -Follow this step-by-step guide to get your first tunnel up and running using Zero Trust. +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. ## 1. Create a tunnel diff --git a/src/content/partials/cloudflare-one/tunnel/package-manager.mdx b/src/content/partials/cloudflare-one/tunnel/package-manager.mdx new file mode 100644 index 00000000000000..2fd27a10bd6f00 --- /dev/null +++ b/src/content/partials/cloudflare-one/tunnel/package-manager.mdx @@ -0,0 +1,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. \ No newline at end of file