This project demonstrates the integration of the following tools to create a secure, dynamic, and scalable reverse proxy solution:
- Traefik: a modern HTTP reverse proxy and load balancer
- DuckDNS: a free dynamic DNS service
- Let's Encrypt: a free, automated, and open certificate authority
- A server or a virtual machine with Docker and Docker Compose installed
- A DuckDNS account and domain
- Clone this repository to your server:
git clone https://github.com/scafer/traefik-duckdns-letsencrypt
- Rename the
.env.example
file to.env
and set the environment variables with your values:
cd traefik-duckdns-letsencrypt
mv .env.example .env
-
Replace
your-duckdns-token
with your DuckDNS token,your-email
with your email address, andyour-duckdns-domain
with your duckdns domain (ex: your-domain.duckdns.org). -
Start the containers with Docker Compose:
docker-compose up -d
- Access whoami at
https://whoami.your-domain.duckdns.org
and make sure everything is working properly.
To add a new service behind Traefik, simply create a new Docker Compose file in the services
directory, following the example of the whoami
service.
With this setup, you can easily add and manage multiple services behind a single domain, with automatic HTTPS certificates from Let's Encrypt and dynamic DNS updates from DuckDNS.
Feel free to fork and customize this repository to fit your needs!