Expose localhost to the network using Cloudflare Tunnel

Install cloudflared

Download from: https://github.com/cloudflare/cloudflared/releases

Change Dir

cd C:\cloudflared\

Login to Cloudflare

cloudflared tunnel login

Create tunnel

cloudflared tunnel create nextjs-tunnel…


This content originally appeared on DEV Community and was authored by MUHAMMAD ARBAB ANJUM

Install cloudflared

Download from: https://github.com/cloudflare/cloudflared/releases

Change Dir

cd C:\cloudflared\

Login to Cloudflare

cloudflared tunnel login

Create tunnel

cloudflared tunnel create nextjs-tunnel

Route DNS

cloudflared tunnel route dns nextjs-tunnel test.myworkly.com

Create config.yml file in C:\cloudflared\config.yml

tunnel: nextjs-tunnel
credentials-file: C:\Users\%USERNAME%\.cloudflared\[your-tunnel-id].json

ingress:
  - hostname: test.domain.com
    service: http://localhost:3000
  - service: http_status:404

Quick Test

cloudflared tunnel --hostname test.domain.com --url http://localhost:3000

Run tunnel pointing directly to Next.js

cloudflared tunnel --config config.yml run nextjs-tunnel


This content originally appeared on DEV Community and was authored by MUHAMMAD ARBAB ANJUM


Print Share Comment Cite Upload Translate Updates
APA

MUHAMMAD ARBAB ANJUM | Sciencx (2025-08-25T23:41:55+00:00) Expose localhost to the network using Cloudflare Tunnel. Retrieved from https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/

MLA
" » Expose localhost to the network using Cloudflare Tunnel." MUHAMMAD ARBAB ANJUM | Sciencx - Monday August 25, 2025, https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/
HARVARD
MUHAMMAD ARBAB ANJUM | Sciencx Monday August 25, 2025 » Expose localhost to the network using Cloudflare Tunnel., viewed ,<https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/>
VANCOUVER
MUHAMMAD ARBAB ANJUM | Sciencx - » Expose localhost to the network using Cloudflare Tunnel. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/
CHICAGO
" » Expose localhost to the network using Cloudflare Tunnel." MUHAMMAD ARBAB ANJUM | Sciencx - Accessed . https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/
IEEE
" » Expose localhost to the network using Cloudflare Tunnel." MUHAMMAD ARBAB ANJUM | Sciencx [Online]. Available: https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/. [Accessed: ]
rf:citation
» Expose localhost to the network using Cloudflare Tunnel | MUHAMMAD ARBAB ANJUM | Sciencx | https://www.scien.cx/2025/08/25/expose-localhost-to-the-network-using-cloudflare-tunnel/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.