Troubleshooting#
Service not starting#
PosternProxy fails to start#
sudo tail -n 50 /var/log/posternproxy/posternproxy.logCommon causes:
| Symptom | Cause | Fix |
|---|---|---|
database is locked | Another PosternProxy instance is running | systemctl stop posternproxy; systemctl start posternproxy |
migration failed | Bad database state | Restore from backup |
address already in use :81 | Another process owns port 81 | ss -tlnp | grep 81 to find it |
config.env not found | Missing config file | For existing data, restore the original config and encryption secret. For a fresh install, run posternproxy install. |
Caddy fails to start#
journalctl -u caddy -n 50 --no-pager
caddy validate --config /etc/caddy/Caddyfile # if using Caddyfile fallbackCommon causes:
| Symptom | Cause | Fix |
|---|---|---|
bind: permission denied on port 80/443 | Missing CAP_NET_BIND_SERVICE | Check systemd unit AmbientCapabilities |
plugin not found: layer4 | Caddy built without L4 plugin | Replace Caddy using the pinned build |
failed to obtain certificate | DNS not propagated or port 80 blocked | Check DNS and UFW |
UI and API errors#
“missing CSRF token” (403) when saving#
You can log in and load pages, but any create/update/delete returns
403 {"error":"missing CSRF token"}.
Cause: cookies are flagged Secure, but you are accessing the UI over plain
HTTP. Browsers refuse to store or send Secure cookies over HTTP, so the
csrf_token cookie never reaches the server. Login still works because it uses
a bearer token, not a cookie.
Fix: either access the UI over HTTPS, or tell PosternProxy it is not behind
TLS so cookies are not marked Secure:
echo 'POSTERNPROXY_BEHIND_TLS_PROXY=false' >> /etc/posternproxy/config.env
systemctl restart posternproxyThen clear the site’s cookies (or hard-refresh) so a fresh, non-Secure
csrf_token is issued. Set the variable back to true once you put TLS in
front of the UI.
Traffic not routing#
Proxy host created but getting connection refused#
Check the proxy host is enabled in the UI
Verify Caddy is running:
systemctl status caddyCheck Caddy’s config includes the route:
curl -fsS http://localhost:2019/config/apps/http/servers/ | jq .Verify the upstream is actually listening:
curl -I http://<upstream-host>:<port>/
Getting 502 Bad Gateway#
The upstream is not reachable. Check:
- The upstream service is running on the configured host and port
- There is no firewall between PosternProxy and the upstream
- If using a hostname, it resolves correctly:
dig <hostname>
If health checks are configured, check the upstream health widget on the Dashboard.
Getting wrong certificate / TLS error#
- Check which certificate is assigned to the proxy host (SSL tab), or whether Force HTTPS is on
- If using automatic Let’s Encrypt, verify the domain resolves to this server:
dig +short <domain>and that port 80 is reachable from the internet - Check the live TLS status on the Proxy Hosts list (OK / pending / failed). Caddy retries provisioning automatically — once DNS/port 80 are correct it flips to OK on its own
- Inspect Caddy’s certificate activity:
journalctl -u caddy | grep -i tls
Management UI issues#
Can’t log in#
- Verify credentials: the default email is
admin@posternproxy.local; retrieve the initial password withsudo grep -A6 'INITIAL SETUP' /var/log/posternproxy/posternproxy.log - Check fail2ban has not banned your IP:
fail2ban-client status posternproxy - Unban:
fail2ban-client set posternproxy unbanip <your-ip> - Check the service is running:
systemctl status posternproxy
UI shows stale data#
Reload the page to refresh list data. Provisioning streams output; dashboard health and configuration state are polled. Other lists do not receive live WebSocket updates.
Force Caddy sync#
If you suspect Caddy’s config has drifted from the database (e.g. after a manual caddy reload):
- Use Retry sync in the shared configuration notice, or Re-sync on Servers
- Check desired/applied configuration state and errors after requesting the sync
The API is POST /api/servers/{id}/resync (Local is server 1), requiring
admin authority, write scope and CSRF cookie/header validation. See the
API write example
and application status.
There is no /api/settings/caddy-sync endpoint.
NTLM passthrough#
The Security tab control is legacy and off unless you enable it. IIS behavior is not verified. Limits are in Proxy Hosts.
The save is rejected#
Creating or updating a host, restoring a history snapshot, or restoring a backup
rejects NTLM passthrough when the host also has extra upstreams, path locations,
TLS passthrough, nonempty advanced route JSON, a header rule that can change
Authorization or WWW-Authenticate, or a custom 401 page. That rejection does
not change the current host. A history or backup rejection does not move the
desired revision.
The host saved, but Caddy did not apply it#
A create or update can save the host and still fail application. The response says the configuration was saved and names the server. It does not include Caddy’s reason. Read configuration status.
If the status error is Caddy rejected the configuration because the NTLM transport module is missing. Upgrade Caddy on this server and retry sync.,
replace Caddy on that server with the pinned build, then retry sync. The last
loaded configuration keeps serving. PosternProxy does not fall back to ordinary
HTTP.
If one saved NTLM host cannot be rendered, application fails for every host on
that server. Status then keeps the generic failure:
Configuration application failed; retry or check server connectivity. on the
controller, or Agent rejected configuration. Check the server and retry synchronization.
on an agent. Correct or disable that host, then retry sync. The previous Caddy
configuration keeps serving.
Multi-server issues#
Add Server fails immediately, or says remote provisioning isn’t configured#
Both automatic SSH installs and manual enrollment require the controller’s
advertised callback URL. If POSTERNPROXY_CONTROLLER_URL is unset or malformed,
the Add Server wizard reports that remote provisioning isn’t configured and
blocks submit; older builds instead returned a 400 with
controller URL must be an absolute base URL without credentials, query or fragment.
Set it to the address agents should connect back to — an absolute URL with a
scheme and no path, query or fragment (for example wss://controller-host:81) —
then restart the controller. See
Provisioning.
Agent shows as Offline#
SSH into the remote server and check the agent:
systemctl status posternproxy-agent journalctl -u posternproxy-agent -n 30Verify the agent can reach the controller:
curl -fsS http://<controller-ip>:81/api/versionCheck the protected agent configuration has the correct controller URL, numeric server ID and valid agent token. New installations use
posternproxy-agent; historical ones may usecaddyproxy-agent. Review Provisioning before redeploying; it rotates credentials and disconnects the previous identity.
Config changes not reaching remote server#
- Check agent is online on the Servers page
- If recently reconnected, a full sync is sent automatically — wait a few seconds
- Check the agent journal for errors:
journalctl -u posternproxy-agent -n 50
Log locations#
| Component | Log command |
|---|---|
| PosternProxy (installed service) | sudo tail -f /var/log/posternproxy/posternproxy.log |
| Caddy | journalctl -u caddy -f |
| Agent | Depends on installer: see Provisioning |
| fail2ban | journalctl -u fail2ban -f |
| UFW | /var/log/ufw.log |
Getting help#
If the above steps do not resolve your issue, collect the following for a bug report:
# System info
uname -a
cat /etc/os-release
# Service status
systemctl status posternproxy caddy
sudo tail -n 100 /var/log/posternproxy/posternproxy.log
journalctl -u caddy -n 100 --no-pager
# Caddy config (sanitise any secrets)
curl -s http://localhost:2019/config/ | jq .Remove credentials, generated setup passwords, private keys and other secrets before sharing logs or Caddy configuration. Use the private reporting process for suspected vulnerabilities.