docs / https / cloudflared

.cloudflarED

https updated 2025-06-20
  1. wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
  2. dpkg -i cloudflared-linux-amd64.deb
  3. cloudflared tunnel login
  • This will open a browser window with a Cloudflare login prompt.
  • Log in and select your domain.
  • After successful authentication, a certificate file (cert.pem) will be saved in ~/.cloudflared
  1. cloudflared tunnel create

  2. cd ~/.cloudflared

  3. nano config.yml

textcopy
tunnel: TUNNEL-UUID
credentials-file: /home/.cloudflared/.json
ingress: 
  - hostname: your.domain.com
    service: http://localhost:8000
  - service: http_status:404
  1. cloudflared tunnel route dns <your-subdomain.yourdomain.com>

  2. Log in to the Cloudflare dashboard and select your domain (xh.lc). Go to the DNS section. Click Add record. Set the following values: Type: CNAME Name: immortal (or the subdomain you want, e.g., immortal for immortal.xh.lc) Target: .cfargotunnel.com Replace with your tunnel’s actual UUID, for example: 12345678-abcd-1234-abcd-123456abcdef.cfargotunnel.com Ensure Proxy status is enabled (orange cloud icon). Click Save

  3. cloudflared –config ~/.cloudflared/config.yml service install

  4. systemctl start cloudflared

  5. systemctl status cloudflared