Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ turnkey-opencloud-18.1 (1) turnkey; urgency=low
* Firstboot inithooks: regenerate build-time secrets (opencloud.yaml),
set admin password and domain (interactive or preseeded).

* Fix nginx failing at firstboot (cert/key mismatch race with the common
15regen-sslcert hook): nginx drop-in with Restart=on-failure and an
unconditional nginx restart at the end of the opencloud inithook.

-- POP Solutions <popsolutions.co@gmail.com> Tue, 21 Jul 2026 20:30:00 +0000
10 changes: 10 additions & 0 deletions overlay/etc/systemd/system/nginx.service.d/opencloud.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Firstboot: 15regen-sslcert regenerates the TLS cert/key while nginx may be
# starting; reading a mid-regen mismatched pair fails the unit, and the
# regen hook only restarts services that are still active. Keep retrying so
# nginx comes up on its own once the pair is consistent.
[Unit]
StartLimitIntervalSec=0

[Service]
Restart=on-failure
RestartSec=10
4 changes: 4 additions & 0 deletions overlay/usr/lib/inithooks/bin/opencloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ def set_domain(domain: str) -> None:
# unconditional restart: 20regen-opencloud-secrets stopped the service,
# so try-restart would be a no-op and leave OpenCloud down
subprocess.run(["systemctl", "restart", "opencloud"], check=False)
# nginx can fail at boot if it starts while 15regen-sslcert is mid-way
# through regenerating the cert/key pair (mismatch); the common hook only
# restarts services that are still active, so recover it here
subprocess.run(["systemctl", "restart", "nginx"], check=False)


def main():
Expand Down
Loading