Home > Software

โ˜๏ธ๐Ÿ›ก๏ธ Cloudflare Tunnel (cloudflared)

๐Ÿค– AI Summary

๐Ÿ‘‰ What Is It?

  • โ˜๏ธ๐Ÿ›ก๏ธ Cloudflare Tunnel (cloudflared) is a tool that creates a secure connection between your local server and Cloudflareโ€™s network.
  • ๐Ÿ“ฑ It lets you expose local development servers to the internet without configuring firewalls or routers.
  • ๐Ÿ” Traffic is encrypted and routed through Cloudflare, adding security and DDoS protection.

๐Ÿš€ Common Use Cases

  • ๐Ÿ“ฑ Expose local development servers to your phone for testing
  • ๐ŸŒ Share local sites with others without deploying
  • ๐Ÿ”’ Add Cloudflareโ€™s security layer to self-hosted services
  • ๐Ÿ  Access home network services remotely

๐Ÿ’ป Installation

# Download cloudflared  
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64  
  
# Make executable  
chmod +x cloudflared-linux-amd64  
  
# Run tunnel  
./cloudflared tunnel --url http://127.0.0.1:4096  

๐Ÿ”ง Basic Usage

# Simple tunnel to local server  
cloudflared tunnel --url http://localhost:3000  
  
# Create a named tunnel  
cloudflared tunnel create my-tunnel  
cloudflared tunnel route dns my-tunnel example.example.com  
cloudflared tunnel run my-tunnel