01
Context
Hosting several web applications and sites on infrastructure you control, in an isolated, secure and maintainable way, without depending on a closed hosting platform, and shipping every update without manual work on the server.
02
Problem
How do you expose several services on the internet over HTTPS, keep the attack surface to a minimum and ship updates continuously, while keeping the infrastructure simple to evolve?
03
Objectives
- Isolate each service in a dedicated container.
- Automate routing and SSL certificate issuance.
- Build and deploy every code update automatically.
- Close direct access to administration interfaces.
- Harden server access and block intrusion attempts.
04
Technical approach
- Containerisation
- Each application runs in its own Docker container, described in a declarative, reproducible way.
- Reverse proxy
- Traefik routes traffic to services by domain name and handles Let's Encrypt certificates automatically.
- Continuous deployment
- Every update pushed to the main branch triggers the image build and its deployment, with no manual connection to the server.
- Hardened images
- Multi-stage Docker images, running without root privileges, with a health check and HTTP security headers (CSP, HSTS) on the application side.
- Private access
- Administration interfaces are only reachable through a WireGuard VPN tunnel.
- Hardening
- Key-only SSH access, a restrictive UFW firewall, and automatic banning of repeated attempts with Fail2Ban.
05
Architecture
Public traffic goes exclusively through the reverse proxy. Administration goes through a private VPN tunnel.
- Firewall: only the necessary ports are open.
- Traefik: TLS termination and routing by domain.
- Docker containers isolated per service.
- WireGuard tunnel for administration access.
06
Features
| Feature | Status |
|---|---|
| Administered and hardened Ubuntu VPS | In production |
| Containerised services with Docker | In production |
| Traefik reverse proxy and automatic SSL certificates | In production |
| Continuous deployment from Git | In production |
| Non-root images, health checks, security headers | In production |
| SSH, UFW and Fail2Ban hardening | In production |
| WireGuard VPN for administration | In production |
| DNS management | In production |
07
Benefits
- Infrastructure controlled end to end, with no dependency on a closed host.
- A new service added simply, with no manual certificate configuration.
- Updates shipped continuously and reproducibly, with no manual work on the server.
- An exposure surface reduced to the bare minimum.
Qualitative benefits that follow from the architecture. No figures are published until they have been measured.
08
Technologies
- Ubuntu
- Docker
- Traefik
- Let's Encrypt
- WireGuard
- UFW
- Fail2Ban
- SSH
- CI/CD
Resources