This guide covers setting up a Cloudflare Tunnel to expose your local Cyrus instance to the public internet for receiving Linear webhooks.
Note: This is one option for exposing your Cyrus instance. Other options include ngrok, a reverse proxy with a public domain, or a server with a public IP. See Self-Hosting Guide for alternatives.
- A Cloudflare account (free tier works)
- Your own domain added to Cloudflare (required for permanent tunnels)
Note: Free
trycloudflare.comURLs are only for temporary quick tunnels and change on restart.
- Go to https://cloudflare.com
- Click Sign up
- Create free account
- Verify email
-
Log in to Cloudflare Dashboard:
-
Navigate to Tunnels:
- In left sidebar: Click Access
- Then click Tunnels
-
Create New Tunnel:
- Click Create a tunnel
- Name it:
cyrus-local - Click Save tunnel
-
Copy Tunnel Token:
- You'll see a long token starting with
eyJ... - Click Copy or select and copy the entire token
- SAVE THIS - you'll need it for environment variables
- You'll see a long token starting with
-
Configure Public Hostname:
- Click Next or go to tunnel settings
- Click Public Hostname tab
- Click Add a public hostname
Fill in:
- Subdomain:
cyrus(or whatever you want) - Domain: Select your domain from dropdown
- Path: Leave empty
- Type: HTTP
- URL:
localhost:3456
-
Save Hostname:
- Click Save hostname
- Copy the full public URL (e.g.,
https://cyrus.yourdomain.com) - SAVE THIS - this is your
CYRUS_BASE_URL
Set these environment variables for Cloudflare Tunnel integration:
export CYRUS_BASE_URL=https://cyrus.yourdomain.com
export CYRUS_SERVER_PORT=3456
export CLOUDFLARE_TOKEN=eyJhIjoiXXXXXXX...your_token_here...XXXXXXXCyrus will automatically start the Cloudflare tunnel in the background when it detects the CLOUDFLARE_TOKEN environment variable.
If you see an error like "Timeout waiting for Cloudflare tunnel (0/4 connections)", this indicates that the cloudflared binary cannot establish connections to Cloudflare's edge network. This is almost always a network/firewall configuration issue.
Common Causes:
-
Corporate Firewall: Your organization's firewall may be blocking
cloudflaredconnections- Contact your IT department about allowing Cloudflare tunnel connections
- See Cloudflare's connectivity prechecks
-
VPN Interference: Active VPNs may prevent tunnel establishment
- Try temporarily disabling your VPN
- Some VPNs have split-tunneling options that may help
-
Network Proxy: If you're behind a proxy,
cloudflaredneeds configuration- Set environment variables:
HTTP_PROXY,HTTPS_PROXY - See Cloudflare's proxy documentation
- Set environment variables:
-
Invalid Token: Ensure your token hasn't expired
- Check token in Cloudflare dashboard: https://one.dash.cloudflare.com/
- Regenerate token if needed
Alternative Solutions:
If you cannot resolve the connectivity issue, consider these alternatives:
- Use ngrok instead of Cloudflare tunnel
- Set up a reverse proxy on a server with a public IP
- Use a cloud VM with Docker to host Cyrus
- See Self-Hosting Guide for more options
- Verify
CLOUDFLARE_TOKENis set correctly - Check Cyrus logs for tunnel-related errors
- Ensure the token hasn't expired in Cloudflare dashboard
- Verify the public hostname is configured correctly in Cloudflare
- Check that
CYRUS_BASE_URLmatches your Cloudflare hostname exactly - Ensure Linear webhook URL uses the same base URL
For quick testing without a domain, you can use Cloudflare's quick tunnel feature, but note that the URL changes on each restart:
# This is not recommended for production use
cloudflared tunnel --url http://localhost:3456For production self-hosting, use a permanent tunnel with your own domain.