---
description: Run cloudflared as a system service on Linux, macOS, or Windows.
title: Run as a service
image: https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/og.png?v=e7c0d83fa37c99e9
---

[Skip to content](#main-content)

> 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.

# Run as a service

Last updated Sep 11, 2026|Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

You can install `cloudflared` as a system service on Linux and Windows, and as a launch agent on macOS. In most cases, we recommend running `cloudflared` as a service. Running as a service helps ensure the availability of `cloudflared` to your origin by allowing the program to start at boot and continue running while your origin is online.

Follow our guides to set up and run `cloudflared` as a service in your environment:

- [Linux](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/linux/)
- [macOS](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/macos/)
- [Windows](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/windows/)

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"WebPage","@id":"https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/#page","headline":"Run as a service","description":"Run cloudflared as a system service on Linux, macOS, or Windows.","url":"https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/","inLanguage":"en","image":"https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/as-a-service/og.png?v=e7c0d83fa37c99e9","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/"}}
```
