Skip to content

About

A community-driven hub of reusable BunkerWeb templates — share, discover, and improve configurations for your favorite services.

Topics

Resources

Code of conduct

Contributing

Stars

30 stars

Watchers

0 watching

Forks

Repository files navigation

BunkerWeb Templates logo

Ready-to-run BunkerWeb configurations for popular services,
fully editable to fit your stack.

Number of templates Latest release Release downloads Tested with BunkerWeb 1.6.17 OWASP CRS 4 License: GPL v3

GitHub stars Plumber CI/CD security score Join the Discord PRs welcome

Community-maintained templates for BunkerWeb. Each one gives a well-known service, such as WordPress, Nextcloud or a Matrix homeserver, a working configuration that you can extend for your environment.

Quick start

  1. Pick a template below and read its README for prerequisites.
  2. In the BunkerWeb web UI, open Templates, select Create new template, switch to Raw mode and select Upload template JSON.
  3. Select Save, then choose the template in Easy mode when you edit a service.

Every step, the upload dialog and the plugin method are in Install.

Templates

Identity and security · Files and storage · Productivity and documents · Websites and CMS · Developer tools and automation · Monitoring and analytics · Communication · Network and infrastructure · Media, search and personal apps

Identity and security

Template Summary
authentik Identity provider template with flow and cookie-aware WAF tuning
Pocket ID OIDC provider template with passkey and callback WAF tuning
Vaultwarden Password vault template with encrypted-field WAF tuning

Files and storage

Template Summary
Filestash File manager template with WebDAV-aware proxy defaults
Filestash Office Collabora (WOPI) host template with WebSocket proxy defaults
Garage S3 object storage template with signed-request WAF tuning
Nextcloud Secure template with WebDAV-aware defaults
ProjectSend File sharing template with chunked-upload-aware defaults
Seafile File sharing template with WebDAV-aware proxy defaults

Productivity and documents

Template Summary
DocuSeal Document signing template with API-aware defaults
Kaneo Task board template with WebSocket and task-text WAF tuning
Outline Wiki template with realtime collaboration and MCP support

Websites and CMS

Template Summary
Directus Headless CMS template with REST and GraphQL API defaults
Drupal Secure template with CMS-aware defaults
Tomcat Reverse proxy template with servlet-friendly defaults
WordPress Secure template with essential hardening defaults

Developer tools and automation

Template Summary
Atuin sync server Shell history sync server template with API client tuning
Forgejo Git forge template with HTTPS, LFS and package API tuning
n8n Workflow automation template with editor and webhook tuning

Monitoring and analytics

Template Summary
Beszel Monitoring hub template with WebSocket agent connections
Grafana Dashboard template with query and HTML-response WAF tuning
Umami Web analytics template with tracker and dashboard tuning
Uptime Kuma Monitoring template with Socket.IO polling and WebSockets

Communication

Template Summary
ntfy Push notification template with publish and subscribe tuning
Synapse Matrix homeserver template with well-known delegation
Tuwunel Matrix homeserver reverse proxy with WebSocket and delegation

Network and infrastructure

Template Summary
NetBird Self-hosted template with gRPC and websocket routing
Pi-hole Reverse proxy template with admin UI and API tuning
Xen Orchestra Reverse proxy template with WebSocket and rate limiting defaults

Media, search and personal apps

Template Summary
Jellyfin Media streaming template with reverse proxy tuning
openGym Passkey PWA template with JSON sync and WebAuthn tuning
Open WebUI AI chat template with WebSocket and prompt-aware WAF tuning
SearXNG Metasearch template with query-aware WAF tuning

Install

The web UI is recommended for most users. Use the plugin method when you already manage BunkerWeb plugins as files or need repeatable, automated deployments.

First, download and extract the latest release archive, or clone this repository. Choose the service directory you want to install and read its README for prerequisites and service-specific settings. Below, <template-directory> means that extracted service directory, such as wordpress/ in the release archive or templates/wordpress/ in a repository clone.

Note

The templates are written and tested on OWASP CRS 4, the default of BunkerWeb 1.6.17. Their ModSecurity exclusions only take effect with USE_MODSECURITY_GLOBAL_CRS=no, which is the default: with yes, BunkerWeb 1.6.17 skips the per-service modsec-crs configs.

Web UI (recommended)
  1. Sign in to the BunkerWeb web UI with an account that can edit the configuration.
  2. Open Templates, select Create new template, and switch to Raw mode.
  3. Select Upload template JSON and choose <template-directory>/template.json. You can instead paste the file's contents into the JSON editor. Confirm Replace template if prompted.
  4. If the Missing Custom Configs dialog appears, the template needs its accompanying NGINX configuration files:
    • Select Browse Files, or drag files into the upload area.
    • Upload every listed file from <template-directory>/configs/ and its subdirectories. Filenames must match the list; selecting the directories themselves is not required.
    • Wait until every item is marked Uploaded, then select Done.
  5. Review the imported JSON and configs, then select Save. Templates without custom configs skip the previous dialog.
  6. Add or edit a service in Easy mode, choose the new template, and review each guided step. Replace example domains, upstream URLs, and other defaults with values for your deployment before saving the service.

The web UI stores the imported template and config contents in BunkerWeb's database. The local files are no longer needed after a successful import. For non-UI configuration, apply the same template with USE_TEMPLATE=<name>, where <name> is the template ID shown in the UI.

Plugin (managed deployments)

[!WARNING] Template directories from this repository are not standalone plugins. Add the selected template to an existing external plugin, or create a plugin with a plugin.json file by following the BunkerWeb plugin documentation.

BunkerWeb uses the JSON filename as the template ID, so the repository layout must be rearranged inside the plugin:

  1. Copy <template-directory>/template.json to <plugin>/templates/<name>.json.

  2. If the template contains a configs/ directory, copy it to <plugin>/templates/<name>/configs/. Preserve every config-type subdirectory, such as modsec-crs/ or server-http/.

  3. Confirm the resulting plugin layout. WordPress, for example, must look like this:

    plugins/
    └── example-plugin/
        ├── plugin.json
        └── templates/
            ├── wordpress.json
            └── wordpress/
                └── configs/
                    └── modsec-crs/
                        ├── wordpress_crs_tuning.conf
                        └── wordpress_false_positives.conf
    
  4. Install or reload the plugin using the procedure for your BunkerWeb integration. The scheduler loads the template from the plugin.

  5. Select the template when adding or editing a service in easy mode, or set USE_TEMPLATE=<name>. For the example above, use USE_TEMPLATE=wordpress because the file is named wordpress.json.

Updating authentik, forgejo, grafana, netbird, opengym, vaultwarden or WordPress

These seven templates moved their exclusion file from configs/modsec/ to configs/modsec-crs/ and gave its rules new ids. Update them so that only the new file stays active; an old file can be wider than the new one (the old WordPress rule matched every path that starts with /wp-admin/admin-ajax.php, the new one matches that path only). Tested with WordPress on bunkerity/bunkerweb-all-in-one:1.6.17, in a browser for the web UI; the other six templates make the same change. Other integrations were not tested.

  • Web UI: uploading the new files over the installed template is not enough. The editor keeps the old modsec config next to the new ones, and Done and Save both stop with Configs ... are not assigned to any step. Remove the old config first:
    1. Open the installed template under Templates. Do not create it again, BunkerWeb answers that the template already exists. In Easy mode, find the old config under Custom configs: type MODSEC, name <template>_false_positives (for example wordpress_false_positives). Select its red trash button (Remove).
    2. Switch to Raw, select Upload template JSON, choose the new template.json and confirm Replace template.
    3. In the Missing Custom Configs dialog, upload every listed file from the new configs/modsec-crs/ directory, then select Done. The editor reports All missing configs have been uploaded!.
    4. Select Save. The old file is gone after the next reload (about 5 seconds, no restart). Do not try to delete it on the Configs page: BunkerWeb refuses to delete template configs there.
  • Plugin: replace the plugin directory with the new files and restart the BunkerWeb container. Do not remove the plugin first: BunkerWeb then keeps the rendered files as custom configs of the service, which stay active and replace the same-named file of the new template, and the service loses the template settings until the plugin is back.

Check the result (web UI and plugin). Replace <container> with the BunkerWeb container, <service> with the service's server name, and <name> and <id> with a row of the table below. Right before you select Save or restart the container, note the time (UTC, with the Z; GNU date on Linux):

S=$(date -u +%Y-%m-%dT%H:%M:%S.%NZ)

Then run this. It looks every 2 seconds, for up to 60 seconds. After the last Generating new custom configs line since S, it waits for the push of /etc/nginx and then reload successful, and only then reads the rendered file. It prints new rules loaded if the file holds the new rules. It stops with apply failed if failing over or was not applied follows that line:

for i in $(seq 30); do
  r=$(docker logs --since "$S" <container> 2>&1 \
    | grep -E 'Generating new custom configs|Sending /etc/nginx|reload successful|failing over|was not applied' \
    | awk '/Generating/{s=1;f=0} /failing over|was not applied/{f=1} /Sending/&&s==1{s=2} /reload successful/&&s==2{s=3} END{if(f)print "failed";else if(s==3)print "ok"}')
  [ "$r" = failed ] && { echo "apply failed, see docker logs <container>"; break; }
  [ "$r" = ok ] && docker exec <container> grep -q 'id:<id>' /data/configs/modsec-crs/<service>/<name>.conf 2>/dev/null \
    && { echo "new rules loaded"; break; }
  sleep 2
done

In testing the check ended 6 to 9 seconds after docker restart and about 5 seconds after Save, and the first request after it was served normally. For the seven <template>_false_positives rows, also run this once. It prints a line when the old file is gone:

docker exec <container> sh -c \
  'test ! -e /data/configs/modsec/<service>/<name>.conf && echo "old file gone"'
Template <name> <id>
authentik authentik_false_positives 9851100
forgejo forgejo_false_positives 9856103
forgejo (second file) forgejo_protocol 9856100
grafana grafana_false_positives 9858501
netbird netbird_false_positives 9862100
opengym opengym_false_positives 9866100
vaultwarden vaultwarden_false_positives 9877100
WordPress wordpress_false_positives 9878101
WordPress (second file) wordpress_crs_tuning 9878010

The two second-file rows are files that kept their name and got new ids; they have no old file in modsec/, so skip the second command for them.

If the first command prints apply failed, BunkerWeb did not apply the new configuration. Depending on where it failed, it keeps the previous one and retries, or tries to go back to its last working configuration. What happened and why are in docker logs <container> (for an nginx error, an [emerg] line names the file). Fix the cause, then select Save or restart again.

If the first command prints nothing after 60 seconds:

  • with the plugin, look at the plugin directory. Only if it holds the old files again (the old plugin copy came back over the new one in 5 of 8 test restarts made right after a first start), put the new files back and restart. If it already holds the new files, do not restart again;

  • otherwise the file may be stuck as a stored custom config. This happens after the plugin was removed once: BunkerWeb 1.6.17 then keeps the rendered files as custom configs with method manual. They replace the same-named file of the new template, so the old, wider exclusion stays active and the new file is not loaded. The Configs page cannot remove them: it answers Custom config <service>/modsec_crs/<name> is not a UI/API custom config and will not be deleted. BunkerWeb 1.6.17 has no safe supported way to remove them, so this README gives no manual steps: removing them by hand can delete other custom configs. A timeout can also mean a missing file or a failed docker exec. This read-only command prints the stored row, if there is one (all-in-one image, SQLite; other integrations were not tested):

    docker exec <container> sqlite3 -readonly /var/lib/bunkerweb/db.sqlite3 \
      "select service_id,type,name,method from bw_custom_configs where service_id='<service>' and type='modsec_crs' and name='<name>' and method='manual'"

    A line <service>|modsec_crs|<name>|manual means a stored manual config replaces the template's file. It is stale if its file does not hold the new rules; this prints 0 then:

    docker exec <container> grep -c 'id:<id>' /data/configs/modsec-crs/<service>/<name>.conf

More

How templates work

BunkerWeb includes three predefined templates (low, medium, high) that bundle common security settings. The easy-mode UI and the USE_TEMPLATE setting can also consume custom templates defined as JSON. A custom template can declare:

  • Settings: multisite settings whose values override defaults.
  • Configs: paths to reusable NGINX configuration snippets that get merged into your service.
  • Steps: optional guided steps that combine settings and configs, so users can adjust the template interactively in the UI.

This repository packages those JSON definitions alongside their configuration snippets, so you can drop them into BunkerWeb for any deployment method. The BunkerWeb documentation covers the concept.

Template anatomy

Every template keeps its definition and supporting assets together:

templates/<service-name>/
├── template.json      # required: id, name, settings, configs, steps
├── README.md          # prerequisites and service-specific notes
└── configs/           # optional NGINX and ModSecurity snippets
    ├── modsec-crs/    # rules loaded before the CRS (most exclusions)
    ├── modsec/        # rules loaded after the CRS
    └── server-http/   # directives for the service's server block
  • template.json describes the template id, user-facing name, and optional settings, configs, and steps.
  • configs/ contains any NGINX fragments referenced in the JSON file.
  • Additional assets, such as helper scripts or documentation, can live beside these defaults if they help users.

A minimal template.json:

{
  "id": "wordpress",
  "name": "WordPress",
  "settings": {
    "SERVER_NAME": "www.example.com",
    "REVERSE_PROXY_HOST": "http://mywp",
    "MAX_CLIENT_SIZE": "50m",
    "MODSECURITY_CRS_PLUGINS": "wordpress-rule-exclusions"
  },
  "configs": ["modsec-crs/wordpress_false_positives.conf"],
  "steps": [
    {
      "title": "Domains and TLS",
      "subtitle": "Point the template at your WordPress hostname(s).",
      "settings": ["SERVER_NAME"]
    },
    {
      "title": "Reverse proxy",
      "subtitle": "Tell BunkerWeb where your WordPress upstream lives.",
      "settings": [
        "REVERSE_PROXY_HOST",
        "MAX_CLIENT_SIZE",
        "MODSECURITY_CRS_PLUGINS"
      ],
      "configs": ["modsec-crs/wordpress_false_positives.conf"]
    }
  ]
}

TEMPLATE_GUIDE.md holds the full authoring rules.

Contributing

Review CONTRIBUTING.md for the full workflow. In short:

  1. Fork the repository and create a feature branch.
  2. Add or update your template following the guidelines.
  3. Submit a pull request describing your changes and any testing performed.

Before you push, install the repository's pre-commit hooks with pre-commit install and run pre-commit run --all-files, so formatting, spell-check, and secret scans pass locally.

Community and maintainers
Name GitHub
Théophile Diot @TheophileDiot
Alexandre @YouKyi

License

GNU General Public License v3.0, in line with the main BunkerWeb project. The license covers this repository, including all templates and documentation. By contributing, you agree that your contributions will be released under the same license.

Product names and logos are trademarks of their owners.

About

A community-driven hub of reusable BunkerWeb templates — share, discover, and improve configurations for your favorite services.

Topics

Resources

Code of conduct

Contributing

Stars

30 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors