Skip to main content

Creating Tunnels

Step-by-step guide to creating, configuring, and managing Cloudflare Tunnels in Xermius.

Creating Standard Tunnel

Step 1: Open Cloudflare Tunnels

Sidebar → "Cloudflare Tunnels"

Step 2: Create New Tunnel

Click: "New Tunnel" button

Dialog opens:
┌────────────────────────────────────────┐
│ New Cloudflare Tunnel │
├────────────────────────────────────────┤
│ Name: * │
│ [My Dev Server ] │
│ │
│ Local Port: * │
│ [3000 ] │
│ │
│ Description: │
│ [Development server for React app] │
│ │
│ Options: │
│ [✓] Auto-start │
│ │
│ [Cancel] [Create] │
└────────────────────────────────────────┘

Step 3: Fill Configuration

Name:

Descriptive name for the tunnel

Examples:
✓ "Frontend Dev Server"
✓ "API Backend - Staging"
✓ "Mobile App Preview"

Avoid:
✗ "Tunnel 1"
✗ "Test"

Local Port:

Port where your service runs

Common ports:
- 3000 (React, Next.js)
- 8080 (Spring Boot, Tomcat)
- 5000 (Flask, Django dev)
- 4200 (Angular)
- 8000 (Django, Python HTTP)

Your service MUST be running on this port!

Description (Optional):

What this tunnel is for
Helps remember later

Auto-start (Optional):

[✓] Auto-start
Starts automatically when Xermius launches

Good for:
- Daily development
- Always-running services

Step 4: Create & Start

Click "Create"

Tunnel created but not started yet

Click "Start" button
→ Tunnel starting...
→ Connecting to Cloudflare...
→ Public URL generated!

URL shown:
https://brilliant-mountain-2f3d.trycloudflare.com

Step 5: Test & Use

1. Copy public URL

2. Open in browser
Should see your local service!

3. Share URL with others

4. They can access your local service

Creating Request Debugger

Special tunnel for webhook testing:

Step 1: New Request Debugger

Click: "New Tunnel" → "Request Debugger"

or

Click: "New Request Debugger" button

Step 2: Configure

┌────────────────────────────────────────┐
│ New Request Debugger │
├────────────────────────────────────────┤
│ Name: * │
│ [Webhook Testing ] │
│ │
│ Description: │
│ [Test Stripe webhooks ] │
│ │
│ Options: │
│ [✓] Auto-start │
│ │
│ [Cancel] [Create] │
└────────────────────────────────────────┘

No port needed!

  • Request Debugger has built-in server
  • Automatically finds available port
  • Just name it and start

Step 3: Start & Get URL

Click "Create"
Click "Start"

URL generated:
https://webhook-test-789.trycloudflare.com

Use this URL for webhooks!

Step 4: View Requests

Click tunnel to see details

Request Log:
┌────────────────────────────────────────┐
│ Recent Requests │
├────────────────────────────────────────┤
│ 2:45 PM POST /webhook │
│ Status: 200 │
│ [View Details] │
│ │
│ 2:40 PM GET / │
│ Status: 200 │
│ [View Details] │
└────────────────────────────────────────┘

Click "View Details" to see full request!

Managing Tunnels

Starting Tunnels

Method 1: Click "Start" button
Method 2: Toggle switch
Method 3: Right-click → "Start"

What happens:

1. Status: Starting...
2. cloudflared launches
3. Connects to Cloudflare
4. URL generated (5-10 seconds)
5. Status: Active ●
6. Public URL available

Stopping Tunnels

Method 1: Click "Stop" button
Method 2: Toggle switch off
Method 3: Right-click → "Stop"

What happens:

1. Status: Stopping...
2. cloudflared process killed
3. Status: Inactive ○
4. Public URL no longer works

Editing Tunnels

1. Click tunnel
2. Click "Edit" button
3. Change settings:
- Name
- Port (standard tunnel)
- Description
- Auto-start
4. Save

Note: Must restart tunnel for port changes

Deleting Tunnels

1. Stop tunnel (if running)
2. Right-click → "Delete"
3. Confirm deletion

Tunnel removed
Can't be recovered

Copying Public URL

Method 1: Click "Copy URL" button
Method 2: Right-click → "Copy URL"
Method 3: Click URL to copy

URL copied to clipboard!
Paste anywhere to share

Tunnel Status

Active ●

Status: Active
Color: Green

Means:
✓ Tunnel is running
✓ Public URL works
✓ Accessible from internet

Starting ◐

Status: Starting
Color: Yellow

Means:
⏳ Connecting to Cloudflare
⏳ Getting public URL
⏳ Wait a few seconds

Inactive ○

Status: Inactive
Color: Gray

Means:
○ Tunnel stopped
○ Not accessible
○ Start to use

Error ✗

Status: Error
Color: Red

Means:
✗ Failed to start
✗ Check logs for details
✗ Fix issue and retry

Common causes:
- Port not available
- Service not running
- cloudflared issue

Multiple Tunnels

Run several at once:

Example Setup:
┌────────────────────────────────────────┐
│ Active Tunnels (3) │
├────────────────────────────────────────┤
│ ● Frontend Dev :3000 │
│ https://abc-123.trycloudflare.com │
│ │
│ ● Backend API :8080 │
│ https://def-456.trycloudflare.com │
│ │
│ ● Request Debugger │
│ https://ghi-789.trycloudflare.com │
└────────────────────────────────────────┘

Each tunnel:
- Unique URL
- Different port
- Independent

Use case:

Full-stack development:
- Frontend: Port 3000
- Backend: Port 8080
- Webhooks: Request Debugger

All exposed simultaneously!

Auto-Start Tunnels

Configure auto-start:

Enable in tunnel settings:
[✓] Auto-start

Behavior:
1. Xermius launches
2. Auto-start tunnels start automatically
3. URLs generated
4. Ready to use immediately

Perfect for:
- Daily development workflow
- Consistent URLs (well, as consistent as free allows)
- No manual starting

Manage auto-start:

Settings → Cloudflare Tunnels

Auto-start Tunnels:
[✓] Frontend Dev
[✓] Backend API
[ ] Webhook Testing
[ ] Old Project

Tips & Best Practices

1. Name Descriptively

Good:
✓ "Client Demo - v2.0 Features"
✓ "Stripe Webhook Testing"
✓ "Mobile App API - iOS"

Easy to identify
Know what it's for

2. One Tunnel Per Service

Don't:
✗ Change port repeatedly on same tunnel

Do:
✓ Create separate tunnel for each service
✓ Start/stop as needed
✓ Keep organized

3. Stop Unused Tunnels

Not using? Stop it!

Saves:
- Computer resources
- Cloudflare resources
- Reduces clutter

4. Test Locally First

Before starting tunnel:
1. Ensure service runs locally
2. Test: http://localhost:PORT
3. Works? Then start tunnel
4. Doesn't work? Fix local issue first

5. Document URLs

Keep track:
Project: Mobile App
Tunnel: API Backend
URL: https://xyz-789.trycloudflare.com
Valid: Jan 17, 2024 (today only)

6. Use Request Debugger for Webhooks

Testing webhooks?
→ Use Request Debugger
→ Not standard tunnel

Why:
- See full request details
- No local server needed
- Logs everything
- Perfect for debugging

Troubleshooting

Tunnel Won't Start

Check 1: Service Running?

curl http://localhost:PORT

If fails → Service not running
Start service first

Check 2: Port Available?

# Check if port in use
lsof -i :PORT # Mac/Linux
netstat -ano | findstr :PORT # Windows

If in use → Use different port

Check 3: cloudflared OK?

Settings → Check cloudflared status
If not installed → Install it

Can't Access URL

Issue: URL doesn't work

Solutions:

1. Check tunnel status: Active?
If not → Start it

2. Test locally first:
curl http://localhost:PORT
Must work locally

3. Check service logs:
Any errors?

4. Restart tunnel:
Stop → Start

Wrong Content Shown

Issue: URL shows wrong service

Cause: Port mismatch

Fix:

1. Check which service runs on port
lsof -i :PORT

2. Edit tunnel
3. Change to correct port
4. Restart tunnel

Next Steps