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
- Docker Compose
- Common cli tools (e.g.
curl
,wget
) - Git
Required:
This guide assumes that you have Docker Compose V2 installed as Docker plugin (docker compose
). See note 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 the 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
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 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
or
- Remove / manually set environment variable of the lines that produce the error in the
docker-compose.yaml
file.