{"id":27185256,"url":"https://github.com/lpasselin/tailscale-docker","last_synced_at":"2025-10-04T20:46:26.776Z","repository":{"id":159686745,"uuid":"527662679","full_name":"lpasselin/tailscale-docker","owner":"lpasselin","description":"Tailscale in Docker without elevated privileges","archived":false,"fork":false,"pushed_at":"2023-12-07T20:23:16.000Z","size":17,"stargazers_count":57,"open_issues_count":0,"forks_count":12,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T17:14:26.556Z","etag":null,"topics":["docker","docker-compose","tailscale","vpn"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpasselin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-08-22T17:17:39.000Z","updated_at":"2025-01-15T14:35:05.000Z","dependencies_parsed_at":"2023-12-07T21:28:23.821Z","dependency_job_id":"d162c1bc-1b99-430d-92c5-9ea2ccf17cb8","html_url":"https://github.com/lpasselin/tailscale-docker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpasselin%2Ftailscale-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpasselin%2Ftailscale-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpasselin%2Ftailscale-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpasselin%2Ftailscale-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpasselin","download_url":"https://codeload.github.com/lpasselin/tailscale-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074924,"owners_count":21043490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","tailscale","vpn"],"created_at":"2025-04-09T17:14:31.381Z","updated_at":"2025-10-04T20:46:21.736Z","avatar_url":"https://github.com/lpasselin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tailscale in Docker without elevated privileges\n\nSee associated blog post: \u003chttps://asselin.engineer/tailscale-docker\u003e\n\n**Set the TAILSCALE_AUTH_KEY with your own ephemeral auth key**: \u003chttps://login.tailscale.com/admin/settings/keys\u003e\n\n## docker-compose\n\nThe examples detailed below are in the docker-compose folder.\n\nBy default, no state is saved. The nodes are removed from the network when the tailscale container is terminated. This means the ip address is never the same.\nThe `stateful-example` does save the tailscale node state to a docker volume.\n\nRequirements:\n- [docker-compose](https://docs.docker.com/compose/install/)\n\nUsage:\n````bash\nexport TAILSCALE_AUTH_KEY=\"your-key\"\n# set which project is used\nexport PROJECT_DIRECTORY=\"docker-compose/simple-example\"\n# Sart with rebuild if necessary:\ndocker-compose --project-directory=${PROJECT_DIRECTORY} up -d --build\n# Show logs and tail (follow):\ndocker-compose --project-directory=${PROJECT_DIRECTORY} logs --follow\n# Stop:\ndocker-compose --project-directory=${PROJECT_DIRECTORY} down\n````\n\n### simple-example\n\nAs explained in the blog post, uses a docker-compose service to add the container in the VPN.\n\n### complex-example\n\nNot complex but more complex than the simple-example.\nA nginx layer is added. It manages two services in independent containers at urls `/service-one` and `/service-two`.\n\n### stateful-example\n\nSame as simple-example but uses a volume to save state. The goal is to be able to reuse the same tailscale hostname _and ip address_.\nUseful in situations where the tailscale magic DNS cannot be used.\n\n## K8S\n\nSame as the simple-example but on kubernetes.\n\nRequirements:\n\n- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installing-with-a-package-manager)\n- [Kubectl](https://kubernetes.io/docs/tasks/tools/)\n\nUsage:\n````bash\n# Create cluster\nkind create cluster --name tailscale\nkubectl get nodes\n# Deploy tailscale and demo webpage:\nkubectl apply -f k8s/simple-example/deployment.yaml\n# Delete cluster:\nkind delete cluster --name tailscale\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpasselin%2Ftailscale-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpasselin%2Ftailscale-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpasselin%2Ftailscale-docker/lists"}