Skip to content

Commit 0f346da

Browse files
committed
move local tunnels and clean up config folder
1 parent dc854c1 commit 0f346da

File tree

30 files changed

+234
-220
lines changed

30 files changed

+234
-220
lines changed

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

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Configure origin parameters
3+
pcx_content_type: how-to
4+
sidebar:
5+
order: 2
6+
---
7+
8+
Origin configuration parameters determine how `cloudflared` sends requests to your [public hostname](/cloudflare-one/connections/connect-networks/routing-to-tunnel/) services.
9+
10+
## Update origin configuration
11+
12+
To update your origin configuration:
13+
14+
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**.
15+
2. Choose a tunnel and select **Configure**.
16+
3. Select the **Public Hostname** tab.
17+
4. Choose a route and select **Edit**.
18+
5. Under **Additional application settings**, modify one or more origin configuration parameters.
19+
6. Select **Save hostname**.

src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration.mdx renamed to src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/origin-parameters.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
pcx_content_type: reference
3-
title: Origin configuration
3+
title: Origin configuration parameters
44
sidebar:
55
order: 3
66

77
---
88

9-
Origin configuration parameters determine how `cloudflared` proxies traffic to your origin server. You can configure these settings [in the dashboard](/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/#update-origin-configuration) for remotely-managed tunnels, or add them to your [configuration file](/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/configuration-file/#origin-configuration) for locally-managed tunnels.
9+
You can use the following parameters to configure how `cloudflared` proxies traffic to your origin server.
1010

1111
## TLS settings
1212

@@ -111,7 +111,7 @@ This configures what type of proxy will be started. Valid options are:
111111

112112
:::note
113113

114-
For locally-managed tunnels only.
114+
For locally-managed tunnels only.
115115
:::
116116

117117
| Default | UI name |
@@ -125,7 +125,7 @@ This configures the listen address for that proxy.
125125

126126
:::note
127127

128-
For locally-managed tunnels only.
128+
For locally-managed tunnels only.
129129
:::
130130

131131
| Default | UI name |
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,15 @@
11
---
22
pcx_content_type: how-to
3-
title: Remotely-managed tunnel
3+
title: Tunnel permissions
44
sidebar:
5-
order: 1
5+
order: 10
66
---
77

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

10-
If you created a Cloudflare Tunnel [from the dashboard](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/), the tunnel runs as a service on your OS.
11-
12-
## Add tunnel run parameters
13-
14-
You can modify the Cloudflare Tunnel service with one or more [general-purpose tunnel parameters](/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-run-parameters/).
15-
16-
<Tabs> <TabItem label="Linux">
17-
18-
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:
19-
20-
1. Open `cloudflared.service`.
21-
22-
```sh
23-
sudo systemctl edit --full cloudflared.service
24-
```
25-
26-
2. Modify the `cloudflared tunnel run` command with the desired configuration flag. For example,
27-
28-
```txt null {8}
29-
[Unit]
30-
Description=Cloudflare Tunnel
31-
After=network.target
32-
33-
[Service]
34-
TimeoutStartSec=0
35-
Type=notify
36-
ExecStart=/usr/local/bin/cloudflared tunnel --loglevel debug --logfile /var/log/cloudflared/cloudflared.log run --token <TOKEN VALUE>
37-
Restart=on-failure
38-
RestartSec=5s
39-
40-
[Install]
41-
WantedBy=multi-user.target
42-
```
43-
44-
3. Restart `cloudflared.service`:
45-
46-
```sh
47-
sudo systemctl restart cloudflared
48-
```
49-
50-
4. To verify the new configuration, check the service status:
51-
52-
```sh
53-
sudo systemctl status cloudflared
54-
```
55-
```sh output
56-
● cloudflared.service - cloudflared
57-
Loaded: loaded (/etc/systemd/system/cloudflared.service; enabled; preset: enabled)
58-
Active: active (running) since Wed 2024-10-09 20:02:59 UTC; 2s ago
59-
Main PID: 2157 (cloudflared)
60-
Tasks: 8 (limit: 1136)
61-
Memory: 16.3M
62-
CPU: 136ms
63-
CGroup: /system.slice/cloudflared.service
64-
└─2157 /usr/bin/cloudflared tunnel --loglevel debug --logfile /var/log/cloudflared/cloudflared.log run --token eyJhIjoi...
65-
```
66-
67-
</TabItem> <TabItem label="macOS">
68-
69-
On macOS, Cloudflare Tunnel installs itself as a launch agent using `launchctl`. By default, the agent will be called `com.cloudflare.cloudflared`. To configure your tunnel on macOS:
70-
71-
1. Stop the `cloudflared` service.
72-
73-
```sh
74-
sudo launchctl stop com.cloudflare.cloudflared
75-
```
76-
77-
2. Unload the configuration file.
78-
79-
```sh
80-
sudo launchctl unload /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
81-
```
82-
83-
3. Open `/Library/LaunchDaemons/com.cloudflare.cloudflared.plist` in a text editor.
84-
85-
4. Modify the `ProgramArguments` key with the desired configuration flag. For example,
86-
87-
```txt
88-
<plist version="1.0">
89-
<dict>
90-
<key>Label</key>
91-
<string>com.cloudflare.cloudflared</string>
92-
<key>ProgramArguments</key>
93-
<array>
94-
<string>/opt/homebrew/bin/cloudflared</string>
95-
<string>tunnel</string>
96-
<string>--logfile</string>
97-
<string><PATH></string>
98-
<string>--loglevel</string>
99-
<string>debug</string>
100-
<string>run</string>
101-
<string>--token</string>
102-
<string><TOKEN VALUE> </string>
103-
</array>
104-
```
105-
106-
5. Load the updated configuration file.
107-
108-
```sh
109-
sudo launchctl load /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
110-
```
111-
112-
6. Start the `cloudflared` service.
113-
114-
```sh
115-
sudo launchctl start com.cloudflare.cloudflared
116-
```
117-
118-
</TabItem> <TabItem label="Windows">
119-
120-
On Windows, Cloudflare Tunnel installs itself as a system service using the Registry Editor. By default, the service will be named `cloudflared`. To configure your tunnel on Windows:
121-
122-
1. Open the Registry Editor.
123-
124-
2. Go to **HKEY_LOCAL_MACHINE** > **SYSTEM** > **CurrentControlSet** > **Services** > **cloudflared**.
125-
126-
3. Double-click **ImagePath**.
127-
128-
4. Modify **Value data** with the desired configuration flag. For example,
129-
130-
```txt
131-
C:\Program Files (x86)\cloudflared\.\cloudflared.exe tunnel --loglevel debug --logfile <PATH> run --token <TOKEN VALUE>
132-
```
133-
134-
![Modify cloudflared service in the Registry Editor](~/assets/images/cloudflare-one/connections/connect-apps/remote-management-windows.png)
135-
136-
</TabItem> </Tabs>
137-
138-
## Update origin configuration
139-
140-
To configure how `cloudflared` sends requests to your [public hostname](/cloudflare-one/connections/connect-networks/routing-to-tunnel/) services:
141-
142-
1. In [Zero Trust](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**.
143-
2. Choose a tunnel and select **Configure**.
144-
3. Select the **Public Hostname** tab.
145-
4. Choose a route and select **Edit**.
146-
5. Under **Additional application settings**, modify one or more [origin configuration parameters](/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/).
147-
6. Select **Save hostname**.
148-
149-
## Tunnel permissions
150-
15110
A remotely-managed tunnel only requires the tunnel token to run. Anyone with access to the token will be able to run the tunnel.
15211

153-
### View the tunnel token
12+
## View the tunnel token
15413

15514
To get the token for a remotely-managed tunnel:
15615

@@ -178,7 +37,7 @@ Make a `GET` request to the [Cloudflare Tunnel token](/api/resources/zero_trust/
17837
</TabItem>
17938
</Tabs>
18039

181-
### Rotate a token without service disruption
40+
## Rotate a token without service disruption
18241

18342
Cloudflare recommends rotating the tunnel token at a regular cadence to reduce the risk of token compromise. You can rotate a token with minimal disruption to users as long as the tunnel is served by at least two [`cloudflared` replicas](/cloudflare-one/connections/connect-networks/deploy-tunnels/deploy-cloudflared-replicas/). To ensure service availability, we recommend performing token rotations outside of working hours or in a maintenance window.
18443

@@ -272,7 +131,7 @@ To rotate a tunnel token:
272131

273132
The tunnel token is now fully rotated. The old token is no longer in use.
274133

275-
### Rotate a compromised token
134+
## Rotate a compromised token
276135

277136
If your tunnel token is compromised, we recommend taking the following steps:
278137

@@ -304,6 +163,6 @@ If your tunnel token is compromised, we recommend taking the following steps:
304163

305164
The tunnel token is now fully rotated. The old token is no longer in use.
306165

307-
### Account-scoped roles
166+
## Account-scoped roles
308167

309168
<Render file="tunnel/account-scoped-roles" />
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: concept
33
title: Tunnel availability and failover
44
sidebar:
5-
order: 2
5+
order: 4
66
---
77

88
import { Details, GlossaryTooltip } from "~/components";
@@ -25,7 +25,7 @@ By design, replicas do not offer any level of traffic steering (random, hash, or
2525

2626
To deploy multiple instances of `cloudflared`, you can create and configure one tunnel and run it on multiple hosts. If your tunnel runs as a service, only one `cloudflared` instance is allowed per host.
2727

28-
<Details header="Via the dashboard">
28+
<Details header="Remotely-managed tunnels">
2929

3030
1. To create a remotely-managed tunnel, follow the [dashboard setup guide](/cloudflare-one/connections/connect-networks/get-started/create-remote-tunnel/).
3131
2. On the **Tunnels** page, select your newly created tunnel. The **Connectors** section shows all of the `cloudflared` instances for that tunnel.
@@ -37,11 +37,11 @@ The new replica will appear on the **Connectors** list for the tunnel.
3737

3838
</Details>
3939

40-
<Details header="Via the command line">
40+
<Details header="Locally-managed tunnels">
4141

4242
1. To create a locally-managed tunnel, complete Steps 1 through 5 in the [CLI setup guide](/cloudflare-one/connections/connect-networks/get-started/create-local-tunnel/).
4343

44-
2. Next, run your newly created tunnel.
44+
2. Run your newly created tunnel.
4545

4646
```sh
4747
cloudflared tunnel run <NAME>
@@ -57,7 +57,7 @@ The new replica will appear on the **Connectors** list for the tunnel.
5757

5858
This will initialize another `cloudflared` instance and generate another `connector_id`.
5959

60-
4. Next, run `tunnel info` to show each `cloudflared` instance running your tunnel:
60+
4. Run `tunnel info` to show each `cloudflared` instance running your tunnel:
6161

6262
```sh
6363
cloudflared tunnel info <NAME>

src/content/docs/cloudflare-one/connections/connect-networks/deploy-tunnels/system-requirements.mdx renamed to src/content/docs/cloudflare-one/connections/connect-networks/configure-tunnels/tunnel-availability/system-requirements.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: concept
33
title: System requirements
44
sidebar:
5-
order: 3
5+
order: 6
66
---
77

88
import { Render, TabItem, Tabs, TunnelCalculator } from "~/components";

0 commit comments

Comments
 (0)