Skip to content

Machine-translated – improvements welcome. Suggest an improvement

Setup and operation

How to install Ablago – on Synology, UGREEN, QNAP, TrueNAS, Unraid, umbrelOS, ZimaOS, CasaOS or any server with Docker – is described in its own section How do I get a DMS?. This page describes what comes afterwards: the setup assistant, the database connection, folders, settings and operation behind a reverse proxy.

Can't find an area in the sidebar?

Some areas of the workbench, for example Maintenance mode, Database connection or Maintenance operations, are hidden in smaller levels such as Beginner or Household. At the bottom of the sidebar it says how many areas are hidden; one click shows them. You can show them permanently under Customise the workbench. Hidden does not mean switched off.

Ablago runs – recommended – as two containers: the application (ghcr.io/motom001/dms) and PostgreSQL (postgres:18). Alternatively there is ghcr.io/motom001/dms-komplett, in which both run in one container (comparison under One or two containers?). With every push to main, GitHub Actions rebuilds both images (tag main, additionally a short hash per commit and the version number per release).

Set up first, then open up

Only make Ablago reachable via a reverse proxy or port forwarding once setup is complete. The setup code does protect against a stranger taking it over – it's still safer.

The setup assistant

On the first visit, an assistant guides you through setup in twelve steps. Every step has a ? at the top that opens exactly the matching section here.

First collect, then set up: language, code, database and "New or backup" take effect immediately because they are technically necessary. From "Library" onwards the assistant only collects: name of the Library, your account, what you use Ablago for, what Ablago may do, packages and optional items. Nothing is created in the process. With Back or a click in the step bar you can get to each of these steps at any time. At the end the summary shows everything on one page, and only Set up now gets going. If you cancel before that or reload the page, no half-finished setup remains. The browser remembers your entries until then, but not passwords.

No individual save buttons: in every step, Next takes over everything in the fields, including suggestions you haven't changed (they carry the notice "suggested – taken over with "Next""). Fields left empty stay empty, and there are no hidden defaults. Back and Next are in the same place at the bottom of every step.

Load from configuration file: at the top right, small next to the help, you load a saved setup. Ablago then pre-fills all steps and jumps to the summary, or to the first step that doesn't fit (with the reason). Passwords are never in the file; the assistant asks for them. Structure, schema and example: Setup as a file.

Language

Language

The first step asks in which language Ablago talks to you: Deutsch or English. Your browser's language is suggested. The choice applies immediately to the assistant and, with Set up now, becomes the installation's language and your own. Later you change it under Workbench → Languages, and every person their own under My account.

Setup code

Setup code

So that nobody else in the network sets up Ablago, it first asks for a code like K7PX-3MNA-Q9TR. It is in two places:

  • in the container's log – in the NAS's Docker interface, open the project's container app and look at the log (on UGREEN Docker → Container → dms-app → Log, on Synology Container Manager → Container → Details → Log) or docker compose logs app (with dms-komplett: docker compose logs dms). You are looking for the line Einrichtungscode für Ablago: XXXX-XXXX-XXXX;
  • in the file EINRICHTUNGSCODE in the folder geheim (in the template /volume1/docker/dms/geheim).

Where exactly that is on your device is shown by the guide for your platform under How do I get a DMS? – for Synology, UGREEN, QNAP, Unraid, TrueNAS, umbrelOS, ZimaOS, CasaOS and others.

After "Set up now" the code is worthless; Ablago deletes the file. After ten wrong attempts it blocks input for ten minutes.

Database

Database

Server (in the template db), port 5432, database and user dms and the password from the .env. Check connection reports clearly what's wrong – server can't be reached, wrong password, database missing (with a button to create it if the user may). Take over and continue saves the connection and starts Ablago – without restarting the container; it creates the tables itself. The step is skipped if a connection already works (see Database connection).

Set up anew or restore

Set up anew or restore

With an empty database, Ablago asks whether you are starting anew or bringing back a backup. Restore leads into the process under Restoring with its own progress and ends at the sign-in with the previous credentials. Set up anew leads to collecting.

Name of your Library

Name of your Library

The name of your Library, usually the family's name ("The Example family") or your business's ("Example office"). It appears as the lettering in the header, in the browser tab and on the sign-in page (can be changed under Workbench → Themes).

Your account

Your account

Name, email address and password of your own account – with your one email address. You set the password directly here; there is no invitation link for yourself. There is no separate "Administrator" account and no "first user" next to it: your account gets Full administration and works quite normally in the Library (see Who may manage Ablago?).

In everyday life you work without administration permissions. For setting things up you switch via "Administer Ablago". That way nothing important can break by mistake.

Next checks address and password straight away, but the account is only created with Set up now. Afterwards you are signed in, straight into administration mode. The assistant offers you two-factor sign-in at the end (Done). You invite further people after setup under Workbench → Users – the overview reminds you that a second person should be able to manage.

Use

Use

What will you use Ablago for? Three answers: For home, For my work or my business or Both. You can only continue with an answer; you can change it later under Workbench → Use.

  • For my work or my business and Both set the attribute used for work: folder types then show their work-related fields, and packages that keep records longer for work use set this up straight away when installed.
  • The answer helps decide which packages Ablago chooses (Packages): for home Basis, Household, Contracts and Invoices; for work Basis, Contracts, Invoices and Compliance; for "Both" all of them – as far as they exist in the catalogue and What may Ablago do? allows them.
  • How much should the Workbench show? After the answer you choose one of the five levels Beginner, Household, Self-employed, Business or Everything. Preselected is Beginner for home and Self-employed for work. Everyone who manages can later choose a different level for themselves (see Customising the workbench).

Your organisation: for work use, the step asks right below for your own organisation – name, address, email and phone. Only the name is required, everything else is optional. With Set up now, Ablago creates an organisation with the attribute own organisation from it, so Ablago knows who "we" are, for example for GDPR access requests. This needs the Basis package (1.7.0 or later) – once an organisation is entered, Basis is required, and the summary tells you if it is missing. If you leave all fields empty, Ablago creates none; you can do that later in the library.

What may Ablago do?

What may Ablago do?

Here you decide once what Ablago may do – for the whole installation (see What Ablago may do). Two questions, one line per answer; the explaining sentence is shown under the chosen one, below it in one sentence what this means for you. The recommended answers are preselected:

  • Which packages may Ablago use? None – only Ablago itself, Templates only, Also helpers that only work here (recommended) or Also helpers that use services on the network. What comes with Ablago, such as text recognition, runs with every answer.
  • How much should Ablago do on its own? Nothing on its own, Recognise and propose (recommended) or Do everything, I check afterwards.

It is saved with Set up now, before the packages. If your provider set maximum values in the setup file, higher answers are locked ("Set by your provider"). You can change everything later in the Workbench overview under What Ablago may do. If you change the answer to the first question here, Ablago chooses the packages anew in the next step.

Adding packages

Ablago sets up these packages for you

Installation only happens with Set up now; here you only see what is coming. Only in this step does Ablago query the official package catalogue – before that it opens no connection for it. The request goes to catalog.ablago.app (served by GitHub Pages); only the request itself goes out, no data from your Library.

Ablago sets up these packages for you: Ablago chooses the packages itself – matching What may Ablago do?, your answer in the Use step and what the catalogue recommends (including text recognition and notifications). The list shows one sentence per package, without ticks. If a package uses services on the network, the destination is named ("Uses services on the network: …"). What the answer to the first question does not allow is listed below under Not included, with one sentence of reason – for example "“WebDAV backup” uses services on the network – you have not allowed that." The rules:

  • Ablago only chooses during setup and only from the official, validly signed catalogue. If the catalogue is not validly signed, it chooses nothing on its own.
  • Never beyond the first question: a package above the limit does not get into the choice; the server does not install it either.
  • No packages are added on their own later, even if the catalogue recommends new ones.
  • The list of installed packages and who chose them (Ablago or you) is recorded in the evidence journal (operation, packages).

Next leads to one page with the packages' questions: the permissions of all packages with code (one tick for all), names only in case of conflicts, supplied automations and required settings, then Take over packages and continue (see Installing several packages in one step). Examples are only asked about under Optional items.

Choose yourself shows the whole catalogue as under Workbench → Packages. What the first question does not allow is greyed out, with the reason in words. Dependencies come along, e.g. "Basis" for "Household"; Further languages? asks for additional languages of text recognition. Show Ablago's choice leads back. Skip is possible at any time; you add packages later under Workbench → Packages.

If the catalogue can't be reached (no internet), the step says so clearly: then the packages are missing, for instance text recognition. Skip the step and add the packages after setup under Workbench → Packages, there also with a bundle file that you put together on another device on the catalogue's website (see Installing packages without internet).

Optional items

Optional items

Five sections of the same structure, without save buttons of their own:

  • Ablago's address, suggested with the address in the browser. Clear the field if Ablago is not to have a fixed address.
  • Region: the state for public holidays, at first none. You set country and time zone under Workbench → Settings → Region.
  • Examples: a single question, Start with an example Library – a small Library of an invented family from the packages' examples, gone again in one click (see Example Library). It needs the packages Basis, Household and Contracts; if they are not in the choice, the tick is locked and says why.
  • Email sending: only after the tick "Set up email sending now". For email sending your address and password are usually enough; the assistant suggests server, user and sender and marks them, Next takes them over into the summary. Sending is only set up with Set up now. You can test it after setup under Workbench → Email and address.
  • Emergency contacts: people you trust for an emergency, with name, email and optionally phone and note. They get no access, only a short info email without a link once sending is set up, and appear on the emergency sheet under "Whom to ask?". They are added with Set up now; later you manage them under Workbench → Encryption. They are deliberately not in the configuration file – it's third-party data.

Everything can also be set later in the Workbench.

Summary

Summary

Everything on one page, each section with Change: Library, your account (with "Full administration"), use (with the Workbench template and your organisation), what Ablago may do (two sentences), packages (with the number of switched-on automations and whether Ablago chose them) and optional items. Passwords are only shown as "set". After Change, Next leads back to the summary; everything else stays as it was.

Save as file stores the setup as a configuration file, without passwords and without the key.

Set up now checks everything once more and then carries it out, with progress: creating the Library and your account, creating the key, saving address, state, use, what Ablago may do and email sending, installing packages, creating your organisation and the example Library. If something doesn't work, it says what and why – each message once. If the packages cannot be installed, setup still goes on: the reason is shown at the stage, organisation and example Library follow anyway, and you add the packages later under Workbench → Packages. What is already done stays; with Change you correct the entry, with Try again it continues at this point. Nothing is created twice.

Done: emergency sheet

Done

During setup, Ablago created a new key. It encrypts stored passwords and all backups (see Encryption); the emergency sheet contains it for printing, plus the emergency code with which you get back in if you have locked yourself out (I can't get in any more). Complete setup only works once you have downloaded the emergency sheet. Print it and put it with your important documents, because without the key no backup can be brought back.

Downloading the emergency sheet is a sensitive action: if "Set up now" took longer than 10 minutes (for instance with many packages), Ablago asks for your password once more beforehand.

Below it, the assistant offers two-factor sign-in – with Set up now (authenticator app on the phone, then keep the recovery codes safe) or Later. It is voluntary; it can be set up at any time under My account → Security → Two-factor sign-in. If you set it up now, Ablago asks for password and code once when completing, because your sign-in has changed.

If the assistant runs over HTTPS (or on localhost), it then offers a passkey: Add now creates it on this device (fingerprint, face or PIN); Later works too – at any time under My account → Security → Passkeys. Without HTTPS the offer is missing, because passkeys do not work there (see Passkeys).

Plus links to both manuals, "Report a problem" as a prepared GitHub issue and the note about GitHub Sponsors.

Afterwards: how to continue is summarised under Setting up in five steps – switch on the schedule under Workbench → Backup, create your own folder types and invite more users – ideally also a second person who may manage.

For the self-employed and small businesses: if you chose "For my work or my business" or "Both" in the Use step, the level Self-employed is preselected – with number sequences, archive mode, data protection and everything from Household; Business suits businesses with several people. Otherwise the slim level Beginner is preselected; you can switch at any time under Workbench → Customise workbench (see Overview).

Database connection

The connection to PostgreSQL is in the file datenbank.json in the folder /data/geheim (only readable for the container, with password). It leads:

  • If the file exists, Ablago uses it – even if DATABASE_URL is set in the Compose file. If the variable differs, the Workbench overview points this out; it is ignored and can be removed.
  • If it doesn't exist but DATABASE_URL does (existing installations), Ablago checks the variable at start-up and takes it over into the file. Afterwards the variable is superfluous.
  • If it doesn't exist but DMS_DB_PASSWORT does (templates for Synology, UGREEN, QNAP, TrueNAS, Unraid), Ablago uses the standard connection – server db (or DMS_DB_HOST), port 5432, database and user dms – with this password and takes it over likewise. That way the password is only in the Compose file once, without having to escape special characters for a URL.
  • If neither exists – or the connection doesn't work –, Ablago starts in setup mode: it only delivers the assistant and asks for the connection (with setup code). All other interfaces answer with 503 until then. A saved connection whose database just can't be reached yet (the database container is still starting) it keeps trying every ten seconds.

Under Workbench → Database connection you see and change the connection. The section Connection says what Ablago is connected to right now ("Currently connected: dms@postgres:5432/dms · in operation"). To change: first Check connection, then Take over. The new connection applies after a restart (Restart now – in the container, Docker starts Ablago again straight away). The data doesn't move along; for moving to another database use a backup.

Which PostgreSQL version: Ablago is tested with PostgreSQL 18; that is what dms-komplett and the templates include. At least 16 is needed: with 15 or older Ablago doesn't start and states the reason on the start page. With 16 or 17 it runs but writes a note to the log on start – moving to 18 works via a backup (Updating → PostgreSQL 18). With your own database, Ablago should log in with SCRAM (password_encryption = scram-sha-256, scram-sha-256 in pg_hba.conf): MD5 passwords are deprecated from PostgreSQL 18. The templates and dms-komplett already use SCRAM. You switch a password stored with MD5 by setting it once more after changing password_encryption (ALTER ROLE dms PASSWORD '…'). As long as Ablago still logs in with MD5, the workbench overview and system status point it out; not with SCRAM and not when logging in without a password over the socket.

The file also contains the Library id (formerly the environment variable HAUSHALT_ID). Existing installations take it over at the first start; the variable can be removed afterwards.

Below the connection, the page shows how the database is doing in operation: the long database accesses and what is running right now. This used to be under Maintenance and troubleshooting → System health; old links and bookmarks lead here.

Database connection: long database accesses

Long database accesses

Every database access is timed. Whatever takes longer than a threshold lands in the list and as a warning in the log (module datenbank) – there, as one line per minute and kind (route pattern or access) with count, highest and average duration; the list still shows each one. Directly above the list you set:

  • Long from – the threshold in milliseconds (default 500),
  • Keep – how many days the entries stay (default 30).

The list shows the newest at the top, about ten entries; you scroll within it. A click on an entry expands it: query, caller (request and user), duration and time. A database access is a method of the data access layer (e.g. mappen.seite for one page of a view) and can comprise several SQL statements.

What is running right now

The queries running in the database right now, with duration, state and process – updated every five seconds. If any have been running longer than the threshold, a notice points this out.

Email and address

Under Workbench → Email and address you set what used to be environment variables. Changes apply immediately, without a restart.

Only emails that someone triggers or switches on go via the mail server: sent folders including documents, the daily summary (folder titles and links), invitations and password links as well as access copies and retrieval links. An overview of all ways is under What leaves your Library.

Email and address in the Workbench

  • Ablago's address – at this address users open Ablago, e.g. http://nas.home.arpa:8080 or https://ablage.example.org. It is in the links in the emails. As long as none is maintained, Ablago takes the address under which it is currently being called for links on the page; Take over this address saves it. Links in emails require a maintained address: without it, Ablago sends no invitations or password links by email but shows them in user management to pass on, and “Forgot password” sends no email. The reason: the address of a request is chosen by whoever sends it – otherwise someone could make Ablago send a genuine email with a link to their own server. If it begins with https://, sign-in then only works via HTTPS. Passkeys are bound to this name as well: if it changes, existing passkeys no longer fit – the Workbench points this out when you change it.
  • Email sending – your own address and password; Ablago suggests server, port, user and sender, all fields are under Advanced. Also sign-in via OAuth for Microsoft 365 and Google. Check connection signs in to the server without sending anything; Send test email sends an email to an address of your choice – both with the values in the form, also before you save. If something fails, Ablago names the cause, with the server's answer below. Everything about it, with notes per provider: Email sending.
  • Allow self-signed certificate – only for your own mail server in the home network.
  • The sender is also the sender when users send a folder by email. Ablago enters the user's address as Reply-To – so replies reach them without Ablago faking outside senders (many recipients would classify that as spam). The daily summary of tasks needs the same setting.
  • Without email sending (switch "Sending emails" off), user management shows the invitation and password links to copy; "Forgotten password" is then reset by whoever administers Ablago.

Open help online

Ablago opens help from the built-in manual: it works without internet but shows no screenshots. With the switch Open help online, question marks, the assistant, tips and tours open the online help on help.ablago.app instead, with pictures, in the person's language. This applies to all users.

  • Default: off. Your browser loads the online help from the internet; the site's host (GitHub Pages) sees your IP address (What leaves your Library).
  • Online there is only the current edition of the manual. If you have not installed the newest version, it may already describe something newer.
  • Open built-in manual next to the switch always opens the built-in manual, even without internet. Clicking on inside it stays in the built-in manual.
  • The setting does not apply in the setup assistant or on the emergency pages.

Password encrypted

Ablago stores the SMTP password encrypted; you create the key for this once under Workbench → Encryption. As long as there is none, no password can be saved. The password is never returned to the interface. Still, best use a password of its own just for sending, for instance an app password from your mail provider.

Folders and volumes

The folders in the container are fixed. Where they point on the NAS you decide solely via the volumes of the Compose file – there are no environment variables for this.

Folder in the container Content Volume in the template
/data/files uploaded documents, logos, images of reported errors /volume1/docker/dms/files
/data/geheim key for stored passwords (dms.schluessel), database connection (datenbank.json), setup code (EINRICHTUNGSCODE, only until setup), RESCUE file /volume1/docker/dms/geheim
/data/sicherung backups, encrypted /volume1/docker/dms/sicherung
/data/export (optional) exports: full export, Export my data, access copies – unencrypted, deleted after downloading or after 7 days. Never put it in the backup folder commented out: /volume1/docker/dms/export
/eingang (optional) intake folder for scanner and NAS /volume1/docker/dms/eingang

Each of the three folders /data/files, /data/geheim and /data/sicherung must be a volume of its own; otherwise its content is gone as soon as the container is recreated (e.g. on an update). /data/export needs no volume of its own – without one it is inside the container, and exports in it are gone after an update. The database is in the PostgreSQL container's volume – with the image dms-komplett in the fourth folder /data/postgres. How much space is free in each folder is shown by Workbench → System health and Workbench → System health → Version and updates.

    volumes:
      - /volume1/docker/dms/files:/data/files
      - /volume1/docker/dms/geheim:/data/geheim
      - /volume1/docker/dms/sicherung:/data/sicherung

From an older version

Formerly FILES_DIR, DMS_SCHLUESSEL_DATEI and DMS_SICHERUNG_DIR set the folders. If one of them is still in the Compose file with the fixed value (e.g. FILES_DIR: /data/files), everything keeps running; the log and the Workbench overview point out that you can remove them. If it points to another folder, Ablago doesn't start – otherwise it would suddenly see an empty files folder. The message in the container's log then names which volume must point to the fixed folder instead. See Updating.

Settings

These settings are environment variables in the Compose project:

Variable Meaning
DATABASE_URL Only for switching over: taken over into the database connection at the first start and ignored afterwards
DMS_DB_PASSWORT, DMS_DB_HOST, DMS_DB_PORT Instead of DATABASE_URL: password (and server, default db, and port, default 5432) of the standard connection; likewise only for the first start
DMS_EINRICHTUNGSCODE aus: setup assistant without a code – for app stores in which the container log can't be read without a command line. Until whoever administers Ablago is created, anyone in the home network can then take over setup. From outside private networks (also via a reverse proxy, see TRUST_PROXY) Ablago refuses setup without a code; the start log says "ohne Einrichtungscode – nur aus dem Heimnetz" (without setup code – home network only)
TRUST_PROXY Whom Ablago believes a reverse proxy's information from. Not set or auto: your own computer and private networks – fits almost always. false (also 0, no, off, nein): nobody, true: everyone, or a list like 172.18.0.0/16. If a network covers the gateway of the Docker network, Ablago also believes requests that merely come through the gateway – then enter only your proxy's address, e.g. 172.17.0.1; the Workbench points this out. An invalid value counts as false, with a message in the log. See Behind a reverse proxy
DMS_EINBETTEN Pages that may embed Ablago (e.g. a dashboard), such as https://ha.example.org http://nas.home.arpa:8123. Not set: only Ablago itself. See Security headers
LOG_LEVEL Base level of the log: debug, info (default), warn, error. debug applies from the first line of the start and ends by itself after 24 hours (see Debug mode)
PORT, HOST Port (default 3000) and address (default 0.0.0.0, all) on which Ablago listens in the container. Normally you do not change PORT but the port to the outside in the Compose file (in the template 8080:3000, e.g. 8090:3000). The image's built-in health check follows PORT; if you set HOST to a single address, it must include 127.0.0.1, otherwise the container counts as unhealthy
DMS_PROZESSE Number of processes for requests, 1–16 or auto (2 processes from 4 cores and 8 GB that the container may use, otherwise 1). Default: auto – with dms-komplett, with the image dms (never more processes than DMS_DB_VERBINDUNGEN carries); back with DMS_PROZESSE=1. See Technology → Several processes
DMS_DB_VERBINDUNGEN Maximum number of database connections for all processes together (before: per process), 2–100 (default 10, 4 more for each further process). With one process as before. Ablago uses one of them only for locks (schedules, installing packages), the rest for requests and work. Only for larger installations with more cores, see Technology → Many simultaneous requests
DMS_MAX_ANFRAGEN From this many simultaneous requests (per process), Ablago immediately answers with "very busy right now" (HTTP 503), 20–10,000 (default 250), see Technology
DMS_ARBEITER Number of workers for PDF and exports per process, 1–16. Not set: half of the container's cores, at least 1, at most 4 – divided up with several processes. 0 switches them off (only for troubleshooting)
PUID, PGID Only as an exception: user and group Ablago runs as inside the container. Not set: like the owner of the mounted folders; if they belong to root, 1000. When set, they always take precedence, and on start the image takes over the folders for these IDs. See Without administrator rights
DMS_WERKZEUG_SPEICHER_MB Memory per call of a document tool (poppler, qpdf) in MB, 128–65536. Not set: 1024; 0 = no limit. See Without administrator rights
DMS_HINTERGRUND_NICE How much lower the priority of background work is than that of requests (nice value, 0–19). Not set: 10. 0 switches it off
DMS_ZWISCHENSPEICHER Only for troubleshooting: aus switches off the caches for counts, numbers of results and dates – everything is calculated afresh on every request, Ablago gets slower. System health and the load test report point this out. See Troubleshooting → Is it the cache?
DMS_EINGANG Only for special cases: another location of the intake folder in the container (default /eingang). The usual way is to mount the NAS's folder on /eingang

Behind a reverse proxy

If Ablago runs behind a reverse proxy (Nginx Proxy Manager, nginx, Caddy, Traefik, your NAS's proxy …), only one thing needs doing: enter the public address in the Workbench under Email and address, e.g. https://dms.example.org. If it begins with https://, Ablago only sets the session cookie via HTTPS, and links in emails lead to this address.

HTTPS and certificates

Ablago itself only speaks HTTP and manages no certificates. The reverse proxy takes care of that: it accepts the HTTPS connection, looks after the certificate and its renewal and passes the request on to Ablago. Common ways:

  • Nginx Proxy Manager as an additional container: certificate from Let's Encrypt at the click of a mouse. This is how it runs at the developer's, see Example setup.
  • Your NAS's proxy: Synology, UGREEN and QNAP bring a reverse proxy including Let's Encrypt certificates.
  • Caddy: fetches and renews certificates by itself; the configuration is a few lines long.

Let's Encrypt needs a domain of your own that points to your connection. If Ablago is only to be reachable at home, HTTP in the home network is enough.

If you use the WebDAV drive, you need HTTPS even at home (Windows requires it), and the proxy must let the WebDAV methods such as PROPFIND and LOCK through – see Behind a reverse proxy.

Compression

Ablago delivers the interface (scripts, styles, start page) already compressed, with Brotli or gzip, depending on what the browser understands. On the first visit over mobile data that is a little over 800 KB instead of almost 4 MB. Ablago does not compress anything at run time, so it costs no computing time. There is nothing to set up on the proxy: it passes the compressed response on unchanged along with Content-Encoding and does not compress it a second time. If your proxy compresses itself (such as encode in Caddy or gzip on in nginx), that does no harm; it leaves responses that are already compressed alone.

What the proxy tells Ablago

The proxy forwards every request to Ablago. For Ablago it therefore looks as if it came from the proxy. What the device behind it is, the proxy writes into additional headers (X-Forwarded-For, X-Forwarded-Proto). Ablago needs them for:

What for With the proxy's information Without it
IP addresses in the log and in a user's sessions the address of the phone or laptop always the proxy's address
Block after wrong passwords (sign-in protection, per email address and IP and per IP) only hits the device the failed attempts came from hits all devices: failed attempts from outside also block sign-in at home
Recognising HTTPS as long as no address is maintained cookie only via HTTPS, links with https:// cookie also via HTTP, links with the internal http:// address

Ablago accepts this information by itself if the proxy sits on your own computer or in a private network (127.0.0.1, 10.x.x.x, 172.16–31.x.x, 192.168.x.x and the corresponding IPv6 networks). That practically always applies to a proxy container next to Ablago and to a proxy on another computer in the home network. Requests directly from the internet thus can't fake an outside IP or HTTPS. The gateway of the Docker network is excluded (e.g. 172.17.0.1): in some setups requests from the internet can arrive that way too. If the proxy runs on the same computer as Ablago – such as the NAS's reverse proxy –, it talks to the container via the gateway; then set TRUST_PROXY explicitly to the gateway address (see Home network can't be determined). Under Maintenance and troubleshooting → System health → Version and updates, TRUST_PROXY shows what applies right now.

When to set TRUST_PROXY after all?

  • TRUST_PROXY: "false": if you want to rule out completely that a device in your home network that reaches Ablago directly via port 8080 fakes another IP address. The IP addresses and the block then behave as in the right-hand column above.
  • A list, e.g. TRUST_PROXY: "172.18.0.5": only believe exactly this proxy.
  • The gateway address, e.g. TRUST_PROXY: "172.17.0.1": if the proxy runs on the same computer as the container (the NAS's reverse proxy). The Workbench names the address. Not a whole network such as 172.16.0.0/12 or 172.17.0.0/16, even though it is often given as an example for Docker: enter only your proxy's address, e.g. 172.17.0.1 – a whole network also believes requests that merely come through the gateway. If a network that covers the gateway is entered after all, the Workbench says so (overview and sign-in protection).
  • TRUST_PROXY: "true": if the proxy has a public address, such as a tunnel or cloud service that forwards directly to Ablago. Then Ablago itself must not be reachable from the internet.

Before version 0.43.0, false was the default. Whoever has already set TRUST_PROXY: "true" can leave it or remove it.

Maintain the address anyway

The address in the Workbench is more reliable than any detection: emails from the background (reminders, summary) have no request from which Ablago could read the address.

Security headers

Ablago sets the usual security headers itself – your reverse proxy does not need to set them again (duplicate headers do no harm but confuse troubleshooting):

  • X-Frame-Options: SAMEORIGIN and Content-Security-Policy: frame-ancestors 'self' – no outside page can embed Ablago invisibly,
  • a strict Content-Security-Policy for the interface (only its own scripts),
  • X-Content-Type-Options: nosniff, Referrer-Policy: same-origin, Permissions-Policy,
  • Strict-Transport-Security as soon as Ablago is called via HTTPS.

If Ablago is to appear in another page, for instance in a Home Assistant dashboard, enter its origin in DMS_EINBETTEN (several separated by spaces). Ablago ignores invalid entries and names them in the log.

An example for nginx:

server {
    listen 443 ssl;
    server_name dms.example.org;
    # ssl_certificate …; ssl_certificate_key …;

    client_max_body_size 260m;          # documents up to 100 MB, packages up to 128 MB, bundle files up to 256 MB

    location / {
        proxy_pass http://<NAS>:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 120s;
    }
}

Long jobs such as creating thousands of load test folders run in the background so that the proxy doesn't cancel because of a timeout. The live display of the log asks every two seconds and needs no special proxy setting.