💬 Setup ejabberd — Rock-Solid Self-Hosted XMPP Server
Deploy ejabberd on Ubuntu with Docker — a massively scalable, battle-tested XMPP server for your own private, federated instant messaging network, with a web admin on port 5281.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/communication/ejabberd/ejabberd-ubuntu.sh
chmod +x ejabberd-ubuntu.sh
sudo bash ejabberd-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/communication/ejabberd/ejabberd-ubuntu.sh
2 Make it Executable
chmod +x ejabberd-ubuntu.sh
3 Run the Installer
The script installs Docker if needed and starts ejabberd with the XMPP client port 5222, server-to-server federation on 5269, and the web admin on 5281, storing its database and logs in mounted volumes. It also registers an admin account and prints the password.
sudo bash ejabberd-ubuntu.sh
4 Open the Web Admin
Open the ejabberd web admin and log in as admin@your-server-ip with the generated password to manage users and settings:
http://<your-server-ip>:5281/admin
Ports Used
| Port | Purpose |
|---|---|
| 5222 | XMPP client connections (c2s) |
| 5269 | Server-to-server federation (open only if you want to federate) |
| 5281 | Web admin (host → container 5280) — user admin@your-server-ip |
| 5444 | HTTPS / BOSH (host → container 5443) |