Deployment guide

Traefik

Overview

Traefik Proxy is a cloud-native edge router for publishing your services. It receives requests on behalf of your system and routes them to the right backend using a rule engine (host, path, headers and more). It includes built-in load balancing, middlewares (auth, rate limiting, retries, redirects), automatic HTTPS through Let's Encrypt, and a live web dashboard.

The SecureAnyCloud image installs Traefik 3.7.5 as a dedicated systemd service that binds ports 80 and 443 directly. The dashboard is available at /dashboard/ behind HTTP basic authentication. ACME certificate storage and logs persist on a dedicated Azure data disk, and the image generates a unique dashboard password on the first boot of every VM. The image is backed by 24/7 SecureAnyCloud support.

What you get:

  • Traefik Proxy 3.7.5 (a single static Go binary) at /usr/local/bin/traefik
  • web (:80), websecure (:443) and a loopback ping (127.0.0.1:8082) entrypoint
  • The built-in dashboard/API at /dashboard/ on :80, protected by a basicAuth middleware (api.insecure is false)
  • A preconfigured Let's Encrypt certificate resolver (HTTP challenge)
  • A dedicated Azure data disk at /var/lib/traefik for ACME storage (acme.json) and logs, separate from the OS disk and re-provisioned with every VM
  • File-provider dynamic configuration in /etc/traefik/dynamic/ for your routers and services
  • traefik.service running as an unprivileged user with only CAP_NET_BIND_SERVICE
  • 24/7 SecureAnyCloud support

Prerequisites

Before you deploy, make sure you have an active Azure subscription, an SSH key pair, and a VNet and subnet in the target region. Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting size. Scale up for high request volumes. In the network security group (NSG), allow inbound 22/tcp from your management network, and 80/tcp and 443/tcp for the proxied traffic and the dashboard. To get real Let's Encrypt certificates, point a DNS name at the VM's public IP.

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure portal, choose Create a resource, search the Marketplace for Traefik Proxy by SecureAnyCloud, and select Create. On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22), HTTP (80) and HTTPS (443). Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

Accept the Marketplace terms once per subscription, create the VM, and open ports 80 and 443. Replace the values in angle brackets:

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:traefik-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name traefik \
  --image sac1647283583153:traefik-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name traefik --port 80 --priority 1010
az vm open-port --resource-group <your-rg> --name traefik --port 443 --priority 1020

Step 3 - Connect to your VM

Connect over SSH as azureuser:

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the service is running

Check the service status:

systemctl is-active traefik.service

The command reports active. Traefik starts in under a second.

Step 5 - Retrieve your dashboard password

The first boot of your VM generates a unique dashboard password and writes it to a root-only file. Read the file:

sudo cat /root/traefik-credentials.txt

This file contains TRAEFIK_ADMIN_USER (admin) and TRAEFIK_ADMIN_PASSWORD, plus the dashboard URL. Store the password in a safe place.

Step 6 - Check the health endpoint

Traefik exposes an unauthenticated ping endpoint on a loopback entrypoint for health probes. Query it:

curl -s http://localhost:8082/ping

The endpoint returns OK.

Step 7 - Open the dashboard

Browse to http://<vm-public-ip>/dashboard/ and sign in as admin with the password from Step 5. The dashboard shows your entrypoints and the routers, services and middlewares that Traefik has loaded, with live health.

The HTTP Routers view lists every router and the rule that matches requests to it.

The HTTP Services view shows your backends and their load-balanced servers.

Step 8 - Confirm the API from the command line

The Traefik API is available behind the same basic authentication. Confirm that it is serving and reports its router and provider tree:

curl -s -u admin:<TRAEFIK_ADMIN_PASSWORD> http://localhost/api/overview | head -c 300; echo

The response is JSON that describes the http, tcp and udp routers, services and middlewares, plus enabled features and providers.

Step 9 - Define a router and service

Traefik watches /etc/traefik/dynamic/ for configuration. Add a YAML file there to route a host name to your backends, with TLS from the preconfigured Let's Encrypt resolver and load balancing across two servers:

# /etc/traefik/dynamic/my-app.yml http: routers: my-app: rule: "Host(`app.example.com`)" service: my-app entryPoints: ["websecure"] tls: certResolver: letsencrypt services: my-app: loadBalancer: servers: - url: "http://10.0.1.10:8080" - url: "http://10.0.1.11:8080"

Traefik picks up the change immediately, with no restart, and the new router and service appear in the dashboard. You manage middlewares (auth, rate limiting, redirects, headers) the same way.

Step 10 - Confirm ACME storage lives on the dedicated disk

Issued certificates (acme.json) and the access and Traefik logs are stored on the dedicated Azure data disk, so they survive OS changes and you can resize the disk independently. Check the mount:

findmnt /var/lib/traefik

The mount is backed by a separate Azure data disk captured into the image and re-provisioned on every VM.

Enabling HTTPS

The image ships a letsencrypt certificate resolver preconfigured with the HTTP challenge. To get a real certificate, follow these steps. First, point a DNS name at the VM's public IP. Next, set your email in /etc/traefik/traefik.yml (the certificatesResolvers.letsencrypt.acme.email field) and run sudo systemctl restart traefik. Then attach tls.certResolver: letsencrypt to a router on the websecure entrypoint (as in Step 9). Traefik requests, installs and renews the certificate automatically and stores it in acme.json on the data disk.

Maintenance

  • Routes: add or edit YAML files in /etc/traefik/dynamic/. Traefik reloads them automatically.
  • Backups: snapshot the /var/lib/traefik data disk to back up issued certificates.
  • Upgrades: replace /usr/local/bin/traefik with a newer release, then run sudo systemctl restart traefik.
  • Security patches: unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.

Deploy on Azure

Launch Traefik Proxy on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure