Cloudflared
Tunnel
Tunneling your local services to the internet using Cloudflare Tunnel.
Installation for Ubuntu/Debian
-
Add Cloudflare's package signing key:
bash -
Add Cloudflare's apt repo to your apt repositories:
bash -
Update repositories and install cloudflared:
bash
Authenticate cloudflared
-
Login:
bash - Using given link login
Cloudflare
account, which tunnel will be connected via browser.
- Using given link login
-
Create a tunnel and give it a name
bash
Tunnel configuration
-
Editing
config.yml
file:Configuration file located in following path:
/home/$user/.cloudflared/config.yml
[tunnel_id].jsoncert.pemconfig.ymlExample
config.yml
content:config.yml -
Adding record:
After editing configuration file you need to add record to your domian in cloudflare:
DNS
>Records
Example record fonfiguration:
Type Name Target CNAME yourdomain tunnel_id.cfargotunnel.com CNAME subdomain tunnel_id.cfargotunnel.com
Running the tunnel
-
Manually running
To run latest tunnel:
bash To run the tunnel with given name or UUID
bash -
Run via service
Install
cloudflared
service:bash Start service:
bash Example
cloudflared.service
content:cloudflared.service You can change config file path according to yoursRestart the service:
bash Check service status:
bash