fix(server): client address from the page's port, stricter Chronos identity, Host networking notes

Review fixes on top of the public ports change (owner review 3):

- Settings > Network and TLS: opened over HTTPS, the client address uses the port
  the page came through (a container's 8443 published as 8444 with Public HTTPS
  port still empty showed the wrong 8443), and a "Use <port>" button fills that
  port in. Saving a Public HTTPS port other than the page's asks first, since the
  HTTPS redirect follows it at once and a typo would lock the panel's link out.
- GetInfoAsync tells Chronos from other services by stricter rules on both the
  trusted and the untrusted-certificate path: any redirect, any answer that is not
  JSON, more than 1 MB, or an error without the X-Chronos-Api header is not
  Chronos. Another service's certificate is no longer offered for trust after a
  cross-scheme redirect, an error page or a JSON 401/403/404, and a JSON 401 over
  HTTP no longer reads as a wrong password.
- The HTTP port typed without a scheme (TLS to a plain HTTP port) now gives the
  not-Chronos error instead of "the server did not answer".
- The Uploader's certificate question names the address with its port.
- A link-local IPv6 address with a zone index is refused instead of losing it.
- In a container, the first save of the settings removes HttpPort/HttpsPort from
  server.json, so the start-up warning stops; the warning says so.
- Guide, README, compose and template: with network type Host the mappings do
  nothing and CHRONOS_HTTP_PORT / CHRONOS_HTTPS_PORT move the listening ports off
  ones another service uses; the template overview is back to two sentences.
- BRIEF, DECISIONS and CHANGELOG updated; en/it strings added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-04 10:28:08 +01:00
1 parent 369e754bec
commit 0aa2fb8135
19 files changed
+303 -67

No files matched your search

+5
View File
@@ -17,6 +17,8 @@ services:
# ports. LAN discovery reaches clients only with "network_mode: host"; on this bridge network clients type the
# client address. With host networking drop "ports", give the postgres service
# ports: ["127.0.0.1:5432:5432"] and set CHRONOS_DB_HOST to 127.0.0.1: the name "postgres" no longer resolves there.
# The server then listens on the host's 8080 and 8443 itself: if another service uses either, set CHRONOS_HTTP_PORT
# or CHRONOS_HTTPS_PORT below to a free port and leave the public ports unset.
ports:
- "8080:8080"
- "8443:8443"
@@ -41,6 +43,9 @@ services:
# longer change them.
# CHRONOS_PUBLIC_HTTP_PORT: "8080"
# CHRONOS_PUBLIC_HTTPS_PORT: "8443"
# The ports the server listens on, with network_mode: host only (on a bridge network the mapping above decides).
# CHRONOS_HTTP_PORT: "8080"
# CHRONOS_HTTPS_PORT: "8443"
CHRONOS_SERVER_NAME: Chronos Server
# Jobs run one at a time. Photos the running job processes at once (default: half the cores), and the priority queue
# (a higher job pauses the running one, which resumes afterwards). Set here, they can no longer be changed in the
+7 -1
View File
@@ -108,6 +108,10 @@ certificate is never offered for trust.
client address in Chronos and in the Uploader. With `network_mode: host` the name `postgres` no longer resolves: remove the
`ports` of the `chronos` service, publish PostgreSQL on loopback (`ports: ["127.0.0.1:5432:5432"]` under `postgres`)
and set `CHRONOS_DB_HOST: 127.0.0.1`.
- With host networking the port mappings do nothing: the server listens on the host's 8080 and 8443 itself, and the
container does not start when another service already uses either. Then add the variable `CHRONOS_HTTP_PORT` or
`CHRONOS_HTTPS_PORT` with a free port (compose: under `environment`; Unraid: *Add another Path, Port, Variable…* ›
*Variable*, Key `CHRONOS_HTTPS_PORT`), and leave the public ports empty: clients reach the listening ports directly.
- Behind a reverse proxy (`CHRONOS_TLS_MODE=proxy`), only the proxies listed in `CHRONOS_TRUSTED_PROXIES` may set
`X-Forwarded-*` headers. By default that is loopback only: other machines on your network reach the HTTP port
directly, so they must not choose the address the sign-in limit and the audit log see. List your proxy's own
@@ -137,7 +141,9 @@ certificate is never offered for trust.
array's free space rather than the cache's. Change it with the archive share, or remove it and clear *Space path*.
4. Open the WebUI (`http://[IP]:8080/admin`). Clients connect to the *Client address* in Settings › Network and TLS,
`https://[IP]:<HTTPS port>`. On network type *Bridge* LAN discovery stays inside Docker, so clients do not find the
server by themselves: type that address. Network type *Host* lets them find it.
server by themselves: type that address. Network type *Host* lets them find it; the server then listens on the
host's own 8080 and 8443, so when another service uses either, add the variable `CHRONOS_HTTP_PORT` or
`CHRONOS_HTTPS_PORT` first (see host networking above).
Upgrading a container made from an earlier template, or one on `:nightly`: edit the container, set *Repository* to
`…/chronos-server:latest`, and set *Public HTTP port* and *Public HTTPS port* to the host ports the template maps (for
+3 -3
View File
@@ -9,7 +9,7 @@
<Privileged>false</Privileged>
<Support>https://gitea.encke-hake.ts.net/BalboSoft/Chronos/issues</Support>
<Project>https://gitea.encke-hake.ts.net/BalboSoft/Chronos</Project>
<Overview>Chronos Server keeps a shared, verified archive of time-lapse photo sequences and renders them. Pair it with the official PostgreSQL 17 container. Clients connect to the Client address the admin panel shows (Settings, Network and TLS); LAN discovery reaches them only with network type Host.</Overview>
<Overview>Chronos Server keeps a shared, verified archive of time-lapse photo sequences and renders them; pair it with the official PostgreSQL 17 container. Clients connect to the Client address the admin panel shows (Settings, Network and TLS); LAN discovery needs network type Host.</Overview>
<Category>MediaServer:Photos Tools:</Category>
<WebUI>http://[IP]:[PORT:8080]/admin</WebUI>
<TemplateURL>https://gitea.encke-hake.ts.net/BalboSoft/Chronos/raw/branch/main/deploy/unraid/chronos.xml</TemplateURL>
@@ -21,8 +21,8 @@
<DonateText/>
<DonateLink/>
<Requires>A PostgreSQL 16 or 17 container (official "postgres" template) with a database and user for Chronos.</Requires>
<Config Name="HTTP port" Target="8080" Default="8080" Mode="tcp" Description="Admin panel and API over HTTP. When you change it, enter the same port in Public HTTP port." Type="Port" Display="always" Required="true" Mask="false">8080</Config>
<Config Name="HTTPS port" Target="8443" Default="8443" Mode="tcp" Description="API over TLS for Chronos clients, which connect to https://[server IP]:[this port]. When you change it, enter the same port in Public HTTPS port." Type="Port" Display="always" Required="true" Mask="false">8443</Config>
<Config Name="HTTP port" Target="8080" Default="8080" Mode="tcp" Description="Admin panel and API over HTTP; when you change it, enter the same port in Public HTTP port. Network type Host ignores this mapping: the server then listens on 8080 itself." Type="Port" Display="always" Required="true" Mask="false">8080</Config>
<Config Name="HTTPS port" Target="8443" Default="8443" Mode="tcp" Description="API over TLS for Chronos clients, which connect to https://[server IP]:[this port]; when you change it, enter the same port in Public HTTPS port. Network type Host ignores this mapping: the server then listens on 8443 itself." Type="Port" Display="always" Required="true" Mask="false">8443</Config>
<Config Name="Public HTTP port" Target="CHRONOS_PUBLIC_HTTP_PORT" Default="" Mode="" Description="The HTTP port above, when it is not 8080; LAN discovery announces it. Set here, the admin panel can no longer change it (empty: 8080, changeable in the admin panel)." Type="Variable" Display="always" Required="false" Mask="false"/>
<Config Name="Public HTTPS port" Target="CHRONOS_PUBLIC_HTTPS_PORT" Default="" Mode="" Description="The HTTPS port above, when it is not 8443: the port of the client address, the admin panel's redirect and LAN discovery. Set here, the admin panel can no longer change it (empty: 8443, changeable in the admin panel)." Type="Variable" Display="always" Required="false" Mask="false"/>
<Config Name="Archive" Target="/archive" Default="/mnt/user/Timelapse" Mode="rw" Description="Originals, sidecars, proxies and renders." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/Timelapse</Config>