Run the three checks under Start here first. They tell you which part is broken.
Install and startup
The app stops at once and the log says DATABASE_URL is not set
The service started without its settings file. The full message is DATABASE_URL is not set (for example postgres://imbox:password@localhost:5432/inbox).
- On a server, check that
/etc/imbox/imbox.envexists and has aDATABASE_URL=line. The setup script writes it. If you moved or deleted it,imbox.env.examplein thedeployfolder shows the shape. - With Docker,
DATABASE_URLis built fromPOSTGRES_PASSWORDin.env. Check that.envsits next todocker-compose.yml.
Docker Compose stops with set POSTGRES_PASSWORD in .env
Compose refuses to start when a required value is empty. It names the missing one: POSTGRES_PASSWORD, APP_URL, or SESSION_SECRET (openssl rand -hex 32). Fill it in .env, then run docker compose up -d again.
The log shows postgres pool: errors
The app cannot reach the database.
- Server:
sudo systemctl status postgresql. If it is stopped,sudo systemctl start postgresql. Check that the password inDATABASE_URLis the one the setup script created for theimboxrole. - Docker:
docker compose psshould show thedbcontainer as healthy. If it is restarting,docker compose logs dbsays why. A changedPOSTGRES_PASSWORDdoes not change a database that already exists. Either put the old password back or, if you have nothing to keep, remove the volume withdocker compose down -v.
The setup script stops partway
It is safe to run again. It skips what is already installed and keeps an existing /etc/imbox/imbox.env. Read the last lines it printed for the step that failed. The usual causes are no network from the server, or a system older than Debian 12 or Ubuntu 22.04.
imbox-activate prints New release did not become healthy
The new release did not answer healthz within about a minute, so the script put the previous release back and printed the last 40 log lines. Read them. The cause is almost always one of the entries above. Your site stays on the old release while you fix it.
After the setup script, the site shows 502 or nothing
The setup script installs the services but does not put the app on the server. Do step 2 of Install, then check healthz again.
The site does not open
The browser warns about the certificate, or the connection fails
Caddy gets a certificate on its own, but only when the domain already reaches the server and port 80 is open.
dig +short imbox.example.commust print your server's IP address. If it prints nothing or another address, fix the DNS record and wait for it to spread.- Ports 80 and 443 must be open in the server's firewall and in your cloud provider's firewall. The setup script opens them on the machine, not at the provider.
- Read what Caddy says:
sudo journalctl -u caddy -n 50 --no-pager. A line about a failed challenge names the reason.
If you put a proxy such as Cloudflare in front, set its encryption mode to "Full (strict)", or you get redirect loops.
Caddy answers 502 Bad Gateway
Caddy is up but the app is not. Run the three checks under Start here.
Live updates never arrive, and new mail shows only after a reload
A proxy in front of the app is holding the live stream back. Turn off response buffering for /api/events. With Caddy add flush_interval -1 inside reverse_proxy, as in Install. With nginx use proxy_buffering off; for that path.
Actions fail with "This request did not come from the app"
You can read mail, but sending, moving or saving fails with This request did not come from the app. (cross_site_request, status 403).
imbox refuses any change request whose origin is not its own address. The address it expects is the host in APP_URL, or the host the request arrived on. A proxy that rewrites the host breaks the second one.
- Open
/etc/imbox/imbox.env(or.envfor Docker).APP_URLmust be exactly the address in your browser's address bar, withhttps://and no trailing path:APP_URL=https://imbox.example.com. - Restart:
sudo systemctl restart inbox, ordocker compose up -d. - If you use a proxy other than Caddy, pass the original host on to the app (nginx:
proxy_set_header Host $host;).