Bugsoft Portal with Docker
Install, update and restore with the Docker bundle: unpack, check, answer a few questions and start.
In short
- Check and unpack the Docker bundle in
/opt/bugsoft. - Run
sudo docker/host/bugsoft-init-envand answer the questions. - Start with
sudo docker compose up -d --wait. - Store the emergency account and the keys in your password vault.
With Docker, Bugsoft Portal runs in a few containers on one Linux server: the portal, the scheduled tasks, MariaDB, the
backups and (if you want) Caddy for HTTPS. Bugsoft gives you one file: the Docker bundle. It contains
everything: Bugsoft Portal itself, the Dockerfile, the compose files and the scripts in the folder
docker/. You do not need Git or access to the source code.
What you need
- A 64-bit Linux server with Docker Engine 24 or newer and Docker Compose 2.24 or newer
(
docker compose version). - At least 2 CPUs, 2 GB of memory and 10 GB of free disk space.
- A DNS name for the portal that points to the server, for example
apps.klaverveld.example. - For HTTPS with Let's Encrypt: ports 80 and 443 open from the internet. You can also use your own certificate or your own proxy; the script asks.
- The bundle
bugsoft-docker-<version>.tar.gzwith the.sha256and.sigfiles next to it, and the public release key of Bugsoft (on bugsoft.eu, with the releases).
Install
1. Check and unpack the bundle
First check that the bundle really comes from Bugsoft and was not changed on the way. The two commands must show
OK and Verified OK. If either shows something else, do not unpack the bundle, and contact
ugurs156@gmail.com.
sha256sum -c bugsoft-docker-<version>.tar.gz.sha256 openssl dgst -sha256 -verify bugsoft-release.pem -signature bugsoft-docker-<version>.tar.gz.sig bugsoft-docker-<version>.tar.gz
Unpack the bundle in a folder of its own, only for Docker:
sudo mkdir -p /opt/bugsoft sudo tar -xzf bugsoft-docker-<version>.tar.gz --strip-components=1 -C /opt/bugsoft cd /opt/bugsoft
2. Create the settings
sudo docker/host/bugsoft-init-env
The script asks a few questions:
- the address of the portal, for example
https://apps.klaverveld.example; - the e-mail address of the emergency account (the local account for emergencies);
- how HTTPS works: Caddy with Let's Encrypt, Caddy with your own certificate, or your own proxy or load balancer;
- how people sign in. With set up sign-in later in Admin (the default), you sign in with the emergency account after the first start, and set up Microsoft Entra ID or another sign-in system in Admin › Settings › Sign-in › Connections. With set up Microsoft Entra ID now, the script asks for the tenant, the app and the client secret. These are then set on the server, and Admin only shows them;
- what the dashboard starts with (empty by default), and a second place for the backups.
The script writes .env (readable by root only) and the folder secrets/ with long, random
passwords for the database. New installations use the name bugsoft everywhere: the stack, the database, the
database user, the image and the backup folder /var/backups/bugsoft.
You can also automate it, without questions:
docker/host/bugsoft-init-env --yes --url https://apps.klaverveld.example --admin-email emergency@klaverveld.example --https letsencrypt --acme-email it@klaverveld.example.
All options: docker/host/bugsoft-init-env --help.
3. Start
sudo docker compose up -d --wait
The first time, the server builds the image (a few minutes). Then Bugsoft Portal installs itself: the database, the keys,
the emergency account with its authenticator key, and the Bugsoft Connect key. It is ready when all containers are
healthy (sudo docker compose ps).
4. Store the emergency account and the keys
Do this right away. Without the keys, saved passwords cannot be read after a restore.
(umask 077; sudo docker compose exec -T app cat /data/.env > bugsoft-sleutels.env) sudo docker compose exec app cat /data/install-credentials.txt sudo docker compose exec app rm /data/install-credentials.txt
Put bugsoft-sleutels.env, the password of the emergency account and the authenticator key in a password
vault, apart from the backups. Then remove the file from the server (shred -u bugsoft-sleutels.env).
5. Sign in
Open the address of the portal and sign in with the emergency account (e-mail, password and the code from the authenticator app). If you chose "later" in step 2, set up sign-in for everyone now in Admin › Settings › Sign-in › Connections. Then continue with First steps after the installation.
Update to a new version
Unpack the new bundle (checked as in step 1) in a new folder, copy the settings, and run the update script there. Do not unpack over the old folder: that leaves files behind that the new version no longer has.
sudo mkdir -p /opt/bugsoft-<new version> sudo tar -xzf bugsoft-docker-<new version>.tar.gz --strip-components=1 -C /opt/bugsoft-<new version> sudo cp -a /opt/bugsoft/.env /opt/bugsoft/secrets /opt/bugsoft-<new version>/ cd /opt/bugsoft-<new version> && sudo docker/host/bugsoft-upgrade
Do you have your own certificate (certs/) or a compose.override.yaml? Copy those too.
What bugsoft-upgrade does:
- It makes a backup and keeps the running version.
- It builds the new version, starts it, and waits until everything is healthy.
- If the new version does not start healthy, it puts the previous version back by itself, and shows the command to restore the backup it just made.
The data stays in the same volumes, because the name of the stack is in .env.
Every month, also without a new version, run sudo docker/host/bugsoft-upgrade in the current
folder. That gets you the security updates of PHP, Apache and Debian.
Restore a backup
The container backup makes a backup in /var/backups/bugsoft twice a day. A restore is one
command, also on a new server (with the same .env and secrets/):
sudo docker compose stop app cron sudo docker compose run --rm -T restore latest --keys - < bugsoft-sleutels.env sudo docker compose up -d --wait
More about backups: Backups and restoring.
Images from a registry (optional)
By default your server builds the image itself from the bundle. If Bugsoft publishes ready-made images, you can
skip the build: put BUGSOFT_IMAGE=<registry>/bugsoft:<version> in .env. Updating is then
sudo docker/host/bugsoft-upgrade <version>.
Stuck? See Questions and problems or contact Bugsoft at ugurs156@gmail.com.