# Web app not working in mailadm

**URL:** <https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997>\
**Category:** Mutual Help\
**Created:** [March 26, 2024, 6:52pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997 "2024-03-26T18:52:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 26, 2024, 6:52pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/1 "2024-03-26T18:52:40Z")

</div>

Hi Guys,

I have installed mailadm. It seems that almost everything is ok, but the container for gunicorn server is not responding to calls …  
If I check the containers, it shows me: c9b210371891 mailadm-mailcow “gunicorn --timeout …” 2 minutes ago Restarting (1) 23 seconds ago mailadm  
I started it with the command according to [mailadm: managing token-based temporary e-mail accounts — mailadm 1.0.0 documentation](https://mailadm.readthedocs.io/en/latest/#) : $ sudo docker run -d -p 3691:3691 --restart=unless-stopped --mount type=bind,source=$PWD/docker-data,target=/mailadm/docker-data --name mailadm mailadm-mailcow gunicorn --timeout 60 -b :3691 -w 4 mailadm.app:app

But if I start it with command:  
sudo docker run -d -p 3691:3691 --mount type=bind,source=$PWD/docker-data,target=/mailadm/docker-data --name mailadm mailadm-mailcow gunicorn -b :3691 -w 1 mailadm.app:app  
according to: [How to Setup a Mail Server for Delta Chat - Delta Chat](https://delta.chat/en/serverguide), then I get:  
7ff298d1c796 mailadm-mailcow “gunicorn -b :3691 -…” 2 seconds ago Exited (1) 1 second ago mailadm

I understand that in both cases the container is in not-started status.

I have tried to start the container in interactive mode like this:  
root@chat:/opt/mailadm# docker run -ti -p 3691:3691 --mount type=bind,source=$PWD/docker-data,target=/mailadm/docker-data --name mailadm mailadm-mailcow  
/mailadm # gunicorn -b :3691 -w 1 mailadm.app:app  
[2024-03-26 18:40:59 +0000] [6] [INFO] Starting gunicorn 21.2.0  
[2024-03-26 18:41:00 +0000] [6] [INFO] Listening at: [http://0.0.0.0:3691](http://0.0.0.0:3691) (6)  
[2024-03-26 18:41:00 +0000] [6] [INFO] Using worker: sync  
[2024-03-26 18:41:00 +0000] [12] [INFO] Booting worker with pid: 12  
To complete the mailadm setup, please run: mailadm setup-bot  
/mailadm #

But it exits, too.

Would you advice me what to do in this case?  
Thank you for your support,

Carlos

---

<div class="post-metadata">

**Author:** ![missytake](https://forum.delta.chat/user_avatar/forum.delta.chat/missytake/32/591_2.png) [@missytake](https://forum.delta.chat/u/missytake)\
**Post date:** [March 26, 2024, 7:37pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/2 "2024-03-26T19:37:12Z")

</div>

You need to run `scripts/mailadm.sh setup-bot` beforehand, to setup the admin group. Right now, the container exits because the admin group doesn’t exist yet.

---

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 27, 2024, 6:58am UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/3 "2024-03-27T06:58:25Z")

</div>

Thank you for your quick reply, [missytake]

I believe I have run before scripts/mailadm.sh setup-bot, as I have a container for it like this:  
d88df7c978c4 mailadm-mailcow “mailadm setup-bot” 3 hours ago Up 3 hours cranky\_visvesvaraya

The mailadm@ has been created, too. I checked it in Mailcow backend. From DeltaChat app, I have joined the admin group using the generated QR code. As a matter of fact, I sent a message from DeltaChat like: /help, but didn’t get an answer as per explanation in the documentation.

I don’t what I am missing here. Why gunicorn can’t see the bot?  
🤔

---

<div class="post-metadata">

**Author:** ![missytake](https://forum.delta.chat/user_avatar/forum.delta.chat/missytake/32/591_2.png) [@missytake](https://forum.delta.chat/u/missytake)\
**Post date:** [March 27, 2024, 1:03pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/4 "2024-03-27T13:03:15Z")

</div>

did setup-bot show you a QR code? did you scan it? it should only run once and have CLI output. If it’s still up, but in the background, you should run `docker logs cranky_visvesvaraya`, look for the QR code, and scan it with Delta Chat. After the bot has added you to the admin group, the container should stop. Then you can start the gunicorn container.

---

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 28, 2024, 3:34pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/6 "2024-03-28T15:34:03Z")

</div>

Thank you, it works! My gunicorn is running!! 👌

The only thing missing now is that redirection to mailadm.my-domain/new\_email is not working, but if I make:  
$ curl -X POST ‘[http://localhost:3691?t=1d\_r84EW3N8hEKk&n=oneday’](http://localhost:3691?t=1d_r84EW3N8hEKk&n=oneday%E2%80%99)  
then I get the right response and it creates a new account.

My server\_name.active looks like:  
server\_name chat.my-domain mailadm.my-domain autodiscover.\* autoconfig.\* ;

and my site.mailadm.custom looks like:  
location /new\_email {  
proxy\_pass [http://my-server-ip:3691/](http://my-server-ip:3691/);  
}

I can’t find out why it is not forwarding the request:  
curl -X POST ‘[https://mailadm.my-domain/new\_email?t=1d\_r84EW3N8hEKk&n=oneday’](https://mailadm.my-domain/new_email?t=1d_r84EW3N8hEKk&n=oneday%E2%80%99)

Thank you,

Carlos

---

<div class="post-metadata">

**Author:** ![CarlosEVC63](https://forum.delta.chat/user_avatar/forum.delta.chat/carlosevc63/32/2092_2.png) [@CarlosEVC63](https://forum.delta.chat/u/CarlosEVC63)\
**Post date:** [March 29, 2024, 9:34am UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/7 "2024-03-29T09:34:33Z")

</div>

I managed to solve this issue!

The problem was that gunicorn was running on a different network from the one Mailcow is running. You need to include --net=mailcowdockerized\_mailcow-network into the running command specified by the documentation:  
sudo docker run -d -p 3691:3691 --mount type=bind,source=$PWD/docker-data,target=/mailadm/docker-data --name mailadm mailadm-mailcow gunicorn -b :3691 -w 1 mailadm.app:app

Then it should look like this:  
sudo docker run -d -p 3691:3691 --mount type=bind,source=$PWD/docker-data,target=/mailadm/docker-data --net=mailcowdockerized\_mailcow-network --name mailadm mailadm-mailcow gunicorn -b :3691 -w 1 mailadm.app:app

mailcowdockerized\_mailcow-network is the name of the network configured by Mailcow at the time of this writing.

And remember that data/conf/nginx/server\_name.active should be modified like this:  
server\_name my-mail-server-domain mailadm.my-mail-domain autodiscover.\* autoconfig.\* ;

And data/conf/nginx/site.mailadm.custom should be modified like this:  
location /new\_email {  
proxy\_pass [http://mailadm:3691/](http://mailadm:3691/);  
}  
mailadm is the DNS name on which gunicorn is hanging as a docker container. The DNS service within docker will translate it to its internal ip address.

This 2 files have to be copied into the Mailcow nginx container :  
docker cp data/conf/nginx/site.mailadm.custom mailcowdockerized-nginx-mailcow-1:/etc/nginx/conf.d  
docker cp data/conf/nginx/server\_name.active mailcowdockerized-nginx-mailcow-1:/etc/nginx/conf.d  
Then you need to reload the nginx server at Mailcow:  
docker exec mailcowdockerized-nginx-mailcow-1 nginx -s reload

Hopefully this can be helpful for other guys at installing mailadm service 🙂

---

<div class="post-metadata">

**Author:** ![missytake](https://forum.delta.chat/user_avatar/forum.delta.chat/missytake/32/591_2.png) [@missytake](https://forum.delta.chat/u/missytake)\
**Post date:** [March 30, 2024, 8:59pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/8 "2024-03-30T20:59:22Z")

</div>

great that it works now 🙂

not sure if I understand correctly what you had to do differently to fix it - could you open a pull request to [deltachat-pages/en/serverguide.md at master · deltachat/deltachat-pages · GitHub](https://github.com/deltachat/deltachat-pages/blob/master/en/serverguide.md) describing the difference?

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [October 6, 2026, 3:14pm UTC](https://forum.delta.chat/t/web-app-not-working-in-mailadm/2997/9 "2026-10-06T15:14:49Z")

</div>


