docs: deploy guide, owner review 4 request (phase 6)

Owner review 1 phase 6 asks for Docker, Unraid and deploy documentation. docs/deploy/
now covers the image tags, volumes, every CHRONOS_* variable with its default, ports and
public ports (the owner's host 8087/8444 mapping), TLS modes and the fingerprint,
upgrades and forward-only migrations, backup and restore, PostgreSQL, troubleshooting,
and the desktop Setup, portable mode and update channel.

The owner review 4 request (2026-11-06) is recorded with its interpretation and plan;
BRIEF §14.9 lists CHRONOS_TRUSTED_PROXIES, which the server already read, §19.6 points
to the Unraid guide, and §24 gains the rows of owner review 4 and phase 6. STATUS shows
both in progress for v0.1.0-rc.14, then v1.0.0.

Refs #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-06 16:53:01 +01:00
1 parent fe50b87726
commit b4c2f5805b
10 files changed
+563 -9

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
# Deploying Chronos
How to install, configure, upgrade and back up the Chronos programs. Written for the person who runs them; the
specification behind each behaviour is `docs/BRIEF.md` (§14.9 configuration and Docker, §18 installer and updates,
§19.5 images, §19.6 Unraid template).
| Guide | For |
|---|---|
| [docker.md](docker.md) | Chronos Server in Docker with Compose: image tags, volumes, every `CHRONOS_*` variable, ports, TLS, PostgreSQL, upgrades, backup and restore, troubleshooting |
| [unraid.md](unraid.md) | Chronos Server on Unraid with the template `deploy/unraid/chronos.xml` and the official PostgreSQL template, including host ports other than 8080/8443 |
| [desktop.md](desktop.md) | Chronos and Chronos Uploader on Windows: Setup, portable mode, updates, uninstall; Chronos Server on Windows |
The short user guide that ships with every release is `deploy/releases-repo/README.md` (it becomes the README of a
separate releases repository when `RELEASES_REPO` is set). It and these guides say the same things; these go further.
## The pieces
| Program | Runs on | Talks to |
|---|---|---|
| **Chronos** (desktop) | Windows 10 21H2+ / 11, x64 | Its own archive and index on the PC; optionally a Chronos Server over HTTPS |
| **Chronos Uploader** | Windows 10 21H2+ / 11, x64 | A Chronos Server over HTTPS |
| **Chronos Server** | Docker (`linux/amd64`), Unraid 6.12+, Windows 10/11/Server 2019+ x64 | PostgreSQL 16 or 17 (Linux), SQLite or PostgreSQL (Windows); its archive folder |
The archive is the source of truth: photos, sidecars, proxies and renders live in ordinary folders, and the database is
an index that can be rebuilt from them (BRIEF §7). Users, sign-ins, schedules, job history and the audit log live only
in the database, so back up both (see [docker.md › Backup and restore](docker.md#backup-and-restore)).
## Where to get them
| What | Where |
|---|---|
| Windows installers, portable zips, the Windows server zip, `SHA256SUMS` | Releases of `BalboSoft/Chronos` on `https://gitea.encke-hake.ts.net` (or of the releases repository) |
| Server image | `gitea.encke-hake.ts.net/balbosoft/chronos-server` — `:latest`, `:<version>`, `:nightly` |
| Compose file and `.env` example | `https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/docker/docker-compose.yml` and `…/deploy/docker/.env.example` |
| Unraid template | `https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/unraid/chronos.xml` |
While the `BalboSoft` organisation on Gitea is private, downloads, the update check and image pulls work only for
signed-in accounts: run `docker login gitea.encke-hake.ts.net` before pulling.
## Connecting a client in one paragraph
Open the admin panel (`http://<host>:<HTTP port>/admin`), go to Settings › Network and TLS and copy the **Client
address**. Type it in Chronos (Server) and in the Uploader. The first connection shows the server's certificate
**Fingerprint**; compare it with the one on the same admin page and accept it once. When the container's ports are
published as other host ports, set **Public HTTP port** and **Public HTTPS port** first, so the client address names the
ports clients can reach ([docker.md › Ports](docker.md#ports)).
+93
View File
@@ -0,0 +1,93 @@
# Chronos on Windows
Chronos (the desktop program), Chronos Uploader and Chronos Server for Windows. Requirements: Windows 10 21H2 or later,
or Windows 11, x64; 8 GB of memory or more for 4K renders. The programs are self-contained: no .NET runtime to install.
## Downloads
Each release on Gitea carries:
| File | What it is |
|---|---|
| `Chronos-Setup-<version>.exe` | Setup with the components Chronos, Uploader and, optionally, Server |
| `Chronos-Uploader-Setup-<version>.exe` | Setup of the Uploader alone |
| `Chronos-win-x64-portable-<version>.zip` | Chronos without installing (portable mode) |
| `Chronos-Server-win-x64-<version>.zip` | Chronos Server for Windows without the setup |
| `SHA256SUMS` | The SHA-256 of every file |
Check a download before running it: `Get-FileHash .\Chronos-Setup-<version>.exe -Algorithm SHA256` in PowerShell, then
compare with its line in `SHA256SUMS`. Signed builds carry an Authenticode signature; unsigned ones may show a
SmartScreen prompt.
## Setup
- **Per user** (default, no administrator rights): `%LOCALAPPDATA%\Programs\Chronos`.
- **All users**: `Program Files` (Windows asks for permission). Choosing the *Server* component installs for all users,
since it runs as a Windows service.
- Options: components, folder, desktop and Start menu shortcuts, the `.chronos` file type.
- **Silent** (IT deployment): `Chronos-Setup-<version>.exe /S [/DIR="D:\Apps\Chronos"] [/ALLUSERS]
[/COMPONENTS=Chronos,Uploader,Server] [/NODESKTOP] [/NOSTARTMENU] [/LANG=it]`.
- **Upgrade**: run the newer setup over the installed version; it upgrades in place and keeps archive, settings and
index.
- **Uninstall**: Windows Settings › Apps › Installed apps › Chronos › Uninstall, or silently
`"%LOCALAPPDATA%\Programs\Chronos\Uninstall Chronos.exe" /uninstall /S`. Photos and archives are never touched. The
program data in `%LOCALAPPDATA%\Chronos` goes only when you tick that option, and only the part no other installed
Chronos program still uses; a Chronos Server service of that folder is stopped and removed.
## Data folders
| Install | Settings, index (`chronos.db`), logs, caches |
|---|---|
| Setup | `%LOCALAPPDATA%\Chronos` |
| Portable | `data\` next to `Chronos.exe` |
Keep neither inside a OneDrive or Dropbox folder: a SQLite index in a synced folder gets corrupted. The archive and
the workspace are folders you choose in Settings › Archive and Settings › Workspace (the workspace best on a fast local
disk).
Backups of the index go to `backups\` next to it every day (Settings › Advanced › *Back up now* for one more copy;
restore there too).
## Portable mode
Unpack `Chronos-win-x64-portable-<version>.zip` into a folder you can write. The `portable.txt` file next to
`Chronos.exe` keeps everything under `data\` in that folder, so the whole folder can move to another PC or a USB drive.
To upgrade, unpack the newer zip over it (or let *Download* fetch it, below); `data\` stays.
## Updates
- At start (Settings › Updates › *Check on start*, on by default) Chronos reads the **stable** releases of the releases
repository and shows a one-line notice when a newer version exists. *Check for updates* asks at any time.
- *Download* fetches the setup (or, in portable mode, the portable zip), checks it against `SHA256SUMS` and shows it in
Explorer: run it to upgrade.
- There is one channel: stable releases. Pre-releases (`-rc.N`) are never offered; install them by hand from the
Releases page. A pre-release build is offered every newer stable release, and the final release of its own version
once it is out (a `1.1.0-rc.1` build is offered `1.1.0`).
- While the Gitea organisation is private, the check fails for anyone who cannot see the repository (*Check failed*);
it never claims *Up to date* then.
## Connecting to a server
In Chronos (Server) and in the Uploader type the **Client address** the admin panel shows (Settings › Network and TLS),
for example `https://nas.local:8444`. An address without scheme or port means port 8443. The first connection shows the
certificate fingerprint: compare it with the admin panel's and accept it once; a later change asks again. An address
that answers as another service is reported as *not a Chronos server*. Server setup and ports: [docker.md](docker.md),
[unraid.md](unraid.md).
## Chronos Server on Windows
Choose the *Server* component in the setup, or unpack `Chronos-Server-win-x64-<version>.zip` into a folder under
`Program Files`.
- Database: SQLite in `C:\ProgramData\Chronos Server` by default, or PostgreSQL with `CHRONOS_DB=postgres` and the
`CHRONOS_DB_*` variables ([docker.md](docker.md#environment-variables)); archive `C:\ChronosArchive` unless
`CHRONOS_ARCHIVE_PATH` says otherwise. The listening ports are 8080 and 8443 and can be changed in the admin panel.
- Run `Chronos.Server.exe` in a console, or as a service from an administrator prompt: `Chronos.Server.exe
--install-service` (remove with `--uninstall-service`). The service runs as LocalSystem and registers only from a copy
that only administrators can change.
- Without `CHRONOS_ADMIN_PASSWORD` the first start writes a temporary password to `initial-admin-password.txt` in the
data folder (open it from an administrator prompt).
- The data folder is readable only by the server's account, SYSTEM and Administrators. A console run that was not
elevated creates it as your account, and the service then refuses it and names that account: the user guide
(`deploy/releases-repo/README.md` › Chronos Server on Windows) gives the `takeown` and `icacls` commands that fix it.
- Index backups: the `index-backup` schedule copies the SQLite index daily at 03:00 (three copies kept). With
PostgreSQL use `pg_dump`.
+228
View File
@@ -0,0 +1,228 @@
# Chronos Server with Docker
Chronos Server in a container next to PostgreSQL 17, from `deploy/docker/docker-compose.yml`. For Unraid see
[unraid.md](unraid.md); the settings below are the same there.
## Install
```sh
mkdir chronos && cd chronos
curl -LO https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/docker/docker-compose.yml
curl -L -o .env https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/docker/.env.example
# edit .env: CHRONOS_ADMIN_PASSWORD, CHRONOS_DB_PASSWORD, CHRONOS_ARCHIVE, PUID/PGID, TZ
docker login gitea.encke-hake.ts.net # while the organisation is private
docker compose up -d
```
1. Create the archive folder on the host, owned by `PUID:PGID` (`mkdir -p /srv/timelapse && chown 1000:1000
/srv/timelapse`). An empty folder, or one owned by root (Docker creates a missing bind source that way), is given to
`PUID:PGID` at start: the folder itself, never its contents. Any other folder that user cannot write stops the
container with a one-line error naming it.
2. Open `http://<host>:8080/admin`, sign in as `admin` with `CHRONOS_ADMIN_PASSWORD` and choose a new password (a change
is required at the first sign-in). Without `CHRONOS_ADMIN_PASSWORD` the first start writes a temporary password to
`/data/initial-admin-password.txt`, readable only by its owner, never to the log; the file goes once an
administrator changes their password. Both variables are read only while no administrator exists.
3. In Settings › Network and TLS copy the **Client address** (by default `https://<host>:8443`) into Chronos and the
Uploader, and compare the certificate **Fingerprint** at their first connection.
`.env` holds the passwords and the host folders: `CHRONOS_ARCHIVE` (archive, default `./archive`), `CHRONOS_DATA`
(`./data`), `CHRONOS_VIDEOS` (videos folder, `./videos`), `CHRONOS_PGDATA` (PostgreSQL's files, `./pgdata`), `PUID`,
`PGID` (default 1000) and `TZ` (default UTC). These four folder names are Compose's, not the server's.
## Image and tags
`gitea.encke-hake.ts.net/balbosoft/chronos-server`, built for `linux/amd64`.
| Tag | What it is | Use it for |
|---|---|---|
| `:latest` | The highest stable release; before the first stable release (`v1.0.0`), the highest pre-release | Production; the compose file and the Unraid template use it |
| `:<version>` (`:1.0.0`, `:0.1.0-rc.14`) | Exactly that release | Pinning, rolling back |
| `:nightly` | `main` as it was at 02:17 that night (version `0.0.0-nightly.<run>`); never a release | Trying what is not released yet; not for production |
`docker run --rm gitea.encke-hake.ts.net/balbosoft/chronos-server:latest --help` lists every variable the server reads.
## Volumes
| Container path | Holds | Required |
|---|---|---|
| `/archive` | The archive: originals, sidecars (`.chronos/` folders), proxies, renders, trash. Readable without Chronos | Yes |
| `/data` | `server.json`, the TLS certificate (`tls/server.pfx`), uploads in progress, logs (`logs/`), `initial-admin-password.txt` | Yes |
| `/videos` | Copies of renders made by *Copy to videos folder* (admin panel › Videos, the desktop's Videos section), flat, hash-checked, " (2)" on a name collision. Chronos never deletes what it copied there | No: with `CHRONOS_VIDEOS_PATH=/videos` |
| `/space` | Read-only view of the volume whose free space the admin panel shows (Unraid's array view) | No: with `CHRONOS_SPACE_PATH=/space` |
- `/archive` and `/data` are image volumes; `/videos` and `/space` are not, so an image run without them makes no
anonymous volume. A `/videos` that is not a mounted volume, or that `PUID:PGID` cannot write, only warns at start:
copying then fails with its reason in the admin panel, and everything else runs.
- The videos folder must lie outside the archive and the data folder; the admin panel refuses another, and a copy then
answers `videos_folder_invalid`. Remove `CHRONOS_VIDEOS_PATH` and the volume to turn copying off.
- The server writes into the archive's `.chronos` folders at once (staging, trash, locks). One left to root (an
earlier run as root, a copy made as root) stops the start with an error naming it; fix it on the host with
`chown -R <PUID>:<PGID> <archive>/.chronos`. Nothing inside the archive is ever chowned by the container.
## Environment variables
Every server setting comes from, in order: its default, `/data/server.json`, then the environment. **A variable that is
set fixes its setting:** the admin panel shows the field read-only and its tooltip names the variable. Leave a
variable unset to choose the value in the admin panel while the server runs. A value out of range stops the start
with a message naming the variable.
| Variable | Default | Meaning |
|---|---|---|
| `CHRONOS_DATA_PATH` | `/data` (Windows: `C:\ProgramData\Chronos Server`) | Data folder; read before `server.json`, which lives in it |
| `CHRONOS_ARCHIVE_PATH` | `/archive` (Windows: `C:\ChronosArchive`) | Archive folder |
| `CHRONOS_SPACE_PATH` | unset: the archive's volume | A folder whose volume's free space the admin panel shows (`/space`). One that cannot be measured falls back to the archive's with one warning. Uploads always check the archive's own volume (507 when full) |
| `CHRONOS_VIDEOS_PATH` | unset: copying off (`videos_folder_unset`); compose sets `/videos` | Absolute folder *Copy to videos folder* writes into, outside the archive and the data folder |
| `CHRONOS_SERVER_NAME` | `Chronos Server` | Name shown to clients and announced on the LAN |
| `CHRONOS_ADMIN_USER` | `admin` | First administrator, created only while none exists (letters, digits, `.`, `-`, `_`) |
| `CHRONOS_ADMIN_PASSWORD` | unset: a temporary password in `/data/initial-admin-password.txt` | Its first password; a change is required at the first sign-in |
| `CHRONOS_DB` | `postgres` (Windows: `sqlite`) | `postgres`, `sqlite` (Windows only) or a full connection string (`Host=…;Port=…;Database=…;Username=…;Password=…`), which wins over the parts below |
| `CHRONOS_DB_HOST` | `postgres` | PostgreSQL host |
| `CHRONOS_DB_PORT` | `5432` | PostgreSQL port |
| `CHRONOS_DB_NAME` | `chronos` | Database, owned by the user below |
| `CHRONOS_DB_USER` | `chronos` | PostgreSQL role |
| `CHRONOS_DB_PASSWORD` | unset | Its password (SCRAM, MD5, cleartext and trust are understood) |
| `CHRONOS_DB_SSLMODE` | `prefer` | `disable`, `prefer`, `require` or `verify-full` |
| `CHRONOS_HTTP_PORT` | `8080` | Port the server listens on for HTTP. In a container (the image sets it) only this variable changes it, which matters only with host networking |
| `CHRONOS_HTTPS_PORT` | `8443` | Port the server listens on for HTTPS; as above |
| `CHRONOS_PUBLIC_HTTP_PORT` | unset: the HTTP port | Host port clients use for HTTP when the container's 8080 is published as another; LAN discovery announces it |
| `CHRONOS_PUBLIC_HTTPS_PORT` | unset: the HTTPS port | Host port clients use for HTTPS: the port of the client address, of the admin panel's redirect to HTTPS and of LAN discovery |
| `CHRONOS_TLS_MODE` | `auto` | `auto` (self-signed, made at first start), `pem` (your certificate) or `proxy` (plain HTTP behind a TLS-terminating reverse proxy) |
| `CHRONOS_TLS_CERT` | unset | `pem` mode: path of the certificate (PEM, full chain) inside the container |
| `CHRONOS_TLS_KEY` | unset | `pem` mode: path of its private key (PEM) |
| `CHRONOS_TRUSTED_PROXIES` | `127.0.0.0/8, ::1/128` | `proxy` mode: addresses or CIDR networks of the proxies whose `X-Forwarded-*` headers count; see [TLS](#tls) |
| `CHRONOS_LANG` | `en` | Language of the server's messages when the client's own language is not one Chronos ships |
| `CHRONOS_PARALLELISM` | half the logical cores (1–64) | Photos the running job processes at once; jobs run one at a time. `CHRONOS_WORKERS`, its former name, still sets it with a warning |
| `CHRONOS_PRIORITY_QUEUE` | `false` | `true`: a job of a higher kind pauses the running one, which resumes by itself afterwards |
| `CHRONOS_DISCOVERY` | `true` | LAN discovery beacon (UDP); it leaves a container only with host networking |
| `CHRONOS_LOG_LEVEL` | `Information` | `Trace`, `Debug`, `Information`, `Warning`, `Error`, `Critical` or `None` (also `info`, `warn`, `off`): the log files' and the console's level, locking both |
| `CHRONOS_LOG_CONSOLE_LEVEL` | the log level | The console's (the container log's) level alone; wins over `CHRONOS_LOG_LEVEL` for the console |
| `CHRONOS_LOG_RETENTION_DAYS` | `14` (1–3650) | Days log files in `/data/logs` are kept |
| `CHRONOS_LOG_MAX_FILE_MB` | `50` (0–10240, 0 = no limit) | Size at which a log file continues in `.1.log`, `.2.log`… |
| `CHRONOS_LOG_MAX_TOTAL_MB` | `1024` (0–1048576, 0 = no limit) | Size of all log files together; the oldest go beyond it, never the current one |
| `CHRONOS_LOG_ROTATION` | `daily` | `daily` or `hourly` log files (UTC): `server-yyyyMMdd.log` |
| `CHRONOS_AUDIT_RETENTION_DAYS` | `0` = forever (0–3650) | Days of audit log the *Audit log clean-up* schedule keeps; set, it is applied to that schedule at every start |
| `CHRONOS_DIAGNOSTICS_LOG_MB` | `4` (1–1024) | MB from the end of each log file in the diagnostics zip (admin panel › Logs › *Diagnostics*) |
| `PUID` / `PGID` | `1000` / `1000` | User and group the server runs as; the data folder is given to them |
| `TZ` | `UTC` | Time zone of the schedules and of the folders of photos without a capture time; logs stay in UTC |
## Ports
The server listens on **8080** (HTTP: admin panel and API) and **8443** (HTTPS: the API Chronos and the Uploader use)
inside the container. Those two stay as they are on a bridge network: the admin panel shows them read-only, and a value
`server.json` held for them is ignored with a warning and removed at the next save. The **public ports** are the host
ports clients reach.
| Situation | Compose `ports` | Public ports | Clients use |
|---|---|---|---|
| Default | `"8080:8080"`, `"8443:8443"` | leave empty | `https://<host>:8443` |
| Another service uses 8080 and 8443 on the host (the owner's Unraid case) | `"8087:8080"`, `"8444:8443"` | Public HTTP port **8087**, Public HTTPS port **8444** | `https://<host>:8444`; admin panel `http://<host>:8087/admin` |
| Host networking (`network_mode: host`) | none (ignored) | leave empty | `https://<host>:8443`, or the port set with `CHRONOS_HTTPS_PORT` |
- Keep the container side of a mapping (after the colon) at 8080 and 8443. Change only the host side, then enter the
same host ports as **Public HTTP port** and **Public HTTPS port** in Settings › Network and TLS, or set
`CHRONOS_PUBLIC_HTTP_PORT` / `CHRONOS_PUBLIC_HTTPS_PORT` (which then lock them). They apply at once: the client
address, the redirect to HTTPS and LAN discovery name the ports clients can reach.
- An address typed in a client without a scheme or port (`nas.local`) means port 8443; `https://nas.local` alone means
443 (a reverse proxy). Type the client address as the admin panel shows it.
- LAN discovery reaches clients only with host networking: on a bridge network its broadcasts stay inside Docker, and
clients type the client address. With host networking the port mappings do nothing, the server listens on the host's
8080 and 8443 itself and does not start when another service already uses either: set `CHRONOS_HTTP_PORT` /
`CHRONOS_HTTPS_PORT` to free ports and leave the public ports empty. The name `postgres` no longer resolves there:
publish PostgreSQL on loopback (`ports: ["127.0.0.1:5432:5432"]` under `postgres`) and set `CHRONOS_DB_HOST:
127.0.0.1`.
## TLS
| Mode | What happens | Clients |
|---|---|---|
| `auto` (default) | A self-signed certificate is made at first start in `/data/tls/server.pfx`, valid five years, made anew 30 days before it expires; its SHA-256 fingerprint is logged and shown in Settings › Network and TLS › **Fingerprint** | Trust on first use: the client shows the fingerprint once; compare it with the admin panel's |
| `pem` | Your certificate and key: mount them read-only (`./certs:/certs:ro`) and set `CHRONOS_TLS_CERT=/certs/fullchain.pem`, `CHRONOS_TLS_KEY=/certs/privkey.pem`, readable by `PUID:PGID`. Restart after renewing them | A certificate a public CA signed is trusted at once |
| `proxy` | Plain HTTP on 8080 behind a reverse proxy that terminates TLS | `https://<proxy name>` |
- The fingerprint changes when `/data` is lost or the self-signed certificate is renewed: clients then ask again.
Compare before accepting; keep `/data` in the backup so it does not change by surprise.
- An address that answers but is not Chronos (another service on that port) is reported as *not a Chronos server*, and
its certificate is never offered for trust.
- Behind a proxy only the proxies listed in `CHRONOS_TRUSTED_PROXIES` may set `X-Forwarded-*` headers; by default only
loopback, since other machines on the LAN reach the HTTP port directly and must not choose the address the sign-in
limit and the audit log see. Give a proxy container a fixed address on a user-defined network it shares with
Chronos (`ipv4_address` in compose, *Fixed IP address* on Unraid), list that address (`172.30.0.10`), and let it reach
Chronos on that network rather than through a published port. Never list a subnet, the network's gateway (`.1`) or
Docker's default bridge (`172.17.0.0/16`). A proxy on the Docker host itself: run Chronos with host networking. The
admin panel shows *Not via proxy* when a page did not come through a trusted proxy over HTTPS.
## PostgreSQL
Chronos Server on Linux needs PostgreSQL 16 or 17 (`CHRONOS_DB=sqlite` is Windows only). The compose file runs the
official `postgres:17` image with its files in `CHRONOS_PGDATA`, and waits for it to be healthy; the server retries the
connection for about 30 seconds more before it stops.
To use an existing PostgreSQL instead, remove the `postgres` service and `depends_on`, create a role and a database it
owns (`CREATE ROLE chronos LOGIN PASSWORD '…'; CREATE DATABASE chronos OWNER chronos;`) and set `CHRONOS_DB_HOST`,
`CHRONOS_DB_PORT`, `CHRONOS_DB_NAME`, `CHRONOS_DB_USER`, `CHRONOS_DB_PASSWORD` and, for a remote one, `CHRONOS_DB_SSLMODE=require`
or `verify-full`. Or give a whole connection string in `CHRONOS_DB`.
## Upgrading
1. Back up first: at least the database and `/data` ([below](#backup-and-restore)).
2. `docker compose pull && docker compose up -d`.
3. The server migrates the database at start; the log shows `Database Postgres ready, schema version N`. Jobs in
progress resume from their last checkpoint.
- Migrations only go forward. An older image refuses a database a newer one migrated (*the database schema version …
is newer than the version … this build supports*): to go back, restore the database backup taken before the upgrade,
then run the older tag.
- Stay on `:latest` (or a pinned `:<version>`) in production. A container on `:nightly` runs unreleased code: move it to
`:latest` by editing the image tag, after a backup.
- Release notes list upgrade steps when a release needs one (a variable renamed, a template field added). Earlier
compose files and templates set `CHRONOS_LOG_LEVEL: Information`, which now locks both log levels: delete the line to
choose them in the admin panel.
## Backup and restore
| Part | Holds | How |
|---|---|---|
| Archive (`/archive`) | Photos, sidecars, projects, proxies, renders, the trash | Your usual file backup (rsync, snapshots, Unraid's tools). Include every `.chronos` folder |
| Database | The index, users and sign-ins, schedules, job history, audit log | `pg_dump` (below). The index part can also be rebuilt from the archive's sidecars (admin panel › Archive › *Rebuild*), the rest cannot |
| `/data` | Settings, the TLS certificate and key, logs | Copy the folder |
Back up (the server stopped, so nothing changes while the dump runs):
```sh
docker compose stop chronos
docker compose exec -T postgres pg_dump -U chronos -d chronos -Fc > chronos-$(date +%F).dump
sudo tar -czf chronos-data-$(date +%F).tgz data
docker compose start chronos
```
Restore into the same or a new host (the same image tag, or a newer one):
```sh
docker compose down
sudo tar -xzf chronos-data-<date>.tgz # puts ./data back
docker compose up -d postgres
docker compose exec -T postgres pg_restore -U chronos -d chronos --clean --if-exists < chronos-<date>.dump
docker compose up -d
```
Put the archive back at the same `CHRONOS_ARCHIVE` path before the last step. After restoring an older database next to
a newer archive, run Archive › *Scan* so the index catches up with what the archive holds.
## Troubleshooting
| Symptom | Cause and fix |
|---|---|
| The Uploader or Chronos cannot connect | The client uses a port the host does not publish. Copy the **Client address** from Settings › Network and TLS; when host ports are not 8080/8443, set **Public HTTP port** and **Public HTTPS port** to them first ([Ports](#ports)) |
| *Not a Chronos server* | Another service answers on that host port (on the owner's host 8443 is another service). Use the client address with the right public HTTPS port |
| The free space shown is the cache's (Unraid) or too small | A cached share reports its primary storage. Map the share's array view read-only to `/space` and set `CHRONOS_SPACE_PATH=/space` ([unraid.md](unraid.md#free-space-of-the-array)) |
| The container restarts at once, log: *… is not writable by PUID:PGID* | Give that user write access to the archive (or the named `.chronos` folder) on the host, or set `PUID`/`PGID` to its owner |
| Log: *Database not reachable yet … retry* | PostgreSQL is starting, or `CHRONOS_DB_HOST` is wrong. Container names resolve only on a shared user-defined network; on Unraid's default bridge use the host's IP |
| A field in the admin panel is read-only | A variable sets it; its tooltip names it. Remove the variable to change it in the panel |
| The client asks to trust a new fingerprint | `/data` was replaced or the self-signed certificate was renewed. Compare with the admin panel before accepting |
| Clients do not find the server by themselves | LAN discovery needs host networking; type the client address instead |
| *Copy to videos folder* fails (`videos_folder_unset`, `videos_folder_invalid`) | Map a host folder outside the archive to `/videos` and set `CHRONOS_VIDEOS_PATH=/videos` |
| `docker pull` asks for credentials | The organisation is private: `docker login gitea.encke-hake.ts.net` |
| Host networking: the server does not start, port in use | Set `CHRONOS_HTTP_PORT` / `CHRONOS_HTTPS_PORT` to free ports |
For a bug report attach the server's diagnostics zip (admin panel › Logs › *Diagnostics*): logs, a system report, the
settings and recent failed jobs, never photos, passwords or tokens. You download it; it goes nowhere by itself.
+124
View File
@@ -0,0 +1,124 @@
# Chronos Server on Unraid
Chronos Server from the template `deploy/unraid/chronos.xml`, next to the official PostgreSQL template. Every variable
and behaviour is described in [docker.md](docker.md); this page covers what is particular to Unraid.
## Install
1. **PostgreSQL.** Install the official **postgresql17** template from Community Applications (16 works too). Create a
role and a database for Chronos:
```sh
docker exec -it postgresql17 psql -U postgres \
-c "CREATE ROLE chronos LOGIN PASSWORD '<a long random password>'" \
-c "CREATE DATABASE chronos OWNER chronos"
```
2. **The template.** Unraid's *Template repositories* read GitHub and GitLab addresses, not Gitea's, so save the template
as a user template from the Unraid terminal:
```sh
wget -O /boot/config/plugins/dockerMan/templates-user/my-chronos-server.xml \
https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/unraid/chronos.xml
```
While the `BalboSoft` organisation is private, the download and the image pull need an account: download the file
in a signed-in browser and copy it there, and run `docker login gitea.encke-hake.ts.net` once in the terminal.
3. **The container.** Docker › *Add container* › Template › *chronos-server*. Fill in at least:
| Field | Value |
|---|---|
| Admin password | The first password of `admin`; a change is required at the first sign-in |
| Database host | The Unraid server's IP address (the PostgreSQL template publishes 5432). A container name resolves only when both containers are on the same custom Docker network, never on the default *bridge* |
| Database password | The role's password from step 1 |
| Archive | The share of your time-lapses, default `/mnt/user/Timelapse` |
| Array view | The same share under `/mnt/user0`, default `/mnt/user0/Timelapse` (see [free space](#free-space-of-the-array)) |
Leave the network type on *Bridge* unless you need LAN discovery ([below](#network-type)).
4. **First sign-in.** Open the WebUI (`http://[IP]:[HTTP port]/admin`), sign in as `admin` and choose a new password.
5. **Clients.** In Settings › Network and TLS copy the **Client address** into Chronos and the Uploader and compare the
**Fingerprint** at their first connection.
## Template fields
| Field | Container side | Default | Notes |
|---|---|---|---|
| HTTP port | port 8080 | 8080 | Admin panel and API over HTTP; the WebUI link follows it |
| HTTPS port | port 8443 | 8443 | API over TLS for Chronos and the Uploader |
| Public HTTP port | `CHRONOS_PUBLIC_HTTP_PORT` | empty | The HTTP port above when it is not 8080 |
| Public HTTPS port | `CHRONOS_PUBLIC_HTTPS_PORT` | empty | The HTTPS port above when it is not 8443: the port of the client address |
| Archive | `/archive` | `/mnt/user/Timelapse` | Originals, sidecars, proxies, renders |
| Array view | `/space` (read-only) | `/mnt/user0/Timelapse` | Optional; with *Space path* |
| Videos | `/videos` | empty | Optional folder for *Copy to videos folder*, not inside the archive (for example `/mnt/user/Videos/Chronos`); with *Videos path* |
| App data | `/data` | `/mnt/user/appdata/chronos` | Settings, TLS certificate, uploads in progress, logs |
| Admin user / Admin password | `CHRONOS_ADMIN_USER` / `CHRONOS_ADMIN_PASSWORD` | `admin` / empty | Read only while no administrator exists |
| Database host, port, name, user, password, TLS | `CHRONOS_DB_*` | —, 5432, `chronos`, `chronos`, —, `prefer` | Port and TLS are advanced |
| Videos path | `CHRONOS_VIDEOS_PATH` | empty | `/videos` once *Videos* is mapped; empty turns copying off unless a folder is set in the admin panel |
| TLS mode, Trusted proxies, Space path, Server name, Parallelism, Priority queue, the log fields, Audit retention, Diagnostics log size, PUID (99), PGID (100), Time zone | the variables of [docker.md](docker.md#environment-variables) | as there | Advanced. Empty means the admin panel chooses; a value locks the setting there |
The template has no field for `CHRONOS_TLS_CERT`, `CHRONOS_TLS_KEY`, `CHRONOS_LANG`, `CHRONOS_DISCOVERY`,
`CHRONOS_HTTP_PORT` or `CHRONOS_HTTPS_PORT`: add them with *Add another Path, Port, Variable…* › *Variable* when
needed.
## Ports other than 8080 and 8443
When another container already uses 8080 or 8443 on the Unraid host, change only the host side and tell Chronos which
ports clients use. The owner's setup:
| Field | Value |
|---|---|
| HTTP port | **8087** (container 8080) |
| HTTPS port | **8444** (container 8443) |
| Public HTTP port | **8087** |
| Public HTTPS port | **8444** |
Clients then connect to `https://<Unraid IP>:8444`, the client address the admin panel shows, and the WebUI opens
`http://<Unraid IP>:8087/admin`. The admin panel's *HTTP port* and *HTTPS port* stay 8080 and 8443, read-only: they are
the container's ports, not the ones clients use. The public ports may be left empty in the template and entered in the
admin panel's Settings › Network and TLS instead; set in the template, they are locked there.
## Free space of the array
A user share (`/mnt/user/<share>`) reports the free space of its primary storage, often the cache, while the mover
sends the photos to the array. The **Array view** maps the same share as seen on the array alone (`/mnt/user0/<share>`)
read-only to `/space`, and *Space path* `/space` makes the admin panel show that volume's free space. When the archive's
own volume differs it shows apart as *Write volume*. Change *Array view* together with *Archive*, or remove it and clear
*Space path*. Uploads still check the archive's own volume.
## Network type
- **Bridge** (default): the port mappings apply, LAN discovery stays inside Docker, clients type the client address.
- **Host**: clients find the server by themselves, the mappings are ignored and the server listens on the host's 8080
and 8443 itself; it does not start when another service uses either. Add the variable `CHRONOS_HTTP_PORT` or
`CHRONOS_HTTPS_PORT` with a free port first and leave the public ports empty.
- A **custom Docker network** shared with the PostgreSQL container lets *Database host* be the container's name.
## Upgrading
1. Back up `/mnt/user/appdata/chronos` and the database ([below](#backup)).
2. Docker › the container › *Check for updates* / *Update*, or *Force update*. The database is migrated at start; jobs
resume from their last checkpoint.
A container made from an earlier template, or one on `:nightly`: edit it, set *Repository* to
`gitea.encke-hake.ts.net/balbosoft/chronos-server:latest`, and when its host ports are not 8080/8443 add the public
ports (*Public HTTP port* 8087 and *Public HTTPS port* 8444 in the owner's case), or enter them in the admin panel. An
earlier template's *Log level* `Information` now locks both log levels: clear it to choose them in the admin panel.
Going back to an older tag needs the database backup taken before the upgrade (migrations only go forward).
## Backup
- **App data and PostgreSQL**: the *Appdata Backup* plugin, with both containers stopped during the backup, covers
`/mnt/user/appdata/chronos` and the PostgreSQL template's data folder. Or dump the database yourself:
`docker exec postgresql17 pg_dump -U chronos -d chronos -Fc > /mnt/user/backups/chronos-$(date +%F).dump`.
- **Archive**: the share itself, with your usual share backup; include the `.chronos` folders.
- **Restore**: put the app data and the archive back, recreate the container from the template with the same paths,
restore the dump (`docker exec -i postgresql17 pg_restore -U chronos -d chronos --clean --if-exists < <dump>`),
then start Chronos. See [docker.md › Backup and restore](docker.md#backup-and-restore) for what each part holds.
## Troubleshooting
See [docker.md › Troubleshooting](docker.md#troubleshooting). The two Unraid classics:
- **The Uploader cannot connect**: the host ports differ from 8080/8443 and the public ports are empty, so the client
address names ports the host does not publish. Set *Public HTTP port* and *Public HTTPS port*.
- **The free space shown is the cache's**: map *Array view* and set *Space path* `/space`.