Machine-translated – improvements welcome. Suggest an improvement
PC or mini PC with Linux¶
Tested: image automatically, device not yet
GitHub's machines test the image with every change on amd64 and arm64. There is no report from a particular device here yet. What that means is described under Tested platforms.
An old office computer, a retired laptop or a small mini PC with an Intel or AMD processor is quite enough for Ablago. This page is also the basis for virtual machines. For the Raspberry Pi there is a separate step-by-step guide with a setup script.
You need: 2 GB of memory or more, about 20 GB for the system and programs, plus space for your documents and backups. An SSD makes Ablago noticeably faster.
1. Install Linux¶
A lean server system without a desktop is enough, e.g. Debian or Ubuntu Server (LTS). During installation, also select the SSH server; then you can later operate the computer without a screen from your own PC.
2. Install Docker¶
For a computer that runs permanently, Docker recommends Docker's own package source: then Docker comes through the package manager apt and is updated together with the system. The commands below are taken unchanged from Docker's official guide for Debian or Ubuntu. Copy the boxes one at a time and wait each time until the prompt appears again. The Raspberry Pi guide explains every line.
First: get the tools ready (the same on Debian and Ubuntu):
sudo apt update
sudo apt install ca-certificates curl
Second: add Docker's package source – for Debian:
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
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
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
… or for Ubuntu:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
Third: install Docker (the same on Debian and Ubuntu) and allow your user to use Docker without sudo:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER # then sign out and in again once
docker compose version # checks that Compose is included
Other distributions (Fedora, RHEL, …) have their own guides in the Docker documentation.
For advanced users: Docker's installation script
Docker also offers a script that does everything above in one go:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
Docker itself recommends the script only for test and development environments, though, not for a computer that runs permanently. For your computer with real paperwork, take the way above. The script sets up the same package source; updates then also come via apt.
Official guide: Install Docker Engine · Use Docker without sudo
3. Start Ablago¶
To get started: one container (dms-komplett), without .env and password:
mkdir -p ~/dms && cd ~/dms
curl -fsSLo docker-compose.yml https://raw.githubusercontent.com/motom001/dms/main/deploy/komplett/docker-compose.yml
docker compose up -d
docker compose logs dms | grep -A1 Einrichtungscode
For advanced users: two containers (Ablago and PostgreSQL separately, see One or two containers?):
mkdir -p ~/dms && cd ~/dms
curl -fsSLo docker-compose.yml https://raw.githubusercontent.com/motom001/dms/main/deploy/nas/docker-compose.yml
sed -i 's#/volume1/docker/dms#./daten#' docker-compose.yml
echo "DB_PASSWORD=$(openssl rand -hex 24)" > .env
docker compose up -d
docker compose logs app | grep -A1 Einrichtungscode
With two containers, the data is then in ~/dms/daten; with dms-komplett directly in ~/dms (files, geheim, sicherung, postgres). If you have a separate disk for documents or backups, enter its paths in docker-compose.yml. Continue in the browser at http://<computer>:8080, as described under Any server with Docker.
4. Turn the computer into a server¶
- Don't go to sleep: a server system without a desktop normally doesn't sleep. On a laptop or with a desktop, switch off sleep mode:
On a laptop, also set
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.targetHandleLidSwitch=ignorein/etc/systemd/logind.confso it keeps running with the lid closed. - On again after a power cut: in the BIOS/UEFI, set Restore on AC Power Loss (or similar) to Power On. The containers then start again by themselves.
- Fixed address: in your router, always give the computer the same IP address (DHCP reservation). Then Ablago's address stays the same.
- System updates: on Debian and Ubuntu, the package
unattended-upgradestakes care of security updates.
Backup¶
Ablago's backups end up in the sicherung folder on the same computer. If the disk fails, they are gone too. So copy the folder elsewhere regularly, e.g. to a USB disk, a NAS or cloud storage (for instance with rclone). The backups are encrypted, so cloud storage only sees unreadable files. Exports are not included: a full export is unencrypted and is therefore kept in its own export folder, never with the backups. More under Backup.