# Docker onlyoffice/mailserver stucks in an infinite restart loop

**URL:** https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023
**Category:** Workspace
**Tags:** solved, mail-server
**Created:** [28 August 2025 16:14 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023 "2025-08-28T16:14:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![derkontakt](https://community.onlyoffice.com/letter_avatar_proxy/v4/letter/d/85f322/32.png) [@derkontakt](https://community.onlyoffice.com/u/derkontakt)
#### Post date: [28 August 2025 16:14 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023/1 "2025-08-28T16:14:04Z")

</div>

I would like to bump a topic originated from [here](https://dev-old.onlyoffice.org/viewtopic.php?t=24313) - unfortunately topic was abandoned there (I’ve read it via search engines cache).

I did everything using [this guide](https://helpcenter.onlyoffice.com/workspace/installation/workspace-install-docker-integrated.aspx) - my OS is Windows 10 and Docker’s setup executable file was downloaded just today.

And - as I didn’t need MailServer - for a first try I’ve just ignored the Step 4 (installing ONLYOFFICE Mail). All docker images are latest, except MySQL (I’ve pulled 8.0.29 as described) and all 4 containers runs just fine (documentserver, communityserver, controlpanel and mysql:8.0.29).  
Unfortunately OnlyOffice keeps writing to log:

```auto
[FAILED] Failed to start ONLYOFFICE MailWatchdog Service.
See 'systemctl status onlyofficeMailWatchdog.service' for details.

```

and I couldn’t remove mail services from OnlyOffice to boot successfully (for this issue I will raise new separate Topic).

“Okay” I thought - I don’t need mailserver, but if OnlyOffice doesn’t work without it, I should only container it up and forget about it, letling 'em just working somewhere in the docker’s conatainers list.  
But as title of this post says: ‘onlyoffice/mailserver’ container keeps restarting.  
I tried run different docker images - latest, an old one, a one not so old…

`docker run --init --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 -e MYSQL_SERVER=onlyoffice-mysql-server -e MYSQL_SERVER_PORT=3306 -e MYSQL_ROOT_USER=root -e MYSQL_ROOT_PASSWD=onlyoffice -e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver -v c:\root\onlyoffice\mail\data:/var/vmail -v c:\root\onlyoffice\mail\tls:/etc/pki/tls/mailserver -v c:\root\onlyoffice\mail\logs:/var/log -h localhost onlyoffice/mailserver`

So here I would like finish my description with the words from the topic mentioned above:

Whenever I install the mail server on docker it seems to be stuck in an infinite restart loop. The ports nevever get published with docker and and ip address is not assigned to the container, there are **no logs being generated** and I cannot even get a terminal running in the container, its says its restarting and that I should wait (but never finishes restarting).

–  
Thank you for attention and patience  
Luka

---

<div class="post-metadata">

### Author: ![derkontakt](https://community.onlyoffice.com/letter_avatar_proxy/v4/letter/d/85f322/32.png) [@derkontakt](https://community.onlyoffice.com/u/derkontakt)
#### Post date: [29 August 2025 06:38 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023/2 "2025-08-29T06:38:52Z")

</div>

Solved

Created file and added following to .wslconfig in _%userprofile%/.wslconfig_

```auto
[wsl2]
kernelCommandLine = vsyscall=emulate

```

---

<div class="post-metadata">

### Author: ![Nikolas](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/nikolas/32/2509_2.png) [@Nikolas](https://community.onlyoffice.com/u/Nikolas)
#### Post date: [29 August 2025 11:57 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023/3 "2025-08-29T11:57:09Z")

</div>

Hey @derkontakt, 👋

Awesome, glad to see you sorted out the issue with the ONLYOFFICE MailServer restart loop! Thanks for sharing the detailed description and the solution with the `.wslconfig` fix — it’s super helpful for others who might run into this.

Can we go ahead and mark this topic as resolved?

---

<div class="post-metadata">

### Author: ![derkontakt](https://community.onlyoffice.com/letter_avatar_proxy/v4/letter/d/85f322/32.png) [@derkontakt](https://community.onlyoffice.com/u/derkontakt)
#### Post date: [29 August 2025 12:29 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023/4 "2025-08-29T12:29:32Z")

</div>

Hi @Nikolas ,

yes, please mark "resolved.

Thank you

---

<div class="post-metadata">

### Author: ![Constantine](https://community.onlyoffice.com/user_avatar/community.onlyoffice.com/constantine/32/1469_2.png) [@Constantine](https://community.onlyoffice.com/u/Constantine)
#### Post date: [5 September 2025 09:15 UTC](https://community.onlyoffice.com/t/docker-onlyoffice-mailserver-stucks-in-an-infinite-restart-loop/16023/5 "2025-09-05T09:15:16Z")

</div>


