Skip to content

EduardoThums/tailscale-nginx-tls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailscale Nginx TLS

This project serves as a study project to learn how to configure an Nginx instance inside Docker that is exposed through a Tailscale tailnet with a TLS certificate generated by Tailscale. The setup demonstrates how to:

  • Run Nginx in a Docker container
  • Connect the container to Tailscale
  • Generate and use Tailscale TLS certificates
  • Configure Nginx to serve content securely

Prerequisites

  • Docker installed
  • Tailscale account and CLI
  • Basic understanding of Docker and Nginx configuration

Setup Instructions

  1. Clone this repository:

    git clone https://github.com/EduardoThums/tailscale-nginx-tls.git
    cd tailscale-nginx-tls
  2. Generate the TLS certificate on tailscale

    cd certificates
    tailscale cert your-domain.ts.net
  3. Build and start the Docker container:

    TAILSCALE_HOSTNAME=your-domain.ts.net docker compose up -d
  4. Verify the container is running:

    docker ps
  5. Access your Nginx server through the Tailscale network using the hostname you configured.

    curl https://your-domain.ts.net

About

Example of how to configure a nginx container with TLS on Tailscale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published