Desenvolvimento
Tailscale Docker Compose: test private app access
November 28, 2026
Why it matters
A self-hosted utility becomes more useful when you can reach it from another network. That is also where a small deployment starts collecting networking decisions: which address to use, which ports to publish and how to give somebody else access. The video demonstrates a convenient approach: give an application its own presence on a private Tailscale network.
What interests me is the service boundary. A PDF utility and a development dashboard can share one machine while having separate names and access rules. I would choose this arrangement when different people need different applications and that distinction is worth maintaining explicitly.
My acceptance criteria would go beyond loading the home page. An approved user should be able to complete a task, an unapproved user should be unable to connect, and the deployment should survive routine maintenance. The video establishes the initial connection. The additional exercise here is to turn that connection into a repeatable deployment with evidence that its boundaries work.
Key points
- 00:37 A Tailscale sidecar gives the application a presence on the tailnet. For a developer, the useful consequence is a service address that can remain separate from the identity of the underlying host.
- 01:13 Docker is installed through its convenience script. That makes the demonstration quick to reproduce. For a permanent server, I would use the official package repository; Docker's documentation positions the script primarily for development environments. Docker installation on Ubuntu.
- 03:05 An auth key enrolls the container into the network. This is a credential handoff, so the working demo should be followed by a decision about storage, replacement and who can retrieve the key.
- 04:16 Nginx receives a recognizable network name. Naming deserves a little thought because it becomes the address people bookmark and the identifier somebody else will troubleshoot later.
- 05:32 Adding Stirling PDF introduces application volumes alongside Tailscale state. Those are separate recovery concerns: restoring network identity does not establish that application data can be recovered.
- 06:47 OAuth scopes and a tag support automated enrollment. I would assess the traffic rules separately, since successful enrollment does not establish which users should reach the application.
- 08:40 The application shares the sidecar's networking, and the example avoids host port publishing. That is a property to verify in the deployed configuration, especially when adapting an existing Compose project.
- 11:13 Serve handles the HTTPS entry point and forwards requests to the application's internal port. The important dependency is the actual listening port, which should be checked rather than inherited from another example.
- 13:07 Funnel introduces public internet access. It belongs to a different access decision from sharing an internal utility with selected tailnet users.
How to apply
Tailscale Docker Compose: define one acceptance task
Start with a disposable application and synthetic data. With Stirling PDF, I would use two harmless documents and a merge operation. Write down who should use it, who owns updates and how much downtime is acceptable. This establishes a small, observable task before the utility becomes part of somebody's daily workflow.
Choose and record image versions while reviewing the official examples. Treat the 2024 demonstration as an architectural starting point, then compare its settings with current documentation before adopting it as your deployment template.
Make the request path explicit
Draw the intended route in one line: approved device → sidecar address → HTTPS through Serve → application listening port. The application setting network_mode: service:<service> must reference the Tailscale service in the Compose project. This arrangement shares a network namespace between the application and its sidecar.
Record the application port, the Serve entry port and any published host port separately. These are different parts of the route. Review both services for leftover port publishing, particularly if the application previously ran through a public reverse proxy. Reading the Compose file tells you what was configured; connecting from another network tells you what is reachable.
I would keep this route in the deployment notes. A future maintainer should be able to identify the backend port without replaying the video or guessing from the browser address.
Document credentials and permissions separately
Pick one enrollment method and write down how its credential will be replaced. Current container documentation supports an OAuth secret through TS_AUTHKEY with its associated tag, or the TS_CLIENT_ID and TS_CLIENT_SECRET combination. Keep those methods separate. For TS_SERVE_CONFIG, mount the configuration directory so updates can be detected correctly. Tailscale container parameters.
Next, review effective traffic permissions. I would use an application-specific tag and identify exactly which users need the HTTPS endpoint. A descriptive tag makes the policy easier to understand, but the blocked-user test is what checks the resulting boundary.
Run a small access matrix
Use a second device. A request made on the server itself does not exercise the remote access path.
| Scenario | Expected result | |---|---| | Approved user over a mobile connection | The application opens and completes the sample task | | Tailnet user without permission | The service cannot be reached | | Device outside the tailnet | The private endpoint is inaccessible | | Public host IP and any previously published port | The application does not answer through that route | | Full HTTPS service URL | The browser accepts the certificate without an exception |
Tailnet access rules apply to Serve too. If the second test succeeds unexpectedly, inspect existing broad permissions as well as the rule you just added. Tailscale Serve documentation.
Choose a neutral hostname before requesting a certificate. Certificate Transparency records expose the certificate's full domain name, even while access to the service remains private. Avoid client names or confidential project identifiers, and use the complete service domain for HTTPS. Tailscale HTTPS certificates.
Rehearse maintenance before depending on the app
Persist the Tailscale state directory through a volume and TS_STATE_DIR so the node can retain its identity across restarts. Official Tailscale container image.
Then recreate the deployment with your sample data, check its identity in the admin console and repeat the application task. Separately, restore an application backup into a disposable environment. A successful restart and a successful restore answer different operational questions.
My handover document would contain the access matrix results, the chosen versions, the request path and the recovery procedure. I would consider that stronger evidence of a usable private service than a screenshot of the welcome page. It also gives the next update a clear finish line: repeat the same checks and compare the results.
Resources mentioned
- Docker Engine · Motor usado na demonstração; o vídeo instala pelo script get.docker.com.
- Docker Compose · Define e executa o conjunto de contêineres.
- Tailscale · Tem plano pessoal gratuito e planos pagos; os limites citados na descrição de 2024 mudaram.
- Imagem oficial tailscale/tailscale · Imagem usada para conectar os serviços à tailnet.
- Exemplos oficiais de Docker com Tailscale · Pasta com os arquivos relacionados ao vídeo de introdução.
- Guia aprofundado de Docker e Tailscale · Artigo complementar indicado na descrição.
- Documentação de Tailscale com Docker · Referência oficial atual para configuração e implantação.
- Nginx · Servidor web usado como primeira aplicação de exemplo.
- Stirling PDF · Aplicação de PDFs demonstrada; oferece opção gratuita e modalidades pagas.
- Tailscale Serve · Recurso do Tailscale usado para encaminhar o serviço com HTTPS na tailnet.
- Tailscale Funnel · Alternativa citada para disponibilizar um serviço na internet.
- Let's Encrypt · Autoridade certificadora utilizada no fluxo de HTTPS apresentado.