---
title: "Deploy Cloudflare Tunnel"
description: "Paste a Cloudflare API token, a hostname, and your origin URL."
category: "Other"
url: https://railway.com/deploy/cloudflare-tunnel
---

# Deploy Cloudflare Tunnel

Paste a Cloudflare API token, a hostname, and your origin URL.

**[Deploy Cloudflare Tunnel on Railway](https://railway.com/template/cloudflare-tunnel)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/cloudflare-tunnel/manifest.json

- **Creator:** Pagetree's Projects
- **Category:** Other

## Template content

### Cloudflared https://www.cloudflare.com/favicon.ico

- **Image:** cloudflare/cloudflared:2026.9.0
- **Start command:** `cloudflared tunnel --no-autoupdate --metrics 0.0.0.0:8080 run`
- **Health check:** /ready

## Documentation

# Deploy and Host Cloudflare Tunnel with Railway

Paste three things. This service publishes a private Railway app on your own domain through Cloudflare.

## About Hosting Cloudflare Tunnel

This is one connector. It stays private on Railway. Visitors hit your domain on Cloudflare. Cloudflare talks to your app over Railway private networking.

## Common Use Cases

* Put your own domain in front of a Railway app
* Keep the app off Railway public networking
* Front n8n, MinIO, dashboards, or APIs with Cloudflare

## Dependencies for Cloudflare Tunnel Hosting

* A Cloudflare account
* A domain already on Cloudflare nameservers
* The Railway service you want public, already running in the same project

### Deployment Dependencies

* [Create a Cloudflare API token](https://dash.cloudflare.com/profile/api-tokens)
* [Private networking on Railway](https://docs.railway.com/networking/private-networking)

### Implementation Details

The deploy form asks for three values. Nothing else.

**CLOUDFLARE_API_TOKEN**
Open [Create API token](https://dash.cloudflare.com/profile/api-tokens). Create a token with Cloudflare Tunnel Edit, DNS Edit, and Zone Read. Paste the token.

**TUNNEL_HOSTNAME**
The public hostname you want, like `minio.yourdomain.com`. That domain has to already sit on Cloudflare.

**ORIGIN_URL**
The private URL of the Railway service to publish. Use the service name and its port:

```text
http://SERVICE_NAME.railway.internal:PORT
```

Examples:

```text
http://minio.railway.internal:9001
http://rabbitmq.railway.internal:15672
http://n8n.railway.internal:5678
```

Do not add a public Railway domain on this connector. After deploy, open `https://your-hostname`.

### Why Deploy Cloudflare Tunnel on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Cloudflare Tunnel on Railway, you are one step closer to supporting a complete full-stack application.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/cloudflare-tunnel
