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.
- Pick a template below and read its README for prerequisites.
- In the BunkerWeb web UI, open Templates, select Create new template, switch to Raw mode and select Upload template JSON.
- 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.
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
| Template | Summary |
|---|---|
| Identity provider template with flow and cookie-aware WAF tuning | |
| OIDC provider template with passkey and callback WAF tuning | |
| Password vault template with encrypted-field WAF tuning |
| Template | Summary |
|---|---|
| File manager template with WebDAV-aware proxy defaults | |
| Collabora (WOPI) host template with WebSocket proxy defaults | |
| S3 object storage template with signed-request WAF tuning | |
| Secure template with WebDAV-aware defaults | |
| File sharing template with chunked-upload-aware defaults | |
| File sharing template with WebDAV-aware proxy defaults |
| Template | Summary |
|---|---|
| Document signing template with API-aware defaults | |
| Task board template with WebSocket and task-text WAF tuning | |
| Wiki template with realtime collaboration and MCP support |
| Template | Summary |
|---|---|
| Headless CMS template with REST and GraphQL API defaults | |
| Secure template with CMS-aware defaults | |
| Reverse proxy template with servlet-friendly defaults | |
| Secure template with essential hardening defaults |
| Template | Summary |
|---|---|
| Shell history sync server template with API client tuning | |
| Git forge template with HTTPS, LFS and package API tuning | |
| Workflow automation template with editor and webhook tuning |
| Template | Summary |
|---|---|
| Monitoring hub template with WebSocket agent connections | |
| Dashboard template with query and HTML-response WAF tuning | |
| Web analytics template with tracker and dashboard tuning | |
| Monitoring template with Socket.IO polling and WebSockets |
| Template | Summary |
|---|---|
| Push notification template with publish and subscribe tuning | |
| Matrix homeserver template with well-known delegation | |
| Matrix homeserver reverse proxy with WebSocket and delegation |
| Template | Summary |
|---|---|
| Self-hosted template with gRPC and websocket routing | |
| Reverse proxy template with admin UI and API tuning | |
| Reverse proxy template with WebSocket and rate limiting defaults |
| Template | Summary |
|---|---|
| Media streaming template with reverse proxy tuning | |
| Passkey PWA template with JSON sync and WebAuthn tuning | |
| AI chat template with WebSocket and prompt-aware WAF tuning | |
| Metasearch template with query-aware WAF tuning |
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)
- Sign in to the BunkerWeb web UI with an account that can edit the configuration.
- Open Templates, select Create new template, and switch to Raw mode.
- 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. - 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.
- Review the imported JSON and configs, then select Save. Templates without custom configs skip the previous dialog.
- 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.jsonfile 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:
-
Copy
<template-directory>/template.jsonto<plugin>/templates/<name>.json. -
If the template contains a
configs/directory, copy it to<plugin>/templates/<name>/configs/. Preserve every config-type subdirectory, such asmodsec-crs/orserver-http/. -
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 -
Install or reload the plugin using the procedure for your BunkerWeb integration. The scheduler loads the template from the plugin.
-
Select the template when adding or editing a service in easy mode, or set
USE_TEMPLATE=<name>. For the example above, useUSE_TEMPLATE=wordpressbecause the file is namedwordpress.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
modsecconfig next to the new ones, and Done and Save both stop withConfigs ... are not assigned to any step. Remove the old config first:- 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 examplewordpress_false_positives). Select its red trash button (Remove). - Switch to Raw, select Upload template JSON, choose the new
template.jsonand confirm Replace template. - In the Missing Custom Configs dialog, upload every listed file from the new
configs/modsec-crs/directory, then select Done. The editor reportsAll missing configs have been uploaded!. - 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.
- 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
- 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
doneIn 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 answersCustom 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 faileddocker 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>|manualmeans a storedmanualconfig replaces the template's file. It is stale if its file does not hold the new rules; this prints0then:docker exec <container> grep -c 'id:<id>' /data/configs/modsec-crs/<service>/<name>.conf
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.jsondescribes the templateid, user-facingname, and optionalsettings,configs, andsteps.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:
- Fork the repository and create a feature branch.
- Add or update your template following the guidelines.
- 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
- Discord: discord.gg/YEdMKqztMZ
- GitHub Issues: report bugs or request new templates in the issue tracker.
- Wiki: browse the project wiki for navigation and troubleshooting.
- Code of Conduct: read the community guidelines before engaging.
| Name | GitHub |
|---|---|
| Théophile Diot | @TheophileDiot |
| Alexandre | @YouKyi |
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.
