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

Required:

This guide assumes that you have Docker Compose V2 installed as Docker plugin (docker compose). See note about migrating to V2.

Deployment

1

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
2

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.

3

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

4

Start the deployment

docker compose up -d
5

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'
6

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:

  1. Install the latest version of docker compose

or

  1. Remove / manually set environment variable of the lines that produce the error in the docker-compose.yaml file.