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 favor of the more streamlined command line approach, well known on Linux desktops and servers.
First, we have phased out the macOS binary installer in favor of a quick brew install ejabberd command. Then, since ejabberd 20.07, we have phased out the Windows installer in favor 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.
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.
Edit this batch file with your favorite 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: INSTALL_DIR_WINDOWS10 , HOST , USER , VERSION , and PORTS .
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.
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:
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 INSTALL_DIR_WINDOWS10 option.
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 http://localhost:5180 (swap 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: USER@HOST and PASSWORD . You will then see the usual ejabberd webadmin console, where you can easily manage your server instance.
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.
In addition to the modules already included in ejabberd releases, there are several more published in ejabberd-contrib, and many other on the internet, and you can even write your own modules.
To start with all this, open the CLI as explained previously, and execute:
bin/ejabberdctl modules_update_specs
If you already have ejabberd installed using a binary installer downloaded from ProcessOne website:
Now it’s time to get back your configuration and database:
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?
It will download the new image and create a new container.
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 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.
The batch script to use Docker and this tutorial may have problems or errors. 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.
hi team,
I have installed ejabbeerd server as per the document and checked the status of node in ejabberdctl tool,it was started good.
but i was not able to open the web ui . what should i do to open in web page, as well what is the next step i have to proceed with to connect to the client
You are right, the problem is that the batch program fails running sed. When installing, error messages say “sed: can’t create temp file”. Then the WebAdmin port and path are not correctly configured, and they don’t work as this tutorial explains. A simple solution would be you to update the ejabberd.yml configuration file manually… But I propose you to try the new container image with an updated batch script. I tried it with Windows 10 and all worked correctly. If it works for you too, I’ll write a new tutorial for it. Steps:
0. Before starting, remove the old container in Docker Desktop, and the C:/ejabberd path, as those are not needed and will be regenerated.
1. Download the new script from https://raw.githubusercontent.com/processone/ejabberd/master/.github/container/ejabberd-container-install.bat
2. Everything else is similar to this tutorial. The only change: instead of bin/ejabberdctl, use ejabberdctl
Hi ,
Ejabberd server configured successfully . i make connection to PostgreSQL with ejabberd server but could not connect the db. how to i connect the PostgreSQL db. with my ejabberd server application
It is impossible to know what problem you are having.
You should fill a question with details (program versions, configuration, logs, details) in
https://serverfault.com/
or
https://github.com/processone/ejabberd/issues
1. How can i connect PostgreSQL database instead of mnesia database with ejabberd server?
2.How to backup and view the mnesia database?