Do you want to install ejabberd on your Windows 10 machine? Do you miss the binary installers for Windows? Don’t worry, you can install ejabberd on Windows 10 using Docker Desktop, and this tutorial guides you through the process.
This tutorial requires Windows 10 or newer. For older systems like Windows 7 or 8, follow the tutorial on how to install ejabberd on Windows 7 using Docker Toolbox.
For some time now we have been phasing out the traditional installation wizards, customary to the end users on macOS and Windows, in favour of the more streamlined command line approach, well known on Linux desktops and servers.
First, we have phased out the macOS binary installer in favour of a quick
brew install ejabberd command. Then, since ejabberd 20.07, we have phased out the Windows installer in favour of a container solution. However, setting ejabberd in Docker requires setting volumes, ports and some customizations, so we’ve written a batch script that performs all those tasks for you.
This tutorial explains how to get any ejabberd version installed on Microsoft Windows 10 using Docker Desktop and ejabberd-docker-install.bat script.
Docker Desktop is only available for Windows 10. If you use Windows 7 or 8, you can use Docker Toolbox, which is old and obsolete, but it still seems to work correctly, so give it a try. We published a tutorial explaining how to install ejabberd on Windows 7 using Docker Toolbox.
1. Install Docker Desktop
First of all, download and install Docker Desktop for Windows. The process is pretty straightforward, and it will ask you to restart your machine.
The installation wizard may ask you to install Microsoft’s WSL2 and restart the Docker Desktop app.
2. Download ejabberd-docker-install.bat
Download ejabberd-docker-install.bat to your machine.
3. Edit the install options
Edit this batch file with your favourite text editor and set, at the very least, the
PASSWORD option you want for your new ejabberd administrator account.
Additionally, you can set some other options:
4. Run the script
When you run the script, it will open a console window to inform you about the process: download the ejabberd image, create the container, register the admin account and prepare the configuration file…
If installation completes correctly, you can close that window and proceed to next step.
If there was any error, solve it and run the script again. You can delete the script and download it again, or delete the ejabberd container, or delete the ejabberd installed directory… and run the script again.
5. Start ejabberd
Now you can finally go to Docker Desktop, where you can see the new
ejabberd container, and click the “Start” icon:
Wait a few seconds till ejabberd is started in that container and accepting connections:
At this point, you have ejabberd installed and running on your machine, and you may be asking yourself how to administrate it. Here are some remarks:
ejabberd.yml, database and logs
The configuration files, Mnesia internal database spool and logs directories are available for you to edit and inspect in Windows, in the path that you specified in the
There is also an ejabberd-modules directory, where you can later put additional modules from ejabberd-contrib, or any other place.
Whenever you update to a newer ejabberd, it is a good practice to backup the conf and database directories.
The “Open in browser” icon will open a browser with the ejabberd webadmin page.
Alternatively, you can open it yourself by going to
localhost for the value of the
HOST variable, if you changed it in the installation script).
You will be welcomed by a browser authentication prompt, where you should type in the login details defined in the installation script:
PASSWORD. You will then see the usual ejabberd webadmin console, where you can easily manage your server instance.
CLI with ejabberdctl
The next icon opens a console in the ejabberd container where you can use ejabberdctl, and that means you can use any ejabberd Administration API.
To start with all this, open the CLI as explained previously, and execute:
For the next steps, check this ejabberd-contrib documentation.
Update from old binary installer
If you already have ejabberd installed using a binary installer downloaded from ProcessOne website:
- Stop ejabberd using the “Stop ejabberd” desktop shortcut as usual
- It is always a good practice to backup the conf and database directories
- Uninstall ejabberd
- Follow the steps described in this tutorial
- Check that ejabberd runs perfectly with the basic configuration and empty database
Now it’s time to get back your configuration and database:
- Stop ejabberd in the Docker Desktop
- Copy your old conf and database directories to the new location
- Start ejabberd and check if it runs correctly
Update to a new ejabberd version
When a new ejabberd version is released, go to ejabberd Docker Hub, and check if the new version is available in Tags.
How to install it?
- Delete your old
- Edit the
VERSIONoption in ejabberd-docker-install.bat
- Run the script
It will download the new image and create a new container.
If something goes terribly wrong
As mentioned previously, if something goes terribly wrong, don’t worry! You can delete the script, or the installed directory, or the ejabberd container, and start from scratch.
Docker Desktop in macOS and Linux
Docker Desktop is also available for the macOS and Linux systems. While the above installation script is designed for Windows, it could be modified for these other platforms as well. This means you now have several methods of installing and running ejabberd on any given operating system: using a package manager (like
apt on Debian or
brew on macOS), using a Docker container, with a binary installer (on Linux) or building from source.
Questions, problems, suggestions
The batch script to use Docker and this tutorial may have problems or incorrections. So, please add a comment here, or join the ejabberd chatroom, or send an email to the ejabberd mailing list or fill a bug/suggestion in the ejabberd tracker or docker-ejabberd trackers.
Photo by Frank Mckenna on Unsplash