Deployment guide
Webhood is deployed as a set of containers that run the backend, frontend, and scanner components. You can use any container engines such as containerd and Podman and orchestration tools such as Kubernetes to deploy Webhood.
To quickly get started with running your own instance, this example deployment guide will show you how to deploy Webhood using Docker Compose.
Prerequisites
- Docker (opens in a new tab)
- Docker Compose (opens in a new tab)
- Common cli tools (e.g.
curl
,wget
) - Git
This guide assumes that you have Docker Compose V2 installed either as Docker plugin (opens in a new tab) (docker compose
) or as standalone (opens in a new tab) (docker-compose
). See note (opens in a new tab) about migrating to V2.
Deployment
Clone the deployment repo
This git repo contains the docker-compose.yml
file as well as other deployment-only related files.
git clone https://github.com/webhood-io/webhood.git --depth=1 --branch=main
cd webhood
Copy the example .env
file in the root directory of the project:
cp .env.example .env
Next, we configure the only required variable SCANNER_TOKEN
. Other variables are optional and can be set later as documented here.
Create a authentication token for the scanner
docker compose run backend migrate
docker compose run backend create_scanner_token
Save this into your .env
as SCANNER_TOKEN
Start the deployment
docker compose up -d
Create a user
random=$(openssl rand -base64 16) # generate some random string, or just make your own password
docker compose run backend create_user -u admin -p $random && echo "Password is:" $random for user 'admin'
Start using it
Navigate to https://localhost:8443
(opens in a new tab) and login with the account you created in step 6
Known issues
Invalid interpolation format for "environment" option...
Cause: The docker-compose.yaml file includes some interpolation (opens in a new tab) magic to set correct configuration values from the .env file if they exist. Support for interpolation may not exist in older docker-compose versions.
Solution: To resolve this error, you need to either:
- Install the latest version of docker compose (opens in a new tab)
or
- Remove / manually set environment variable of the lines that produce the error in the
docker-compose.yaml
file.