Skip to content

Docker Setup

Alexander Elchlepp edited this page Mar 28, 2026 · 38 revisions

Table of Contents

fewohbee-dockerized provides a pre-configured docker-compose setup that includes everything needed to run the guesthouse management application in the current stable version. This includes a web server, database server, PHP, and the application itself.

This page describes how to use fewohbee with Docker and docker-compose.

Install Docker and docker-compose

The following example shows how to install Docker and docker compose on Debian 13 (Trixie) on an Odroid C2 (arm64). For other platforms please refer to the Docker documentation.

  • Make sure all dependencies are available

    sudo apt install apt-transport-https ca-certificates curl git

  • Add Docker's GPG key

    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
  • Add Docker's repository for the current architecture (e.g. arm64)

    sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
    Types: deb
    URIs: https://download.docker.com/linux/debian
    Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
    Components: stable
    Signed-By: /etc/apt/keyrings/docker.asc
    EOF
    
  • Install Docker and the docker compose plugin

    sudo apt update
    sudo apt install docker-ce docker-ce-cli containerd.io apparmor docker-compose-plugin
    

fewohbee-dockerized

Installation

  • Navigate to the target directory (recommended: /opt/) and download the docker-compose setup

    cd /opt
    git clone https://github.com/developeregrem/fewohbee-dockerized.git
    cd fewohbee-dockerized
    

    If not already installed, git must be installed first: apt install git

Known issues

  • Installation on a server without a public IPv4 address

    git clone will fail if you try to run the above command on a server without its own IPv4 address (i.e. IPv6-only). The reason is GitHub's lack of IPv6 support. See also the discussion here: missing IPv6 support

Configuration

All configuration lives in a single .env file (copied from .env.dist). It contains both Docker infrastructure settings (database passwords, SSL, hostname) and application settings (language, mailer, passkey, …).

Option A – Setup container (recommended, all platforms)

The setup container runs on all platforms (Linux, Windows, macOS) and only requires Docker:

# Linux / macOS:
docker run --rm -it -v $(pwd):/config developeregrem/fewohbee-setup

# Windows PowerShell:
docker run --rm -it -v ${PWD}:/config developeregrem/fewohbee-setup

The container interactively asks a few questions (hostname, SSL, language), generates passwords, and writes .env.

Option B – install.sh (Linux)

Alternatively, a Bash script is available for Linux that can also set up optional cron jobs like automated updates and database backups:

chmod +x install.sh
sudo ./install.sh

For additional configuration options (such as email or passkey login) see: Wiki -> Configuration

Advanced – custom PHP settings: PHP configuration is baked into the image (conf.ini). To add custom settings without modifying the image, set PHP_INI_SCAN_DIR=:/your/custom/path in the PHP service environment and mount a bind mount or named volume to that path. Any .ini files placed there will be loaded in addition to the built-in configuration.

Advanced – custom web server settings: The web service uses the prebuilt image developeregrem/fewohbee-web:latest. If you want to customize nginx locally, add bind mounts for the web service in docker-compose.override.yml instead of changing the base compose files. Typical overrides are replacing /etc/nginx/conf.d/site.conf, adding custom files under /etc/nginx/conf.d/site-enabled-http/ or /etc/nginx/conf.d/site-enabled-https/, or replacing snippets/templates under /etc/nginx/conf.d/snippets/ and /etc/nginx/conf.d/templates/.

Start/Stop the application manually

The install.sh script starts the application automatically. If you want to make configuration changes, you need to restart the application afterwards. All settings are in .env.

  • Stop the application from within the fewohbee-dockerized directory (/opt/fewohbee-dockerized/)

    docker compose stop

  • Start it again

    docker compose up -d

    The -d flag also ensures that the application starts automatically when the operating system reboots.

  • Check that all services are running

    docker ps

    The output should look similar to the image below. All services must be listed as "Up" under Status.

    docker ps

    If one of the services did not start correctly, you can access the container logs with e.g. docker compose logs web to see what went wrong. (Valid container names are: web, php, db, acme, redis)

Initialize the application

(not required if the install.sh script was used – the setup container prints this command at the end)

  • Wait until the PHP container has fully started (approx. 1–2 minutes on first launch). Monitor progress with docker compose logs -f php – once ready to handle connections appears, run the following command once:

    docker compose exec --user www-data php /bin/sh -c "php fewohbee/bin/console app:first-run"

    This command creates the first admin user, loads the required base templates, and optionally loads sample data.

  • Then open the application in a web browser (example):

    https://fewohbee

    If SELF_SIGNED=true is set in the .env file, the browser will show a security warning on the first visit. Accept the warning to proceed to the login page.

  • To get started with the application, please refer to the Getting Started guide.

Running behind a reverse proxy

If you run fewohbee behind an external reverse proxy (e.g. Traefik, Nginx Proxy Manager, Caddy) that already terminates SSL, you can use the simplified Compose configuration. This omits the acme container and only listens on plain HTTP.

Differences from docker-compose.yml:

  • No acme container (no internal SSL)
  • Web container listens on HTTP (default port 80, configurable via LISTEN_PORT in .env)
  • The reverse proxy forwards HTTPS requests to this HTTP port

When using the setup container (Option A), selecting reverse-proxy as the SSL mode automatically sets COMPOSE_FILE=docker-compose.no-ssl.yml in .env. This means all subsequent docker compose commands (including update-docker.sh) will automatically use the correct file — no -f flag needed.

To switch manually, set in .env:

COMPOSE_FILE=docker-compose.no-ssl.yml
LISTEN_PORT=80

The reverse proxy must be configured to forward requests to http://<host>:${LISTEN_PORT} and manage the TLS certificate itself.

Updates

Linux / macOS

The fewohbee-dockerized directory contains a script that can update the application fully automatically. Run the following commands:

chmod +x update-docker.sh
./update-docker.sh

This script pulls the latest docker-compose.yml and configuration via git pull, updates all Docker images, and downloads the latest stable version of the application. New environment variables are automatically added to .env – existing values are not changed. Newly added variables should be reviewed and adjusted as needed after the update.

Other platforms (e.g. Windows)

Run the following commands manually from within the fewohbee-dockerized directory:

docker compose pull
docker compose stop
docker compose up --force-recreate -d
# clean up old images
docker image prune -f

After the update, check the .env.dist file in the repository for any newly added variables and add them manually to your .env file if missing. Then restart the affected containers:

docker compose up --force-recreate -d php cron

Database backups

The fewohbee-dockerized directory contains a script to create a full database backup.

  chmod +x backup-db.sh
  ./backup-db.sh

Backups are stored inside the Docker volume db-backup-vol as compressed .tar.gz files (one per weekday, rotated weekly).

Accessing backup files:

Copy a backup file from the volume to your current directory:

# List available backups
docker compose exec db ls /dbbackup

# Copy a backup file to the current directory
docker compose cp db:/dbbackup/mysql_1.tar.gz .

In Portainer, backups can also be browsed under Volumes → db-backup-vol → Browse.

Restore a backup

cd /opt/fewohbee-dockerized

# make sure to copy file to be restored into the container
docker compose cp <file>.tar.gz db:/dbbackup/

# enter database container
docker compose exec db /bin/sh
cd /dbbackup

# look for the file you want to restore and untar it to get the sql file
ls -l
tar -xf <file>.tar.gz

# restore backup
mariadb -p$MARIADB_ROOT_PASSWORD -u root fewohbee < <file>.sql

# use Ctrl+D to exit the container at the end

Clone this wiki locally