Your question
I accidentally deleted the listener for http(s) for port 8080.
how can i repair that?
thanks in advance,
Stefan
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
You can recover access without the Web UI by using stalwart-cli from the command line on your server to recreate the deleted HTTP listener. The CLI talks to the JMAP API directly, so it works even when no HTTP listener is active – as long as another protocol port (e.g. SMTP 25) is still reachable, or if you point it at localhost over a still-running JMAP/HTTP port on another address.
Step-by-step recovery:
-
Check if any HTTP port is still reachable. If you have another listener (e.g. a JMAP or HTTPS listener on a different port) still running, you can use that URL. If not, you may need to restart the server and see what it binds by default, or check if it still binds on 127.0.0.1:8080 locally.
-
Install stalwart-cli if not already present (see CLI docs).
-
Recreate the HTTP listener with a command like:
stalwart-cli --url http://127.0.0.1:8080 --user admin --password YOUR_PASSWORD \
create NetworkListener \
--field name=http \
--field 'bind=["0.0.0.0:8080"]' \
--field protocol=http \
--field useTls=false \
--field 'overrideProxyTrustedNetworks={}' \
--field 'tlsDisableCipherSuites={}' \
--field 'tlsDisableProtocols={}'
Adjust the bind address/port and name to match what you previously had. If you want HTTPS instead, set useTls=true and protocol=http (Stalwart uses http as the protocol value for both HTTP and HTTPS – TLS is controlled by useTls).
- If no listener at all is responding, the server likely needs to have at least one port up. In that case you may need to temporarily restart the Stalwart service; on some installations the service will re-bind a default port on restart. If the server truly has no way to receive connections, a human admin may need to intervene at the data-store level.
Relevant docs:
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
that didn’t work unfortunately. I get this error:
error: error sending request for url (http://127.0.0.1:8080/api/schema)
Is there a possibility to edit the db directly?
i tried rocksb-tools, but the don’t work with the stalwart db.
It works now again. I started stalwart in recovery mode.