Skip to main content

Cloudflared Commands and Configuration

Configuration File Location

  • Linux: /etc/cloudflared
  • Credentials File: /root/.cloudflared/<TunnelUUID>.json

Configuration File (config.yml)

Example configuration for the file located at ~/.cloudflared/config.yml:
tunnel: <TunnelUUID>
credentials-file: /root/.cloudflared/<TunnelUUID>.json

ingress:
  - hostname: myhome.smartghar.org
    service: http://192.168.0.1
  - service: http_status:404

Commands

  1. Update Cloudflared:
    cloudflared update
    
  2. Login to Cloudflare:
    cloudflared login
    
  3. Create a New Tunnel:
    cloudflared tunnel create <YourTunnelName>
    
  4. Edit Configuration:
    sudo nano ~/.cloudflared/config.yml
    
  5. Route DNS to Tunnel:
    cloudflared tunnel route dns <TunnelName> <hostname>
    
  6. Run the Tunnel:
    cloudflared tunnel run <TunnelName>
    

Revision History

  • Revision #4
  • Created: 17 November 2023 12:40:11 by Admin
  • Updated: 9 December 2023 21:42:53 by Admin

Feel free to adjust the <TunnelUUID>, <YourTunnelName>, and <hostname> with your actual values. If you have any specific questions or need further details, let me know!