A deep dive into using Tailscale with Docker

  Рет қаралды 38,246

Tailscale

Tailscale

Күн бұрын

Everything you ever wanted to know about using Tailscale in a Docker container.
- GitHub resources: github.com/tailscale-dev/dock...
- Tailscale.com blog post: tailscale.com/blog/docker-tai...
- Tailscale docs: tailscale.com/kb/1282/docker
Personal accounts are always free on Tailscale and can include up to 3 users and 100 devices. Get started today at tailscale.com/yt
===
00:00 - Start
00:36 - Why put Tailscale in a container?
01:48 - Auth Keys vs OAuth Clients
06:05 - Auth Keys
13:36 - OAuth Clients
18:00 - Container Namespacing
24:54 - Exposing an app via Serve and Funnel

Пікірлер: 89
@AviDrissman
@AviDrissman 3 ай бұрын
I don’t understand the Compose yaml at @6:45. If you don’t define it, TS_USERSPACE will default to true, and not need the /dev/net/tun and net_admin/sys_module capabilities. So either remove those lines and run in userspace, or leave them in and also add TS_USERSPACE=false. The combination as shown seems self-contradictory.
@Tailscale
@Tailscale 2 ай бұрын
Thanks for pointing this out! You are quite right and we have updated the linked code samples accordingly!
@Kestrel38
@Kestrel38 3 ай бұрын
Tailscale has genuinely changed the way my business works. Thanks so much for sharing so many useful ways to innovate and break the traditional and insecure ways of connecting things.
@urzalukaskubicek9690
@urzalukaskubicek9690 3 ай бұрын
Let's run the whole Internet through one private company. What could possibly go wrong?! Sorry I mean two companies.. tailscale and cloudflare.
@metal-beard
@metal-beard 2 ай бұрын
@@urzalukaskubicek9690is there any similar alternative? Possibly OpenSource?
@username-videos
@username-videos 2 ай бұрын
I wish projects like Netbird were more user friendly/documented for people who are new to networking. I'm reluctantly using Tailscale right now because it "just works" for people who don't have all of the expertise needed to run more open wireguard mesh solutions.
@ultravioletiris6241
@ultravioletiris6241 2 ай бұрын
@@urzalukaskubicek9690 That’s pretty melodramatic lol
@massgrave8x
@massgrave8x Ай бұрын
@@urzalukaskubicek9690 use headscale then if that's your concern.
@Gonkers44
@Gonkers44 3 ай бұрын
I met Alex at DevOps Days Chicago and he’s been blowing my mind since. Thanks Alex!
@Solanum.95
@Solanum.95 3 ай бұрын
Great tutorial, love the way you explain things!
@Tailscale
@Tailscale 3 ай бұрын
Glad it was helpful!
@1988Logge
@1988Logge 3 ай бұрын
I can't tell you how much I've been waiting for this video! You mentioned it recently in one of the podcasts and as I'm still not quite getting to grips with Docker and Tailscale I've been eagerly awaiting it. 😅
@Feerab
@Feerab 3 ай бұрын
Thanks, Tailscale, for your outstanding efforts! Your dedication to providing high-quality content is truly appreciated. Keep up the great work!
@CTWilliams89
@CTWilliams89 3 ай бұрын
Amazing content! Thank you for the time and effort you and the rest of the Tailscale team put into this.
@samifouad
@samifouad 3 ай бұрын
just getting started with Tailscale and Docker, thanks for the great intro! Long live self hosting! 🔥
@renanoliveira0
@renanoliveira0 2 ай бұрын
Your explanation skills are outstanding!
@johnh9811
@johnh9811 3 ай бұрын
I've been looking for a suitable self-hosting start point and this tutorial has answered a heap of "where do i begin?" questions. Thanks !
@tabberacci8541
@tabberacci8541 2 ай бұрын
Fantastic video series Alex! Short, to the point and easily understandable information. Keep it up! Future video suggestion: deepdive in ACL:s and OPNsense interface firewall correlation? Having a hard time getting only the right nodes to access my admin stuff on LAN.
@patrikparvin8158
@patrikparvin8158 2 ай бұрын
Thanks Alex. I was locking for a way to connect all my docker to Tailscale (were already some of my devices connected). Before I worked with macvlan, but now I will try out this solution.
@bobbyLovesTech
@bobbyLovesTech 9 күн бұрын
Completely off topic here - I had no idea about sudo !! => You are a goldmine Alex!
@alexclifford2485
@alexclifford2485 3 ай бұрын
Brilliant stuff. The command line is scary, and docker just seems a headache, but I'm sure I could learn it if I tried. With tailscale, I've set up an old laptop with an external HDD, then use it as a personal cloud storage when I'm away from the house and have access to several TB if I want my files anywhere. Then I've also set up jellyfin with tailscale for a media server for family on a refurbished office PC for £60 off ebay - so it's a family netflix. This is a very powerful tool, and the more you can simplify it and offer alternatives to the command line and messy config files (because this stuff is just not intuitive), the more value it has for me personally. In any case, thanks for simplifying this stuff. Much appreciated
@EduardoKabello
@EduardoKabello 3 ай бұрын
Great tutorial! It would be nice, a tutorial with Tailscale running on a Proxmox
@east4ming
@east4ming 3 күн бұрын
I use Tailscale and Nomad, both running on raspberry pi 4b based edge devices distributed around the world, to collect data on the carbon footprint of the production process in different places. And centralized collection, processing, analysis and presentation.
@ckwcfm
@ckwcfm 3 ай бұрын
Thx. It will be super helpful if you could do a similar topic on docker swarm as well
@j.Zephyr
@j.Zephyr 2 ай бұрын
In the vidéo and in the blog post, you don't say that you have to allow the node to have the "funnel" option. But you have it on the ACL provided. Great work BTW
@AGL_AerialsTampa
@AGL_AerialsTampa 3 ай бұрын
Hello! Could you do a deep dive into how ACLs work for beginners please? I know there is a really in depth article y'all have but I do much better learning when I can see it be done. Thank you!
@rafraf23534
@rafraf23534 2 ай бұрын
Video on ACLs would be great!
@johncahill9207
@johncahill9207 Ай бұрын
A good follow up video would be a nice, detailed work up of the ACL settings.
@malzbier1339
@malzbier1339 3 ай бұрын
I Love Tailscale ❤.
@TrueNorthRecon
@TrueNorthRecon 3 ай бұрын
Would this have support for things like udp ports leading to game server containers?
@h4rb1ng3r
@h4rb1ng3r 11 күн бұрын
maybe its just me but I can't find the ACL json file that you mentioned would be available in links provided? The tagging option wasn't immediately enabled for me because that section of the Access Controls wasn't yet configured or uncommented. But fortunately there was a helpful link to the ACLs, right next to the greyed out tag button which made that super intuitive. 👍
@alexanderos8209
@alexanderos8209 3 ай бұрын
Great Video - as always. I am currently struggeling with getting direct access to my tailscale clients - Singe NAT on one side (home router with a valid , public IP4 address. However all connections to this container are routet via DERP. This is anoying especially when doing high bandwith tasks. Can you maybe give a tutorial on how to get direct connections and how to optimize routing?
@Tailscale
@Tailscale 3 ай бұрын
I’d encourage you to open a ticket with our excellent support teams to work through your specific situation.
@swansurt1350
@swansurt1350 2 ай бұрын
If I have a service that uses 'networks: -networkname' to connect to other services on the same compose file, I can't use network_mode to connect it to the tailscale image since network_mode can't be used when networks is being used. Is it possible to add tailscale also to the same network to have the service available on my tailscale network?
@pieterrossouw8596
@pieterrossouw8596 3 ай бұрын
userspace tailscaled was a game changer for my workload. I don't need massive throughput but I don't want to run a privileged container if I can avoid it. The feature I'd like to see most is reserved IP keys: Almost like elastic IPs in AWS EC2, but for my tailnet. I generate an auth key for an ephemeral node that's always going to get a predetermined IP on my tailnet. I also want keys to last longer than 90 days, maybe with the prerequisite that the node be manually approved by an admin? This means I can use preauthorized keys to spin up infrastructure with deterministic IPs on my tailnet.
@Tailscale
@Tailscale 3 ай бұрын
This is a really interesting question. Might I ask one back? Why does the IP matter if magicdns allows you to refer to the node deterministically too?
@rysterstech
@rysterstech 3 ай бұрын
@@Tailscale magicdns doesnt always work
@martinzipfel7843
@martinzipfel7843 2 ай бұрын
You did a great job explaining it Alex, but honestly, it makes me want to pull out my hair almost as much as setting up a reverse proxy with TLS does. However, because I'm now on CGNAT all that NGINX work is out of the window and this looks like a feasible replacement. It would be great to get more videos diving into more details.
@Tailscale
@Tailscale 2 ай бұрын
Let’s try and keep your hair in tact. What details would you like us to go over?
@martinzipfel7843
@martinzipfel7843 2 ай бұрын
@@Tailscale too late I'm afraid. However, after working through the blogpost I managed to expose the container to the tailnet and to the www. That feature is incredible honestly. Would be great to see more instruction for example on how to apply funnel to a windows based game server if I only want to expose access to the streaming application but not to the entire machine. Also, I can imagine why you are limiting the possible tailnet URL's to a few autogenerated ones but it would be great to be able to name one myself ;)
@winoffrg
@winoffrg 3 ай бұрын
Hi! An amazing video, Just want to know how can I access my host like if tailscale was installed on it via this setup? Currently whenever I am moving b/w machine I have to do this manual setup. Rather I am looking that since my rest of the ecosystem is managed via docker compose I just spin this also up there and I can then normally SSH into my host machine
@Tailscale
@Tailscale 2 ай бұрын
You’d likely want to install Tailscale natively on the host itself as well any containers for the smoothest experience.
@mario-gp3tk
@mario-gp3tk 2 ай бұрын
This is awesone! Thank you! But now I have another problem: My containers can't reach the www, but I need my containers to have access to the www while they're still only reachable via tailscale from outside. How can I do this now?
@PizzaGoat323
@PizzaGoat323 Ай бұрын
Hey there, can you lend me a hand? I'm trying to figure out where I'm going wrong. I'm attempting to set up authkeys with a VSCode container from LinuxServer. Also, I need to get a Cloudflare reverse proxy going and expose port 8443. How do I set all this up with the end goal of getting the Tailscale VScode addon working and exposed on cloudflare
@Minglator
@Minglator 3 ай бұрын
Make a video on adding devices to a subnet and connecting it to your tailscale network
@cyber2th
@cyber2th Ай бұрын
I think I've got everything set up! Thanks for the tutorial. I'm a bit confused that this enables funnel for the node in the dashboard even though it's set to false in the json file. Is this the expected outcome?
@zackey_tnt
@zackey_tnt Ай бұрын
Getting the same. Did you find anything?
@zachsfunk491
@zachsfunk491 Ай бұрын
Tailscale is seriously cool. SDN are so neat, tailscale isn't necessarily one but in the realm of.
@mailynf
@mailynf Ай бұрын
how can i apply this to containers running in a synology nas?
@ardenswirl7361
@ardenswirl7361 2 ай бұрын
I have a unraid server and want to use tailscale on 2 diffrent accounts how to do this with a docker compose setup or on my unraid server. I tried what gpt4 suggested did not work I meant it kinda worked for every reboot of my unriad server it got ne a new machine name.
@richarda6435
@richarda6435 3 ай бұрын
Running Tailscaled using Docker (compose) on a Ubuntu server. Have the --ssh setting. When attempting to SSH to this machine, SSH connects to the docker container itself and not the host machine. I'm guessing somebody has figured this out or maybe it's not possible.
@ElliotWeishaar
@ElliotWeishaar 3 ай бұрын
Tailscale is the best. How do you guys feel about headscale? I've considered trying it but I haven't taken the plunge yet.
@Tailscale
@Tailscale 3 ай бұрын
We have a page for that! tailscale.com/opensource
@raaghulr3024
@raaghulr3024 11 күн бұрын
using oauth method, if two container try to use same port 80. how to resolve that
@danr2513
@danr2513 2 ай бұрын
At 17:50 I get "curl: (6) Could not resolve host: ts-oauth". Didn't work in browser either.
@503ali
@503ali 3 ай бұрын
I have been trying to do this for a month using macvlan with no luck thanks. Do you have to do this for every container?
@Tailscale
@Tailscale 3 ай бұрын
For now at least, one Tailscale sidecar per service yup.
@ckwcfm
@ckwcfm 3 ай бұрын
Maybe you can create an external docker network. And use this network for all the services you want to use with Tailscale. Than in the config file, use the service’s container name as their ip. Maybe that will work
@fredamn76
@fredamn76 2 ай бұрын
I cannot get serve to work. I have mounted the config directory but the command tailscale serve status states No serve config. The json file is in the config directory. What can be wrong?
@diamondkingdiamond6289
@diamondkingdiamond6289 2 ай бұрын
How are the containers supposed to communicate between each other?
@DugB0915
@DugB0915 3 ай бұрын
I did ask this on the reddit thread but I'll ask it here too in case you don't see it. Are there any issues doing this with podman? Or is it only with Docker?
@Tailscale
@Tailscale 3 ай бұрын
I should imagine so using the Podman specific syntax as outlined in the link below. Note that I didn’t test this. -Alex docs.podman.io/en/latest/markdown/podman-run.1.html#network-mode-net
@DugB0915
@DugB0915 2 ай бұрын
thnaks!@@Tailscale
@wingnut1138
@wingnut1138 2 ай бұрын
Just watched this and wonder if I misunderstood an effect of the namespace network merge. If I connect a django container and a postgres container to the same tailscale container will django be able to connect to postgres using localhost rather than databases container name? If yes then tailscale simplifies things even more. Or is there a reason why we can't/shouldn't connect multiple containers?
@Tailscale
@Tailscale 2 ай бұрын
No reason I can think of. Although docker networks give you a lot of this too without the inter container dependency.
19 күн бұрын
Great video, but how do I add Tailscale to five of my docker containers? Some say use docker networks and others creating side cars to the container. I would really appreciate a video about adding tailscale to multiple existing containers.
@Tailscale
@Tailscale 18 күн бұрын
We'd suggest one sidecar per service.
@TreyPiepmeier
@TreyPiepmeier 2 ай бұрын
I'm having a heck of a time trying to get the serve and funnel configuration (/config/mealie.json in this example) to work in a Portainer stack. Apparently relative directories don't work in docker-compose within Portainer and even configuring another Dockerfile to copy the file from the image to the container doesn't want to work. Does anybody know a way around this or at least understand what I'm talking about? 😅
@danr2513
@danr2513 2 ай бұрын
Does the /config directory exist? and does it have the correct ownership? I never use portainer to spin up my containers, however I use it to view logs and other things.
@TreyPiepmeier
@TreyPiepmeier 2 ай бұрын
@@danr2513 I ended up getting it to work by creating an external volume and putting the file there manually. There must be a better, more automated way, but this did the trick for now!
@BUBearsFan
@BUBearsFan Ай бұрын
Is it possible to get help doing this on my NAS? : )
@udaychander6518
@udaychander6518 29 күн бұрын
I had just one doubt. Is there a way to funnel multiple web services by adding subdomain for each, within one tailscale container? More like how we can do with nginx
@Tailscale
@Tailscale 26 күн бұрын
Not as of today. You'd need a reverse proxy to do that.
@stxnw
@stxnw 2 ай бұрын
I don't think this would work on platforms that only support non-root or user-only docker containers. A lot of PaaS don't support compose or allow you to set the docker run args.
@user-xd7zk1pw5y
@user-xd7zk1pw5y Ай бұрын
Ha I've even started reading tailscale docs with your accent
@user-iq5ey7ic1z
@user-iq5ey7ic1z Ай бұрын
نريد شرح مترجم بالعربي We want a detailed explanation translated into Arabic of the steps for using the application from installation until connecting to the other device and controlling it
@TubeSkaterRudy
@TubeSkaterRudy 27 күн бұрын
What was he piping through to get the colors in the output of docker inspect?
@Tailscale
@Tailscale 26 күн бұрын
jq
@TubeSkaterRudy
@TubeSkaterRudy 25 күн бұрын
@@Tailscale Great! Thanks :)
@TsiRoadkill
@TsiRoadkill 3 ай бұрын
I love tailscale and love what it can do but im not smart enough to config this stuff lol
@zhenghan8428
@zhenghan8428 2 ай бұрын
No ssh to the container?
@ashebanow
@ashebanow 2 ай бұрын
he could have ssh'ed to the container, but as he showed via 'docker exec', the container doesn't have the diagnostic tools installed.
@sur0x
@sur0x 2 ай бұрын
so I basically have to destroy my containers networks to chagne the network mode for everything
@xxxsrixxx
@xxxsrixxx Ай бұрын
can i run tailscale both on the linux machine and on the docker inside the linux machine?
@Tailscale
@Tailscale Ай бұрын
yup!
Remotely access and share your self-hosted services
18:05
Tailscale
Рет қаралды 39 М.
Traefik 3 and FREE Wildcard Certificates with Docker
39:37
Techno Tim
Рет қаралды 41 М.
Balloon Pop Racing Is INTENSE!!!
01:00
A4
Рет қаралды 14 МЛН
Кәріс тіріма өзі ?  | Synyptas 3 | 8 серия
24:47
kak budto
Рет қаралды 1,4 МЛН
Learning Docker // Getting started!
35:56
Christian Lempa
Рет қаралды 97 М.
Corel Linux - The (Word)Perfect Operating System
25:40
Michael MJD
Рет қаралды 80 М.
The OpnSense Series: 1. Home Lab Network Design
5:38
jonomoss
Рет қаралды 2,2 М.
They Enabled Postgres Partitioning and their Backend fell apart
31:52
Hussein Nasser
Рет қаралды 36 М.
This mainboard is PERFECT for Home Servers // Minisforum BD770i
14:18
Christian Lempa
Рет қаралды 62 М.
Running Windows in a Docker Container!
10:07
Wolfgang's Channel
Рет қаралды 230 М.
Remotely access Home Assistant via Tailscale for free!
14:11
Tailscale
Рет қаралды 11 М.
Tailscale VS Zerotier
25:33
Lawrence Systems
Рет қаралды 118 М.
Secure Your Self-Hosted Network with Wazuh
21:49
Techdox
Рет қаралды 71 М.
iPAD PRO НА M4, iPAD AIR 13 И PENCIL PRO: НЕТ СЛОВ
7:33
Арсений Петров
Рет қаралды 35 М.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 5 МЛН
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Рет қаралды 3 МЛН