Monitor hosts over VPN with docker #890
rallisf1
started this conversation in
Show and tell
Replies: 1 comment
|
Great write-up! Thanks for sharing this VPN/Tailscale setup for Docker users. This is a useful pattern for people running Pulse on Coolify or similar platforms that restrict network_mode. I'll add this to our docs or examples for reference. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When running Pulse on the host or with
network_mode: hostthere is really no need for this, but in my case I wanted to run Pulse over Coolify, which doesn't supportnetwork_mode: hostany more.The following docker compose example is for accessing remote hosts over tailscale. The key configuration is
network_mode: 'service:tailscale-client'. It supports:TS_SERVER--accept-routes. Keep in mind that you need to advertise each remote route on your remote hosts' tailscale clients, and enable them through your tailscale/headscale dashboard.You can use the Proxmox API with the tailnet IP (100.x.x.x), but you'll need to run the tailscale client directly on each host, which IMHO creates more problems than it solves (messes the local network routing).
On Proxmox servers I always run tailscale in an LXC and advertise the specific local IPs I want to be accessible.
Also note that when advertising multiple local networks, those networks must have a different subnet. If you have multiple locations with hosts you want to access you'll need to fix that. e.g.
P.S. Yes you can add a dependency for the tailscale-client service, but I also have many hosts that don't need tailscale (public VPS/Dedicated), and I wouldn't want all monitoring to stop if tailscale ever goes down.
P.S.2. Don't forget to map ports, or add a reverse proxy to the above config if you're not using Coolify.
All reactions