Repository navigation
Docker (precompiled)
This guide details the Precompiled Zero-Touch Docker Deployment for hroot. This is the recommended deployment method for standard production environments, academic laboratories, and universities that want a fast, reliable, and maintenance-free setup.
In this mode, container images are pulled directly from the GitHub Container Registry (ghcr.io/wiso-forschungslabor/hroot:latest or your own custom fork's image). App secrets (SECRET_KEY_BASE, WebPush VAPID keypairs, and internal database credentials) are generated automatically on the first launch.
-
Key Advantages:
- Instant Zero-Touch Start: No time-consuming gem/asset compilation on your server, and no manual code cloning required to run the application.
-
Full In-Browser Setup: Database choice (internal Compose DB vs. external MySQL/MariaDB), schema migrations, SMTP/IMAP mail settings, and initial banking administrator account creation are completed directly through the Setup Wizard at
/setup. - Support for Custom Forks: Laboratories maintaining their own fork on GitHub can build their own precompiled images via GitHub Actions and deploy them just as easily.
-
One-Click In-App Updates: Seamless version checks and automated updates directly in the Admin UI (
/admin/options/check).
The easiest and recommended way to deploy HROOT is the automated One-Line Interactive Installer. It runs on any modern Linux distribution (Ubuntu, Debian, AlmaLinux, RHEL, Fedora, Rocky, Arch) and handles everything automatically:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/wiso-forschungslabor/hroot-documentation/master/install.sh)"(Alternatively, if you already cloned the repository locally: cd hroot && ./bin/install)
-
System & Docker Pre-Flight Check:
- Detects if Docker Engine and Docker Compose v2 are installed.
- If missing, offers to automatically install Docker via your system package manager (
apt,dnf,yum, orpacman). - Verifies unprivileged user permissions and adds the current user to the
dockergroup.
-
Container Registry Authentication:
- Prompts for your GitHub Username and Personal Access Token (PAT with
read:packages&reposcopes) and logs in toghcr.io.
- Prompts for your GitHub Username and Personal Access Token (PAT with
-
Target Directory:
- Prompts where HROOT should be installed (Default:
./hroot).
- Prompts where HROOT should be installed (Default:
-
Docker Image Selection:
-
Official Upstream:
ghcr.io/wiso-forschungslabor/hroot:latest(Default). -
Custom Fork: Specify your repository (e.g.
your-university/hroot) and optional release tag (e.g.v4.0-beta5orlatest).
-
Official Upstream:
-
Network & Domain Configuration:
- Enter your domain (e.g.
hroot.example.orgorlocalhost:3000).
- Enter your domain (e.g.
-
Database Architecture:
- Internal Docker MySQL 8.0: Auto-generates cryptographically secure root and app database passwords.
- External Database Server: Enter remote campus MySQL/MariaDB credentials.
-
Setup Protection Token:
- Auto-generates a secure
HROOT_SETUP_TOKENto protect the in-browser/setupwizard.
- Auto-generates a secure
-
Orchestration & Secret Generation:
- Generates
SECRET_KEY_BASE, writes.env, createsdocker-compose.yml, and sets up initial directory volumes.
- Generates
-
Launch:
- Pulls the precompiled images and starts all services in the background (
docker compose up -d).
- Pulls the precompiled images and starts all services in the background (
If you prefer to start manually without the interactive wizard:
-
Log in to GitHub Container Registry (
ghcr.io):echo $GITHUB_PAT | docker login ghcr.io -u <github-username> --password-stdin
-
Create target directory and download
docker-compose.yml:mkdir -p /srv/hroot && cd /srv/hroot curl -O https://raw.githubusercontent.com/wiso-forschungslabor/hroot/master/docker-compose.yml
-
Launch containers with domain & setup token:
-
For Official Upstream Image:
APP_DOMAIN=hroot.example.org HROOT_SETUP_TOKEN=your-secure-setup-token docker compose up -d
-
For Custom Fork Image:
HROOT_IMAGE=ghcr.io/<your-account>/hroot:latest UPDATE_GITHUB_REPO=<your-account>/hroot APP_DOMAIN=hroot.example.org HROOT_SETUP_TOKEN=your-secure-setup-token docker compose up -d
-
For Official Upstream Image:
Once the containers are running:
- Open
https://<APP_DOMAIN>/setup(orhttp://localhost:3000/setup) in your web browser. - Enter your
HROOT_SETUP_TOKENto unlock the assistant. - Complete the tabs:
- Database: Select internal Docker DB or external MySQL/MariaDB server, click „Test Connection“, and then „Initialize DB“.
-
E-Mail & IMAP: Enter
CONTACT_EMAILand SMTP server credentials, then verify using „Send Test E-Mail“. - First Superuser: Enter name, email, and password for your initial banking administrator.
- Click Finish initial setup to save settings and sign in to
hroot.
Tip
Next Step: After completing the wizard, see First steps after installation for the step-by-step roadmap to configure participant pools, custom fields, email templates, and financial settings.
Depending on your server infrastructure (as defined in the Installation Decision Matrix), choose the appropriate execution scenario:
Best for: A dedicated server running only a single hroot instance, where Docker handles SSL automatically on ports 80/443.
docker compose up -dBest for: Hosting multiple independent laboratories or multiple hroot instances (e.g. testing, staging, and production) on the same server.
This setup routes multiple instances through a central reverse proxy (nginxproxy/nginx-proxy) with automated Let's Encrypt SSL certificates.
- To start an instance connecting to a shared proxy:
docker compose -p <project-name> -f docker-compose.yml -f docker/overrides/shared-proxy.yml up -d
- Full Guide & Multi-Lab Example: For the complete architecture explanation, central proxy setup, and a step-by-step example running 3 parallel instances, see Docker Multi-Instance Setup.
Best for: Serving hroot behind an existing NGINX or Apache web server already running directly on the Linux host.
docker compose -f docker-compose.yml -f docker/overrides/app-only.yml up -dBest for: Connecting hroot to an existing, centralized university MySQL/MariaDB server cluster.
docker compose -f docker-compose.yml -f docker/overrides/ext-db.yml up -dAdministrators can check for updates and trigger system upgrades directly in the web application:
- Navigate to Admin
$\rightarrow$ Options$\rightarrow$ System Check & Updates (/admin/options/check). - Compare the installed Git commit with the latest release available on GitHub.
- Click Update System Now to trigger an automated, fail-safe update cycle:
- 1. Database Snapshot: A safety dump of MySQL is saved prior to any changes.
-
2. Fast Image Download: The new Docker layer is downloaded from
ghcr.io. -
3. Schema Migrations:
rake db:migrateruns in isolation. - 4. Health Check: The container starts and readiness is polled for up to 180 seconds.
- 5. Automated Rollback: If any error occurs, the previous image and database state are restored.
For a detailed comparison of all update methods (including CLI and source-build updates), see Updating an existing installation.
By default, all containers in docker-compose.yml (db, web, cron, proxy, acme, mail, sms-gateway) are configured with:
restart: unless-stopped-
What happens on host reboot:
- The host operating system boots and starts the Docker daemon (
docker.service). - The Docker engine inspects container states and automatically relaunches all containers that were active before the shutdown.
- Services that were explicitly stopped by an administrator via
docker compose downordocker compose stopwill remain stopped across reboots.
- The host operating system boots and starts the Docker daemon (
-
Prerequisite: The Docker daemon must be enabled in systemd (the interactive installer enables this automatically):
sudo systemctl enable --now docker -
Optional: Managing HROOT via systemd (
hroot.service) If your IT policy prefers managing services viasystemctl, you can create a systemd unit:sudo tee /etc/systemd/system/hroot.service > /dev/null <<'EOF' [Unit] Description=HROOT Docker Compose Application Stack Requires=docker.service After=docker.service network-online.target Wants=network-online.target [Service] Type=oneshot RemainAfterExit=yes WorkingDirectory=/srv/hroot ExecStart=/usr/bin/docker compose up -d ExecStop=/usr/bin/docker compose down TimeoutStartSec=0 [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable hroot
You can then start, stop, and inspect the stack using standard systemd commands:
sudo systemctl status hroot sudo systemctl stop hroot sudo systemctl start hroot
Proceed directly to the First steps after installation checklist to configure participant pools, profile questionnaires, notification templates, and lab parameters in the Site Settings.
-
-
Subject pool and user management
-
Experiment management