Skip to content

Notifications and Daily Check

dxcufgb edited this page Oct 30, 2026 · 1 revision

Notifications and daily check

The proxy e-mails the addresses in admin.json about two things: problems found by the daily check, and automatic updates.

Setting the addresses and the mail server

Set the addresses and the mail server while installing (the installer asks after the admin password; the Windows installer has a page for it), on the administration page (Notifications), or with --set-notify / -SetNotify.

Unattended installs read FOUNDRY_PROXY_NOTIFY_EMAILS (comma separated), FOUNDRY_PROXY_SMTP_HOST, FOUNDRY_PROXY_SMTP_PORT, FOUNDRY_PROXY_SMTP_SECURITY (starttls, tls or none), FOUNDRY_PROXY_SMTP_USER, FOUNDRY_PROXY_SMTP_PASSWORD and FOUNDRY_PROXY_SMTP_FROM (the Windows setup also takes /NOTIFYEMAILS=, /SMTPHOST=, /SMTPPORT=, /SMTPSECURITY=, /SMTPUSER= and /SMTPFROM=; the password only from the environment).

Send test e-mail on the admin page checks the settings; its error names the SMTP step that failed.

Daily check

Once a day (the first time an hour after the proxy starts) the proxy runs the same checks as Test setup on the admin page with the token in use. When something is wrong it e-mails the notification recipients in admin.json, every day until it is fixed, and once more when everything is fine again:

  • GitHub no longer accepts the token (expired, revoked), or it expires within 14 days;
  • this proxy's own repository, whose releases automatic updates read, can no longer be read, with the token or without one (it is public; only once it has been read since the proxy started, so an install that never could, e.g. without access to GitHub's API, gets no e-mail about it every day; Test setup still shows it);
  • the token cannot see a module repository, or its latest release is missing or lacks the manifest or zip asset.

Subject Foundry release proxy (<host name>): setup problems (or ...: setup OK again), with the problems and the link to the admin page (ADMIN_PUBLIC_URL when set, else PUBLIC_BASE_URL) in the body.

When GitHub cannot be reached at all, the proxy tries again an hour later and only e-mails if that fails too. Each run writes one line to the proxy's log (daily check: all OK or daily check: N problem(s)). The check runs whether or not the admin page is on; without recipients it only logs. DAILY_CHECK=off in env turns it off.

Update notifications by e-mail

When automatic updates are on, every run that installs a new version or fails (check failed, bad download, rolled back) sends an e-mail to each address in admin.json: subject Foundry release proxy (<host name>): updated to X.Y.Z or ...: automatic update failed, with the details in the body. No addresses = no e-mails. A failure to send is only logged and never changes the outcome of the update. (A failing check e-mails you every day until it is fixed.) The same addresses get the daily check's e-mails.

How the mail is sent

The mail is sent by src/notify.js with a small built-in SMTP client: starttls (port 587) or tls (port 465) with a verified certificate; the password goes out only over TLS (AUTH PLAIN/LOGIN), so none is only for a local relay without login. For Gmail use smtp.gmail.com, port 587, starttls and an app password.

On Linux the root updater runs notify.js as the proxy's own user (setpriv), so root never parses the file that user can write; on Windows the SYSTEM updater runs it. The first update to this version is still done by the previous version's updater, so e-mails start with the update after that.

Clone this wiki locally