# Admin web interface (through nginx

**URL:** https://support.stalw.art/t/admin-web-interface-through-nginx/1913
**Category:** Questions
**Created:** [October 11, 2026, 3:23am UTC](https://support.stalw.art/t/admin-web-interface-through-nginx/1913 "2026-10-11T03:23:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![isaac\_gindi](https://support.stalw.art/user_avatar/support.stalw.art/isaac_gindi/32/1071_2.png) [@isaac\_gindi](https://support.stalw.art/u/isaac_gindi)
#### Post date: [October 11, 2026, 3:23am UTC](https://support.stalw.art/t/admin-web-interface-through-nginx/1913/1 "2026-10-11T03:23:31Z")

</div>

### Your question

Stalwart 0.16.10 on Ubuntu, running as a systemd service. The automatic ban has blocked the server’s own public IP, 140.150.227.70. Because of that, the admin web interface (through nginx on the same server) returns 502, and our webmail on the same server can’t connect to IMAP. Incoming mail from Gmail does reach port 25. We need to remove that blocked IP, add it to the allowed IPs so it can’t happen again, and decide whether to adjust or turn off the automatic ban. What’s the safest way to do this from recovery mode?

### I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

---

<div class="post-metadata">

### Author: ![helpbot](https://support.stalw.art/user_avatar/support.stalw.art/helpbot/32/13_2.png) [@helpbot](https://support.stalw.art/u/helpbot)
#### Post date: [October 11, 2026, 3:23am UTC](https://support.stalw.art/t/admin-web-interface-through-nginx/1913/2 "2026-10-11T03:23:59Z")

</div>

Now I have enough to answer comprehensively.

**Get in via recovery mode, then fix the ban and whitelist your own IP.**

1. **Enter recovery mode.** Stop the service, set the environment variables, and restart:

2. **Remove the block on 140.150.227.70.** It’s stored as a `BlockedIp` record. From the CLI:

3. **Add it to the allow list so it can’t be banned again.** Create an `AllowedIp` record (Settings → Security → Allowed IPs, or via CLI):

4. **Adjust the auto-ban thresholds if you want to loosen them** rather than disabling the feature outright. They live on the `Security` singleton (`Settings → Security → Settings`): `authBanRate`/`authBanPeriod`, `abuseBanRate`/`abuseBanPeriod`, `loiterBanRate`/`loiterBanPeriod`, `scanBanRate`/`scanBanPeriod`. Raising the rate values or lengthening the period gives more headroom before a ban triggers. There’s no single master “off” switch documented other than setting each `*BanRate` high enough that it won’t realistically trigger; the safer route for your own IP specifically is the allow-list entry above, since that bypasses banning for that address regardless of thresholds.

5. Once fixed, unset `STALWART_RECOVERY_MODE` (and remove `STALWART_RECOVERY_ADMIN`) and restart the service normally.

Reference: [Recovery mode](https://stalw.art/docs/configuration/recovery-mode), [Auto-banning](https://stalw.art/docs/server/auto-ban), [IP address allow/block lists](https://stalw.art/docs/server/general)

_This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong._

---

<div class="post-metadata">

### Author: ![stalwart](https://support.stalw.art/user_avatar/support.stalw.art/stalwart/32/12_2.png) [@stalwart](https://support.stalw.art/u/stalwart)
#### Post date: [October 11, 2026, 3:21pm UTC](https://support.stalw.art/t/admin-web-interface-through-nginx/1913/3 "2026-10-11T15:21:37Z")

</div>

nginx and the webmail both reach Stalwart through 140.150.227.70, so as far as Stalwart can tell every login and request they pass along comes from that one address. A run of failed webmail logins, or a scanner probing paths through nginx, is enough to get it banned.

You don’t need recovery mode for this. Loopback is never banned, so from the server itself you can point the CLI at 127.0.0.1 on the port nginx proxies to and delete the entry:

```sh
stalwart-cli --url http://127.0.0.1:8080 query blockedip
stalwart-cli --url http://127.0.0.1:8080 delete blockedip --ids <id>

```

If the admin login fails, set `STALWART_RECOVERY_ADMIN=admin:<password>` in the service environment, restart, and remove it again afterwards ([Recovery mode | Stalwart](https://stalw.art/docs/configuration/recovery-mode)).

I wouldn’t add the public IP to the allowed list or turn auto-ban off. Either way, everything coming through nginx would be exempt from banning. Point nginx’s `proxy_pass` and the webmail’s IMAP host at 127.0.0.1 and enable Proxy Protocol on those listeners ([Proxy Protocol | Stalwart](https://stalw.art/docs/server/reverse-proxy/proxy-protocol)), so Stalwart sees the real client addresses and bans the attacker instead of your own proxy. The thresholds are at [Auto-banning | Stalwart](https://stalw.art/docs/server/auto-ban) if the defaults turn out too strict. 0.16.10 is also quite a few releases behind, so an upgrade is due.
