Troubleshoot self-hosting
Match a Supermetry startup or email error to a verified fix: Docker Compose and buildx, PostgreSQL connection, configuration, port conflicts and SMTP.
Match the startup error to a verified fix, then check readiness again.
-
If Compose reports
compose build requires buildx 0.17 or later, upgrade buildx or disable Bake for this run.Terminal window COMPOSE_BAKE=false docker compose -f deploy/docker-compose.yml up -d --build -
If an older checkout left
deploy-*containers ordeploy_*volumes, inspect them before removing anything.Terminal window docker ps -a --filter name=deploy-docker volume ls --filter name=deploy_Back up any needed data before deleting an old container or volume. Current Compose resources use the
supermetryproject name. -
If PostgreSQL 18 starts with an empty database after an upgrade, check the volume mount. PostgreSQL 18 stores its cluster below
/var/lib/postgresql/18/docker, and the current Compose file mounts the volume at/var/lib/postgresql.An old volume mounted at
/var/lib/postgresql/datamust be backed up with its old configuration and restored into a fresh PostgreSQL 18 volume. Do not remount it at the new path. -
For installer database failures, correct the field named by the message:
connection refused by PostgreSQL host: start PostgreSQL and check its host and port.DNS name not found: correct the database hostname.password authentication failed for user ...: correct the user or password.database ... does not exist: create the database or correct its name.PostgreSQL TLS certificate could not be verified: correct the certificate trust orsslmode.
Interactive installation keeps the entered values and asks again. An unattended
--yesinstall exits without writing files. -
If plain
supermetryprintsSupermetry is not configured, run the installer or create.envwithSUPERMETRY_DATABASE_URL,SUPERMETRY_SECRET_KEY, andSUPERMETRY_BASE_URL. -
If startup reports
listen on ... address already in use, identify the process using the configured port.Terminal window sudo ss -ltnp 'sport = :8787'Stop the unintended process or change
SUPERMETRY_LISTEN, then restart Supermetry. -
Check the service and readiness.
Terminal window sudo systemctl status supermetry --no-pagersudo journalctl -u supermetry -n 50 --no-pagercurl -fsS http://127.0.0.1:8787/readyz
What you should see: the service is active and /readyz returns {"status":"ok"}.
Email not arriving
Section titled “Email not arriving”Start with the test button: in the app open Instance administration → Email (SMTP) and select Send test email. A failure shows the step that failed and the server’s reply. The log records the failed step only, without the server’s reply, because replies can contain email addresses.
-
For failures outside the test (reports, alerts, invitations), read the log for the failed step.
For a binary install:
Terminal window sudo journalctl -u supermetry -n 100 --no-pager | grep -i smtpFor Docker:
Terminal window cd /opt/supermetrydocker compose logs --tail 100 supermetry | grep -i smtp -
Match the error prefix to the cause. The text after the prefix is the server’s own message.
Error prefix Likely cause Fix SMTP is not configuredNo host is set in the environment or in the app. Set SUPERMETRY_SMTP_HOSTor fill in Email (SMTP).SMTP authentication requires STARTTLS or implicit TLSA username is set but the connection is not encrypted. Use starttls(587) orimplicit(465), or remove the username for a trusted local relay.parse SMTP from addressThe From address is not a valid address, or has a line break. Use analytics@example.comor"Supermetry <analytics@example.com>".parse SMTP recipientThe recipient address is not valid. Correct the address of the user or channel. connect SMTPThe host and port cannot be reached: wrong name, port blocked by a firewall, or the provider blocks outbound SMTP. Check the host and port from the Supermetry host, for example with nc -vz HOST PORT. In Docker,localhostis the container.start SMTP TLSThe TLS handshake failed: the certificate does not match the host name, is expired or untrusted, or the mode does not match the port. Use the host name on the certificate. Use impliciton 465 andstarttlson 587. Certificates are always verified.set SMTP deadlineThe connection deadline could not be applied. Rare. Retry; if it repeats, report it with the log line. create SMTP clientThe server’s first reply was not SMTP, usually plain text sent to a TLS port or the reverse. Match the mode to the port. SMTP greetingThe server rejected the EHLO greeting. Set SUPERMETRY_SMTP_HELOto a real, resolvable host name.SMTP server does not support STARTTLSThe server offers no STARTTLS on this port. Use implicitif the port is 465, or another port or provider setting.authenticate SMTPThe username or password was refused. Check the credentials. Many providers need an app password or SMTP-specific credentials, not the account password. set SMTP senderThe server rejected the From address. Verify the sender address or domain with the provider, and use it in From. set SMTP recipientThe server rejected the recipient, often an unverified recipient in a provider sandbox or a relay that does not accept that domain. Verify the recipient or lift the sandbox; check the relay’s rules. open SMTP messageThe server refused to accept message data. Read the server’s text after the prefix; check provider limits and sender status. write SMTP messageThe connection dropped while sending. Retry; check for network or provider interruptions. finish SMTP messageThe server rejected the message after receiving it, for example as spam or over a limit. Read the server’s text; check the SPF, DKIM and DMARC records and the provider’s sending limits. quit SMTPThe server did not end the session cleanly after accepting the message. Usually harmless; confirm whether the message arrived. load SMTP settingsThe settings saved in the app could not be read. Check the database connection and the secret key, then save the settings again. -
If Supermetry does not start, match the startup message.
Startup error Fix SUPERMETRY_SMTP_PORT must be an integer from 1 to 65535Use a number from 1 to 65535. SUPERMETRY_SMTP_STARTTLS must be a booleanUse trueorfalse, or switch toSUPERMETRY_SMTP_TLS.SUPERMETRY_SMTP_TLS must be starttls, implicit or noneUse one of the three values. SUPERMETRY_SMTP_TLS and SUPERMETRY_SMTP_STARTTLS disagree; set only SUPERMETRY_SMTP_TLSRemove SUPERMETRY_SMTP_STARTTLS.SUPERMETRY_SMTP_USER requires TLS: use SUPERMETRY_SMTP_TLS=starttls or implicitTurn on TLS or remove the username. SUPERMETRY_SMTP_FROM is required when SUPERMETRY_SMTP_HOST is setSet the From address. SUPERMETRY_SMTP_HELO must be a host nameUse a host name such as app.example.com. -
If the test or the log shows success but the message is not in the inbox, the mail server accepted it and the problem is after Supermetry. Check, in order:
- The spam or junk folder and any quarantine.
- The provider’s activity or log page for a bounce, block or deferral.
- SPF, DKIM and DMARC for the domain in the From address.
- That the From address or domain is verified at the provider.
- That the provider account is out of any sandbox and under its sending limits.
- That the recipient address is spelled correctly.
What you should see: the test email arrives, or the log shows a single prefix from the table that you can act on.