Intuitive Web Hosting With Træfik

Created by Tom Purl / @tompurl

How I've always wanted to host web apps

  1. Create your DNS record (e.g.
  2. Start your app
  3. Register your app with the reverse proxy
  4. Naturally your reverse proxy should force all traffic to use TLS

Real life

  1. Create your DNS record (e.g.
  2. Start your app

So far, so good!

Manually configure your reverse proxy

  • Harder than it sounds
  • Lots of esoteric gotachas with each tool
  • Very difficult to automate reliably

Manually configure your proxy to force TLS

  • Also surprisingly difficult
  • Apache and Nginx still seem to treat TLS as some sort of esoteric option

Pie in the sky with Docker


Docker's far from perfect, but it makes it really easy to develop, deploy and maintain complex applications

Wouldn't it be great to somehow make your reverse proxy Docker-aware?


Simple Config

defaultEntryPoints = ["http", "https"]
address = ":8080"
  users = ["tom:$apr1$.$omethingClever/"]
  address = ":80"
      entryPoint = "https"
  address = ":443"
email = ""
storage = "acme.json"
entryPoint = "https"
onHostRule = true
onDemand = false

Sane Defaults

  • It's easy to set up most small apps in a hurry

Hot reloading

  • To update Træfik you add special labels to your container
  • Træfik listens for newly-started containers and automatically adjusts its config

Nice extras

  • Web interface
  • Let's Encyrpt integration


Other cool things

  • Load balancing
  • Log export
  • Support for numerous backends



Thank you!