Skip to content

cloudflare/cloudflared

Folders and files

NameName
Last commit message
Last commit date

Latest commit

86e8585 · Apr 10, 2025
Sep 25, 2024
Jun 25, 2020
Jan 30, 2025
Dec 25, 2022
Mar 19, 2024
Apr 11, 2022
Apr 1, 2025
Jan 30, 2025
Jan 20, 2025
Feb 25, 2025
Apr 1, 2025
Oct 25, 2024
Feb 6, 2025
Oct 15, 2024
Jan 30, 2025
Jan 30, 2025
Jan 20, 2025
Jul 17, 2023
Jan 20, 2025
Apr 5, 2023
May 6, 2022
Apr 1, 2025
Apr 1, 2025
Dec 11, 2024
Jan 20, 2025
Feb 6, 2025
Jun 8, 2020
Nov 27, 2024
Jan 20, 2025
Jan 20, 2025
Apr 1, 2025
Mar 5, 2019
Jul 17, 2023
Apr 10, 2024
Jul 6, 2023
Feb 25, 2025
Jul 17, 2023
Feb 25, 2025
Nov 11, 2024
Jul 17, 2023
Jan 22, 2025
Nov 25, 2024
Nov 11, 2024
Feb 3, 2025
Jul 26, 2023
Dec 25, 2022
Oct 4, 2022
Sep 21, 2021
Oct 31, 2024
Jan 16, 2025
Jan 30, 2025
Feb 26, 2025
Feb 26, 2025
Feb 26, 2025
Mar 8, 2022
Apr 1, 2025
Apr 1, 2025
Apr 1, 2025
Jan 30, 2025
Aug 5, 2024
Apr 10, 2025
Mar 6, 2025
Dec 20, 2021
Dec 14, 2023
Jul 6, 2020
Jan 30, 2025
Nov 7, 2022
Oct 11, 2022
Oct 24, 2024
Feb 3, 2025
Feb 3, 2025
Jul 10, 2020
Mar 7, 2024
Jan 6, 2025
Jun 25, 2020

Cloudflare Tunnel client

Contains the command-line client for Cloudflare Tunnel, a tunneling daemon that proxies traffic from the Cloudflare network to your origins. This daemon sits between Cloudflare network and your origin (e.g. a webserver). Cloudflare attracts client requests and sends them to you via this daemon, without requiring you to poke holes on your firewall --- your origin can remain as closed as possible. Extensive documentation can be found in the Cloudflare Tunnel section of the Cloudflare Docs. All usages related with proxying to your origins are available under cloudflared tunnel help.

You can also use cloudflared to access Tunnel origins (that are protected with cloudflared tunnel) for TCP traffic at Layer 4 (i.e., not HTTP/websocket), which is relevant for use cases such as SSH, RDP, etc. Such usages are available under cloudflared access help.

You can instead use WARP client to access private origins behind Tunnels for Layer 4 traffic without requiring cloudflared access commands on the client side.

Before you get started

Before you use Cloudflare Tunnel, you'll need to complete a few steps in the Cloudflare dashboard: you need to add a website to your Cloudflare account. Note that today it is possible to use Tunnel without a website (e.g. for private routing), but for legacy reasons this requirement is still necessary:

  1. Add a website to Cloudflare
  2. Change your domain nameservers to Cloudflare

Installing cloudflared

Downloads are available as standalone binaries, a Docker image, and Debian, RPM, and Homebrew packages. You can also find releases here on the cloudflared GitHub repository.

User documentation for Cloudflare Tunnel can be found at https://developers.cloudflare.com/cloudflare-one/connections/connect-apps

Creating Tunnels and routing traffic

Once installed, you can authenticate cloudflared into your Cloudflare account and begin creating Tunnels to serve traffic to your origins.

TryCloudflare

Want to test Cloudflare Tunnel before adding a website to Cloudflare? You can do so with TryCloudflare using the documentation available here.

Deprecated versions

Cloudflare currently supports versions of cloudflared that are within one year of the most recent release. Breaking changes unrelated to feature availability may be introduced that will impact versions released more than one year ago. You can read more about upgrading cloudflared in our developer documentation.

For example, as of January 2023 Cloudflare will support cloudflared version 2023.1.1 to cloudflared 2022.1.1.

Development

Requirements

Build

To build cloudflared locally run make cloudflared

Test

To locally run the tests run make test

Linting

To format the code and keep a good code quality use make fmt and make lint

Mocks

After changes on interfaces you might need to regenerate the mocks, so run make mock