Deploy BunkerWeb within minutes (docker on debian 12)

As you know my servers are hosted at hetzner.de – use this Link to get a 20€ start credit for your first servers.

Now we will install a new virtual server with preparations for BunkerWeb WAF on Hetzner server.

Preparations

Select Debian 12 as your system!

Use the FQDN as servername!

We will check the FQDN before applying for Let’s Encrypt certificates later!

Follow the steps in the Article How to install a virtual private server hosted by hetzner.de

Cloud-Init

Use the content of the following script cloudinit-BunkerWeb.yaml

After the installation the server reboots once and is ready for your BunkerWeb installation.

I already have a server

Please prepare your system for the next steps

curl https://raw.githubusercontent.com/Michal-Koeckeis-Fresel/server-deployment/refs/heads/main/linux/deploy_scripts/01_deploy_basics.sh | bash

Install the rest

After the deployment of the VPS you can connect using SSH.

Install Docker from the official repository

curl "https://raw.githubusercontent.com/Michal-Koeckeis-Fresel/server-deployment/refs/heads/main/linux/deploy_scripts/deploy_docker.sh" | bash

Deploy the BunkerWeb basics

curl "https://raw.githubusercontent.com/Michal-Koeckeis-Fresel/server-deployment/refs/heads/main/linux/deploy_scripts/deploy_bunkerweb.sh" | bash

Edit the default config

nano /root/BunkerWeb.conf

You MUST edit the email-address in the variable AUTO_CERT_CONTACT. Otherwise the deployment-script will fail.

Change the directory to /data/BunkerWeb/

cd /data/BunkerWeb/

Select the release channel tag

./script_template_selector.sh

Select the release channel tag you want to use. The stable release is “latest”.

Run the autoconfiguration-script

./script_autoconf_display.sh --type autoconf

Inspect the docker-compose.yml

You can inspect the configuration before running the containers:

cat docker-compose.yml

Start the containers

docker compose up -d ; docker compose logs -f

You will now see the deployment of BunkerWeb.

You can exit the log-viewer with CTRL+C

Enjoy

Connect to your instance and use the URL and credentials from the /data/BunkerWeb/credentials.txt file

 cat /data/BunkerWeb/credentials.txt |grep "Full UI URL:"
 cat /data/BunkerWeb/credentials.txt |grep "Admin Username:"
 cat /data/BunkerWeb/credentials.txt |grep "Admin Password:"

mf

Leave a Reply

Your email address will not be published. Required fields are marked *