Seems to install fine through Docker Compose but can't load it in browser

Your question

Installing latest of Stalwart on a Digital Ocean server logging through SSH. It gives me the temporary admin and password.
My server is connected to my domain so I’m trying mydomain.com:8080 but nothing loads.
I have installed other apps through Docker and they worked. Also used Nginx to give them their own domain but I’m getting the impression that to do that with this I have to log in through the port first and let Stelwart handle that? I’m a bit confused. I can follow detailed instructions but I’m no engineer. Would love some help please

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

with the compose file from the official setup guide, port 8080 is only exposed to localhost (i think for security reasons). U can alter it (by changing “127.0.0.1:8080:8080” to “8080:8080” or forward 8080 with ssh (eg. connect to your server with ssh -L 8080:8080 your.server and connect to ur local machine in the webbrowser with localhost:8080.)

This is also explained in the setup guide. Be aware of security implications of the first (altering) solution. Its explaind in the guide too as i see.

Ooh, I see it now, it’s a bit too high level for me with some of the language used.

I tried the ssh tunnel

ssh -L 8080:127.0.0.1:8080 myserver.com

but it says

The authenticity of host ‘myserver.com (ip.goes.here)’ can’t be established.
#lettersNnumbers key fingerprint is #key here#/#more key#.
This key is not known by any other names.

And it asks if I’m sure I want to continue… is that ok or am I doing something wrong?

Apparently it permanently added it to the list of known hosts but it says “Permission denied (publickey)” :confused:

im not sure how much access u have on digital ocean. perhaps u try the first method i sugested (altering the compose file). But be sure to alter it back and restart, after u finished ur setup for security reasons.

Thank you, I have access to all the files through Filezilla so it’s an easy update. It seemed more promising but it just loads for a long time and times out. Page says that https is not available, only http, so it does seem to register there’s something though

The “https is not available” page is a good sign: the browser tried https://, but during the setup Stalwart only speaks plain HTTP on port 8080. Type the address in full, http://your-server-ip:8080/admin, including the http:// part.

If that still spins and times out, something between you and the droplet is dropping port 8080. On DigitalOcean that is usually the Cloud Firewall (Networking > Firewalls in the control panel) or ufw on the droplet itself; ufw status shows whether it is active. Also make sure the container was recreated after you edited the compose file, because saving the file alone changes nothing:

docker compose up -d

The SSH tunnel avoids opening the port at all, so I’d go back to it if you can. “Permission denied (publickey)” means SSH tried to log in without your key or as the wrong user. Use the same user and key you already use for your normal SSH sessions (and in FileZilla); on DigitalOcean that is often root:

ssh -i /path/to/your/private_key -L 8080:127.0.0.1:8080 root@your-server-ip

Leave that window open and browse to http://127.0.0.1:8080/admin on your own computer.

On Nginx: finish the setup wizard directly on port 8080, not through Nginx. Afterwards Stalwart serves its web interface over HTTPS on port 443, and since your Nginx already uses 443 for the other apps, the two will clash. The reverse proxy guide shows how to put Stalwart behind Nginx, and the Docker guide has the setup-specific notes.

Hi, thanks so much for the breakdown!

I had tried manually accessing with the http instead of https but same result, and I had done compose up after editing the file yeah

ufw status does show that it’s active

I tried the ssh -i line but it gave me this:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/media/location/Website_key.ppk' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/media/elocation/Website_key.ppk": bad permissions
root@``myserver.com: Permission denied (publickey).

then I tried to do [email protected] instead of [email protected] and it seemed to have worked better, it asked me for (yes/no/fingerprint) but after I said yes it gave me that denied message again and won’t let me try again. Didn’t think that the fingerprint would be my password.. too many words for apparently the same thing?

chmod 400 Website_key.ppk

That will make it read-only to the owner as opposed to being open to the entire world. Then SSH will stop complaining.

Mmh I opened the folder with terminal, put in that line, it accepted it but didn’t give any feedback, tried the ssh -i line again and same message of it being denied :confused:

I realized that there might be some issues caused because I had the file in an SSD that isn’t automatically mounted, I moved it to somewhere in /home/ and now I get:

Load key "/home/location/Website_key.ppk": error in libcrypto
[email protected]``: Permission denied (publickey).

Hi Erikra,

Website_key.ppk is a PuTTY key. FileZilla understands that format, which is why it works there, but the ssh command only reads OpenSSH keys, hence the “error in libcrypto”. You can convert it once with puttygen (on Debian or Ubuntu it comes in the putty-tools package):

sudo apt install putty-tools
puttygen /home/location/Website_key.ppk -O private-openssh -o ~/.ssh/website_key
chmod 600 ~/.ssh/website_key

If the key has a passphrase, puttygen asks for it. Then open the tunnel with the converted key and the droplet’s IP address from the DigitalOcean panel:

ssh -i ~/.ssh/website_key -L 8080:127.0.0.1:8080 root@your-droplet-ip

The “yes/no/fingerprint” question only appears the first time you connect to a server. Typing yes is the right answer; it isn’t asking for a password. Keep that window open and go to http://127.0.0.1:8080/admin in your browser.

On the open port that times out: ufw rules usually don’t apply to ports published by Docker, because Docker writes its own firewall rules, so ufw is unlikely to be what blocks 8080. A DigitalOcean Cloud Firewall attached to the droplet (Networking > Firewalls) would be. Once the tunnel works you don’t need the open port at all, and you can put the compose file back to 127.0.0.1:8080:8080.

Ooooooh omg I would’ve never arrived to that by myself, thank you so much.

This is so complicated, I’m so glad you’ll soon have a managed e-mail service. I’m just hosting myself for a couple months so I don’t have to pay another year of Proton, my subscription with them ends in like 4 days.

I got my terminal to work as if it was the droplet, but when I tried to open http://127.0.0.1:8080/admin I got:

channel 3: open failed: connect failed: Connection refused

ten times

I have DigitalOcean firewall down, I’m sure I put the port right, I’ve tried with both my domain and my server’s IPv4, I get Stalwart to start on bootstrap and give me the temporary admin pass..

Yet every time I try to load it in my browser I get that channel 3 error but looking online it’s telling me to check the things I’ve already checked.

I get one error after the bootstrap starts but it seems like it’s fine anyway afterwards?

stalwart | 2026-11-05T22:19:41Z WARN Server started in bootstrap mode (server.bootstrap-mode) hostname = "f2f5781f5186", details = "No configuration file was found. Port 8080 is open for initial setup.", version = "1.0.2"
stalwart | 2026-11-05T22:19:41Z ERROR Resource error (resource.error) reason = Resource error (resource.error) { causedBy = "crates/common/src/manager/application.rs:565", url = "``https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip``", reason = "Failed to fetch ``https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip:`` error sending request for url (``https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip``)", details = "Failed to fetch application bundle" }, url = "``https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip``", details = "Failed to unpack application for prefixes: admin, account, no bundle is available to serve"
stalwart | 2026-11-05T22:19:41Z WARN Configuration build warning (registry.build-warning) objectType = "DnsResolver", id = 20080258862541, property = (null), reason = "The configured DNS resolver cannot validate DNSSEC. DANE has been disabled to avoid deferring mail. Ensure the resolver is DNSSEC-capable and reachable over TCP."
stalwart | 2026-11-05T22:19:41Z INFO Network listener started (network.listen-start) listenerId = "http-recovery", localIp = ::, localPort = 8080, tls = false

Stalwart inside your docker container cant fetch the webui application, without u cant connect to it on port 8080. Perhaps some firewallsettings in digital oceaon which block outgoing traffic on port 443?

The firewall on my DigitalOcean settings is currently off. In the droplet if I do ufw status it does list 443(v6) as allowed from anywhere though. Does it have to be v4 allowed too?

Nvm it’s allowed in v4 as well it seems, I’m just blind

8080 is not in that list, should it be?

Added -vv to my ssh line and got this: debug1: Connection to port 8080 forwarding to 127.0.0.1 port 8080 requested.de - Pastebin.com

Its about outgoing connections, not incomming.

2026-11-05T22:19:41Z ERROR Resource error (resource.error) reason = Resource error (resource.error) { causedBy = "crates/common/src/manager/application.rs:565", url = "``https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip``", reason = "Failed to fetch

Is the relevant part in the log. The WebUI (which are u trying to access by connecting http://you.domain:8080 is not part of the docker container, instead stalwart downloads it at the first start.
This download fails. Thats at least one reason why its not working for you.

There could be several reasons why this is failing, common to my knowledge are fireall settings (outgoing https access) or dns missconfiguration.

Im note sure if this is the only error, because u get a “connection refused” and not an http-error which i would expect, but this has to be fixed anyway.

edit: If u have ssh access and a shell on the server, u could test:
curl --proto '=https' -OL https://github.com/stalwartlabs/webui/releases/download/v2/webui.zip

if it downloads the webui.zip to the current directory firewall and dns settings should be fine.

It downloads it with no issues using that line, double checked with FileZilla that it was there. Where should I put it?

Also in case this is relevant, every time I do docker compose up whenever I need to refresh the yml I get this error:

[+] up 2/2
✔ Container stalwart Recreated 0.3s
Attaching to stalwart
Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint stalwart (cb1868648494cef94fe1c88c81df243d6578c0b7056368bb4375c0c4a5e56d94): failed to bind host port 0.0.0.0:443/tcp: address already in use

I “fix it”(?) by sudo systemctl restart docker and then running compose up again, then it works. Is there a chance this is related?

I currently don’t have any other docker images but I did in the past and I intend to add NextCloud once I manage to get this running.

Running sudo lsof -i :443 I get:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 1083 root 5u IPv4 13002 0t0 TCP *:https (LISTEN)
nginx 1084 www-data 5u IPv4 13002 0t0 TCP *:https (LISTEN)

But doing sudo grep listen /etc/nginx/nginx.conf shows its only listening to 110 and 143

Reading through the docs I realize there’s this point that says:

/etc/stalwart holds config.json, the configuration file that the setup wizard creates in Step 3, and /var/lib/stalwart holds the data. Both volumes must be persistent, because a server that finds no config.json at startup runs the setup wizard again.

But I don’t seem to have the stalwart folder inside etc… there’s an empty docker folder. Then I looked at this: Overview | Stalwart

and it says:

Download the bundle separately, copy it to the server and set resourceUrl to its file:// URL, for example file:///var/lib/stalwart/webui.zip

But nowhere does it say where to set this resourceUrl value and I have no clue. Also looked at Overview | Stalwart

My lib folder also lacks a stalwart folder

OMG IT WORKS

Apparently nginx somehow was using the port 443. Found out with sudo ss -ltnp 'sport = :443':

LISTEN 0 511 0.0.0.0:443 0.0.0.0:* users:(("nginx",pid=1084,fd=5),("nginx",pid=1083,fd=5))

Ran kill 1083 - trying to kill it with the first pid didn’t do anything, had to use the second pid.

docker compose down, docker compose up, and it worked with no errors!

Thank you to everyone that helped me along the way!

It did take over my website, and now that I have restored it by turning off docker and restarting nginx it still says that my website is not secure even tho it’s loading on https… the pain never ends ;-;