>>108479140
you're still wording this so terribly that I don't know what you actually want to do. For my setup, I run all my services on my server through containers in docker. I also run tailscale the same way. I have one big docker-compose file with all the services and tailscale defined in it. The tailscale container has a network defined inside of it, and I set all the other services to use that network. I open the ports those services need in the tailscale definition. Like this (filebrowser is a random service I run on the server) (you can maybe copy-paste this but you'll have to edit it a bunch for your use case):
filebrowser:
container_name: filebrowser
image: filebrowser/filebrowser:s6
volumes:
- /home/REDACTED/:/srv
- /home/REDACTED/filebrowser/database:/database
- /home/REDACTED/filebrowser/config:/config
environment:
- PUID=1000
- PGID=1000
- TZ=America/New_York
network_mode: service:tailscale
restart: unless-stopped
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
devices:
- /dev/net/tun:/dev/net/tun
environment:
- TS_AUTHKEY=REDACTED
- TS_EXTRA_ARGS=--reset --advertise-exit-node --advertise-tags=tag:container
- TS_HOSTNAME=urmom3
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
- PUID=1000
- PGID=1000
- TZ=America/New_York
volumes:
- /home/REDACTED/tailscale/state:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
networks:
- net
ports:
# These ports are in format <host-port>:<container-port>
- 127.0.0.1:8085:8085 # filebrowser webui
- 41641:41641 # ts
#- REST REDACTED
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv6.conf.all.forwarding=1
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
networks:
net:
attachable: true
driver: bridge
driver_opts:
# required for tailscale to function properly
com.docker.network.driver.mtu: 1280