1 Templates: Concepts and Spec
Théophile Diot edited this page 2025-10-22 12:58:53 +02:00

A template defines:

  • settings: Multisite settings that override defaults.
  • configs: NGINX fragments included with the service.
  • steps: Optional groups that guide users in the UI.

Key rules:

  • Setting names must match BunkerWeb multisite settings exactly.
  • Paths under configs are relative to the template root.
  • JSON uses two-space indent, double quotes, no trailing commas.

Minimal example:

{
  "id": "example",
  "name": "Example",
  "settings": {
    "SERVER_NAME": "www.example.com",
    "REVERSE_PROXY_HOST": "http://backend"
  },
  "configs": [
    "modsec/example_false_positives.conf"
  ],
  "steps": [
    {
      "title": "Domains and TLS",
      "subtitle": "Point the template at your hostname(s).",
      "settings": ["SERVER_NAME"]
    },
    {
      "title": "Reverse proxy",
      "subtitle": "Tell BunkerWeb where your upstream lives.",
      "settings": ["REVERSE_PROXY_HOST"],
      "configs": ["modsec/example_false_positives.conf"]
    }
  ]
}

References: