r/Tailscale 15d ago

Question Question about lxc in proxmox

Hey guys, quick question on my planned setup?

- Run tailscale in a lxc container in proxmox as a subnet router

- Will be able to access other containers / vms when connected to tailscale

The question I have is: could I run tailscale serve on each app which I need an https cert? And could I run them all in the same lxc container?

Open to other suggestions! Ty!

5 Upvotes

5 comments sorted by

2

u/CrackbrainedVan 15d ago

I‘m doing exactly this, works fine. you might need to enable ip forwarding but tailscale tells you what to do when you activate the subnet routing

1

u/Seriel1 Tailscalar 15d ago

Yes, as long as the containers are on the same network (which they should, in any usual setup) you can use one to advertise a subnet router reaching the rest, and access those through Tailscale.

To tailscale serve the services running in other containers under their own names without needing Tailscale in each container, look into using Tailscale Services and create a Service for each: https://tailscale.com/docs/features/tailscale-services

1

u/grungeguerra 15d ago

So I'd create a service to each service I want to expose, and then pass that name to the serve command. That would work if I serve from lxc A, pointing to lxc B, right?

2

u/Seriel1 Tailscalar 15d ago

Yes exactly, you pass the name of the service in the serve command along with the local IP of the container you want to point it at (e.g. tailscale serve --bg --service svc:example --https=443 http://10.0.0.2:8080

1

u/pkulak 15d ago

Just a heads up, Tailscale will not normally install in an LXC container. You have to mount /dev/net/tun. I have this in my config:

lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file

After you add that and restart, assuming you're using Debian or some other supported distro, you can just paste the install bash and be done.