Help setting up multiple tunnels on the same machine
Hey, i am having some trouble setting up multiple tunnels on the same machine.
I would like to run 2 or more tunnels on one ubuntu machine.
13 Replies
for what specific reason? You really shouldn't need to in 99% of cases, just add more public hostnames/routes the existing tunnel
I need multiple websites with different domain names
A single tunnel can point to multiple domains, as long as they are on the same account
I need to have 3 websites, 2 are on the same account, one is not
But I am a collaborator
Do you have Docker on that machine?
No, I dont
You are able to run multiple tunnels together using
TUNNEL_TOKEN=sometoken cloudflared tunnel run
. The issue is that this won't persist across restarts
You would need something to call this command for every tunnel you want on startupthat's a bit of a problem
cloudflared
does have a service you can install. The reason that doesn't work though is that you can only have one installed at a timeyou said that i could get multiple websites working with a single tunnel, i think i might ask my friend to trasnfer ownership or something
that would work, right?
Yeah. As long as all of the domains are within your account, then you should be able to create a single tunnel that covers all of them
Actually, just got someone to show me another way. Let me check it to be sure, then I'll share
thanks
did you find it by any chance?
I have the setup, but I haven’t been able to get it to work myself, unfortunately
Let me copy it over, then you can see if it works for you
Create/replace the file
/etc/systemd/system/[email protected]
with , then run systemctl daemon-reload
. Place each config in /etc/cloudflared/
, then start it with systemctl enable --now cloudflared@config-name