Running cloudflared tunnel exits in the middle without doing anything

I run following command to run the tunnel but after some time the cloudflared process is gone i.e. tunnel has stopped

cloudflared tunnel --hostname jifa --logfile /wd/fresh-tunnel.log --loglevel debug --url http://localhost run my-tunnel > /dev/null 2>&1 &

So i am using dev null because inspite of giving --logfile it does logs to a file but also stdout to the console and run in foreground.

I just want to run my Cloudflare tunnel in background. Any help appreciated.

Trying it with nohup.

You can always try running your tunnel as a service, docs.

1 Like