docs / https / cloudflared
.cloudflarED
- wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
- dpkg -i cloudflared-linux-amd64.deb
- 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
cloudflared tunnel create
cd ~/.cloudflared
nano config.yml
textcopy
tunnel: TUNNEL-UUID
credentials-file: /home/.cloudflared/.json
ingress:
- hostname: your.domain.com
service: http://localhost:8000
- service: http_status:404cloudflared tunnel route dns <your-subdomain.yourdomain.com>
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
cloudflared –config ~/.cloudflared/config.yml service install
systemctl start cloudflared
systemctl status cloudflared