Update cloudflared
Last updated Sep 11, 2026
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 or by using multiple cloudflared instances.
Update the cloudflared service
Refer to the following commands to update cloudflared for a remotely-managed tunnel or a locally-managed tunnel. Locally-managed tunnels must be set up to run as a service for the following commands to execute successfully.
Run the following command:
cloudflared update
After running cloudflared update to update cloudflared, you must restart the service for it to take effect. Run:
net start cloudflared
- Update the
cloudflaredpackage:
brew upgrade cloudflared
- Restart the service:
sudo launchctl stop com.cloudflare.cloudflared
sudo launchctl unload /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
sudo launchctl load /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
sudo launchctl start com.cloudflare.cloudflared
If installed via apt:
- Update the
cloudflaredpackage:
sudo apt-get update && sudo apt-get install --only-upgrade cloudflared
- Restart the service:
sudo systemctl restart cloudflared.service
If installed via dpkg -i:
Use the following commands if you installed cloudflared using the dpkg 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.
- Update the
cloudflaredpackage:
curl --location --output cloudflared.deb "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-$(dpkg --print-architecture).deb" && sudo dpkg -i cloudflared.deb
- Restart the service:
sudo systemctl restart cloudflared.service
- Update the
cloudflaredpackage:
sudo yum update cloudflared
- Restart the service:
sudo systemctl restart cloudflared.service
If you created a remotely-managed tunnel using the dashboard:
- In the Cloudflare dashboard, go to Networking > Tunnels. Go to Tunnels ↗
- Select your tunnel to open its detail page.
- On the Overview tab, copy the Docker installation command. The copied command will contain your token.
- Paste this command into a terminal window.
This command creates a new container from the latest cloudflared image. You can now delete the old container.
Caution
Cloudflare recommends creating remotely-managed tunnels when working with Docker.
If you created a remotely or locally-managed tunnel using the API, run the following command:
docker run --pull always cloudflare/cloudflared:latest tunnel --no-autoupdate run --token <TOKEN>
If you created a locally-managed tunnel using the CLI:
- Mount your local
.cloudflareddirectory into the Docker container using a volume. - Run the following command to update
cloudflared:
sh
docker run --pull always -v <PATH-TO-YOUR-LOCAL-CLOUDFLARED>:/home/nonroot/.cloudflared cloudflare/cloudflared:latest tunnel --no-autoupdate run <TUNNEL-ID>
If you installed cloudflared from GitHub-provided binaries or from source, run the following command:
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.
Update with Cloudflare Load Balancer
You can update cloudflared without downtime by using Cloudflare's Load Balancer product with your Cloudflare Tunnel deployment.
- Install a new instance of
cloudflaredand create a new Tunnel. - Configure the instance to point traffic to the same locally-available service as your current, active instance of
cloudflared. - Add the address of the new instance of
cloudflaredinto your Load Balancer pool as priority 2. - Swap the priority such that the new instance is now priority 1 and monitor to confirm traffic is being served.
- Once confirmed, you can remove the older version from the Load Balancer pool.
Update with multiple cloudflared instances
If you are not using Cloudflare's Load Balancer, you can use multiple instances of cloudflared to update without the risk of downtime.
- Install a new instance of
cloudflaredand create a new Tunnel. - Configure the instance to point traffic to the same locally-available service as your current, active instance of
cloudflared. - In the Cloudflare DNS dashboard, replace the address of the current instance of
cloudflaredwith the address of the new instance. Save the record. - Remove the now-inactive instance of
cloudflared.
Traffic handling
When the old replica is stopped, it will drop long-lived HTTP requests (for example, WebSocket) and TCP connections (for example, SSH). UDP flows will also be dropped, as they are modeled based on timeouts. When the new replica connects, it will handle all new traffic, including new HTTP requests, TCP connections, and UDP flows.
Run multiple instances in Windows
Windows systems require services to have a unique name and display name. You can run multiple instances of cloudflared by creating cloudflared services with unique names.
- Install and configure
cloudflared. - Next, create a service with a unique name and point to the
cloudflaredexecutable and configuration file.
sc.exe create <unique-name> binPath='<path-to-exe>' --config '<path-to-config>' displayname="Unique Name"
- Proceed to create additional services with unique names.
- You can now start each unique service.
sc.exe start <unique-name>
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/tunnel/guides/update-cloudflared/#page","headline":"Update cloudflared","description":"Update cloudflared to the latest version.","url":"https://developers.cloudflare.com/tunnel/guides/update-cloudflared/","inLanguage":"en","image":"https://developers.cloudflare.com/tunnel/guides/update-cloudflared/og.png?v=6bc81ae3c578f131","dateModified":"2026-09-11","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["Docker"]}
description: Tutorials for Cloudflare Tunnel integrations and monitoring. title: Tutorials image: https://developers.cloudflare.com/tunnel/tutorials/og.png?v=51db9c028b0ece83
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/tunnel/llms.txt
Use this file to discover all available pages before exploring further.
Docs