October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Install ejabberd XMPP Chat Server on a Linux VPS

A practical ejabberd VPS guide covering installation choices, Ubuntu and Debian paths, YAML configuration, TLS certificates, ports 5222 and 5269, administrator creation, verification, and troubleshooting.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most straightforward VPS deployment is ejabberd’s self-contained Linux RUN installer: it includes the Erlang runtime, installs under /opt when executed as root, creates a systemd unit, and starts the server automatically. After installation, point a DNS name at the VPS, set that name in ejabberd.yml, install readable TLS certificate files, open only the listeners you use (normally TCP 5222 and 5269), create a user with ejabberdctl, and verify both the service and a real client login.

This guide covers Ubuntu and Debian VPSs first, then explains package, container, and source-build alternatives, configuration, firewalling, administration, and recovery when the node will not start.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before installing

Prepare these items before changing the VPS:

  • A supported Linux distribution with root or sudo access.
  • An SSH session that you will keep available while editing firewall rules.
  • A DNS name for XMPP, such as chat.example.com, with an A or AAAA record pointing to the VPS address.
  • A decision about the XMPP service names you will publish. The name in client JIDs must match the configured ejabberd host.
  • A plan for TLS certificates and private-key permissions.
  • A backup destination for configuration and Mnesia data before making upgrades or major changes.

Update the operating system first. On Ubuntu or Debian, a normal starting point is:

sudo apt update
sudo apt upgrade

Do not close your working SSH session while testing a new firewall policy. DNS, firewall, and certificate mistakes are easier to diagnose when you still have console access.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Choose an installation method

The official installation documentation describes four self-hosted families—Linux RUN installers, DEB/RPM packages, operating-system packages, containers, and source builds—and also identifies Fluux.io as a managed cloud alternative. For one Linux VPS, the self-contained RUN installer usually has the smallest dependency burden because Erlang is included.

Method Best fit Important trade-off Typical layout or operational concern
Linux RUN installer A single VPS where predictable dependencies and systemd integration matter Upgrades follow the ejabberd installer release rather than the distribution lifecycle Root installation uses a versioned directory under /opt; configuration, Mnesia data, and logs are kept under /opt/ejabberd
DEB/RPM package Administrators who want package-manager inventory and upgrade policy Package versions and Erlang dependencies depend on the repository Use the package’s service unit and paths; do not mix them casually with a RUN installation
Distribution package Debian or Ubuntu environments standardized on operating-system packages The packaged ejabberd version can lag the upstream release Debian documents /etc/ejabberd/ejabberd.yml and /var/log/ejabberd
Container Teams already operating container images, volumes, and orchestration You must manage persistent data, configuration mounts, image updates, and published ports Persist the configuration, Mnesia data, and logs; expose only the listeners required by the configuration
Source build Engineers needing a controlled build or development changes Highest maintenance burden for Erlang/OTP, compilation, packaging, and upgrades You must create and maintain the service integration, filesystem layout, and update process
Managed hosting Operators who do not want to maintain a VPS Less control over host-level networking, filesystem location, and upgrade timing The official installation page names Fluux.io as a cloud option; review its current terms directly

The rest of this article uses the Linux RUN installer on an Ubuntu or Debian-style VPS. Package users should apply the same DNS, YAML, TLS, firewall, account, and verification principles while using their package’s paths and service unit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install ejabberd with the self-contained Linux RUN installer

Download the correct build

Use the official ejabberd release channel and select the installer matching the VPS architecture. Keep the downloaded file in your home directory, then rename it to a simple local name so the commands do not depend on a version string:

mv downloaded-installer-file ejabberd-linux.run
chmod +x ejabberd-linux.run

The filename in the first command is the name shown by your download; the second command must be run in the directory containing the renamed file.

Run the installer as root

sudo ./ejabberd-linux.run

A root installation places the executable tree in a versioned directory beneath /opt, stores the active configuration, Mnesia database, and logs under /opt/ejabberd, creates a systemd service unit, and starts ejabberd. Because the installer includes a stripped-down Erlang runtime, you do not need to install Erlang separately for this installation path.

Check the initial service state

sudo systemctl status ejabberd

Look for a started or active service. If systemd reports failure, do not repeatedly restart it before checking the configuration and logs; a YAML error can make every restart fail in the same way.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install from Debian or another package source instead

If your VPS policy requires distribution packages, use the package manager and then follow the package’s documented service and configuration paths. On Debian, the main configuration file is /etc/ejabberd/ejabberd.yml and logs are under /var/log/ejabberd. A typical Debian package command is:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
sudo apt update
sudo apt install ejabberd

Confirm the package version and paths with your distribution documentation. Do not copy the RUN installer’s /opt paths into a package installation, and do not run two independent ejabberd installations on the same host. Use the service unit supplied by the package:

sudo systemctl status ejabberd

Container deployments follow the same application sequence but move service management to the container runtime. Mount ejabberd.yml, the certificate directory, and persistent Mnesia storage; publish only the configured XMPP ports; and ensure the container process can read its private key. Source builds require an Erlang/OTP toolchain and a separately maintained systemd integration, so they are best reserved for teams that need build-level control.

Set the XMPP domain in ejabberd.yml

Clients address an account as a full JID such as [email protected]. The host portion must appear in the hosts option. Edit the configuration belonging to your installation and use the example configuration shipped with that version as the structural reference:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
hosts:
  - 'chat.example.com'

Replace the example name with the DNS name you actually intend clients to use. If you publish more than one XMPP domain, list each one according to the syntax in your generated configuration.

Respect YAML exactly

YAML is indentation-sensitive. Tabs, misplaced list markers, unknown option names, and invalid values can prevent ejabberd from loading. Keep indentation consistent, preserve the option names from the installed example, and make one logical change at a time. A reload is atomic: if ejabberd rejects the new file, the running configuration remains in effect rather than being partially applied.

After editing, test the service before changing another section:

sudo systemctl reload ejabberd
sudo systemctl status ejabberd

If reload fails, inspect the service log and correct the reported line. If your installation does not support a working reload, restart only after confirming that the file parses:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
sudo systemctl restart ejabberd

Use the generated listener and module configuration

Do not build a minimal configuration from memory. Keep the listener and module blocks supplied by the installed example, then change only the values required for your domain, certificates, authentication policy, and enabled services. This avoids omitting a dependency that the selected ejabberd version expects.

Install certificates and enable TLS

Obtain a certificate whose names cover the DNS name clients use and its relevant XMPP service names. Copy the certificate chain and private key to a protected directory, then reference them using the certificate options in the installed ejabberd.yml example. The exact option set varies by release, so preserve the generated structure rather than inventing new keys.

  • Make the certificate chain readable by the ejabberd service account.
  • Restrict the private key to the service account and administrators.
  • Ensure the certificate hostname matches the name in the client’s JID and connection settings.
  • Keep intermediate certificates in the chain as required by your certificate authority.
  • Do not expose the private key through a world-readable web or backup directory.

At startup or reload, ejabberd reads the configured certificate files, matches private keys, removes duplicate material, and rebuilds certificate chains for TLS connections. Therefore a successful file copy is not enough: reload or restart after every certificate renewal.

sudo systemctl reload ejabberd
sudo systemctl status ejabberd

If clients report an unknown issuer, hostname mismatch, or handshake failure, check the served chain, the certificate names, file permissions, and the exact path in ejabberd.yml before changing cipher or authentication settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open only the network ports you use

Confirm the active listener definitions before editing the VPS firewall. A common XMPP deployment uses:

Port Protocol Purpose Exposure guidance
5222 TCP Client-to-server XMPP connections Open to the client networks that must connect
5269 TCP Server-to-server XMPP federation Open when federation is required; otherwise leave closed

These are reference ports, not a substitute for checking your configuration. If you changed listeners, open the ports actually bound by ejabberd. On a VPS using UFW, the corresponding rules would be:

sudo ufw allow 5222/tcp
sudo ufw allow 5269/tcp
sudo ufw status

Apply equivalent rules in your provider’s security group or cloud firewall. Keep Erlang distribution and epmd access restricted to localhost or trusted cluster peers. Administrative and clustering ports should not be exposed broadly to the internet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Create the first account and grant administrator rights

Register a user

Use the ejabberdctl script installed with the RUN package, container, or distribution package. Register the account on the configured XMPP host:

sudo ejabberdctl register alice chat.example.com a-long-unique-password

The command takes a local username, the XMPP host, and a password. Passwords placed directly on a shell command line can remain in shell history or process listings; use your organization’s safer password-handling practice and remove sensitive history if necessary.

Add the full JID to the administrator rule

Registering a user does not automatically make that user an administrator. Add the account’s full JID to the administrator ACL in ejabberd.yml, using the exact structure shown by your installed example. A common form is:

acl:
  admin:
    user:
      - '[email protected]'

access_rules:
  configure:
    admin: allow

Some releases or generated configurations express access rules differently. Keep the rule names and nesting used by your version, but ensure the full JID is the identity granted administrative access. Reload or restart after saving the file, then verify the service remains healthy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Control the node with systemd and ejabberdctl

Use systemd for the operating-system service:

sudo systemctl start ejabberd
sudo systemctl stop ejabberd
sudo systemctl restart ejabberd
sudo systemctl status ejabberd

The bundled control script provides node-level commands independent of the systemd wrapper:

sudo ejabberdctl start
sudo ejabberdctl status
sudo ejabberdctl stop

Use one control method consistently during troubleshooting so you know whether a failure occurs in systemd, the wrapper script, or ejabberd itself. The ejabberdctl script must run with access to the installation’s configuration, runtime, and data directories.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify the installation from the outside in

1. Confirm the process and node

sudo systemctl status ejabberd
sudo ejabberdctl status

The node should report that it is started. A green systemd state without a usable node warrants checking the control-script output and logs.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

2. Confirm DNS

Resolve the XMPP name from a client network and from the VPS. Both the address and the record type must point to the intended machine. If you use IPv6, verify that the AAAA record reaches a listener that is actually bound on IPv6.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Test a real client login

Configure an XMPP client with the full JID, password, and the server name covered by the certificate. A successful login exercises DNS, TCP 5222, TLS, authentication, and the hosts setting together.

4. Test a second account and messaging

Register a second user, sign in from a separate client or device, and exchange messages. This confirms that account creation and ordinary session routing work rather than merely proving that the daemon started.

5. Test federation only if enabled

If you opened TCP 5269 and intend to federate, verify that the remote server can resolve your domain and complete TLS with the certificate and listener you configured. Do not open 5269 solely because it is a conventional XMPP port.

Troubleshoot common failures

The service will not start after an edit

  1. Run sudo ejabberdctl live to display Erlang diagnostics in the foreground.
  2. Read the systemd status output and the installation’s log directory. Debian package users should inspect /var/log/ejabberd; RUN users should inspect the logs under /opt/ejabberd.
  3. Check YAML indentation, spelling, unknown options, and value types around the last change.
  4. Restore the previous known-good file if necessary, then reload to confirm that the node recovers.

Clients cannot resolve or connect

  • Confirm the DNS A or AAAA record and allow time for the intended TTL.
  • Check that the configured listener is bound to the public interface, not only localhost.
  • Confirm the VPS provider firewall and the host firewall both allow the required TCP port.
  • Verify that the client is using the same hostname covered by the certificate and listed in hosts.

TLS fails while the service is running

  • Check that the certificate chain and private key match.
  • Check service-account read permissions without making the key world-readable.
  • Reload or restart after renewal so ejabberd rebuilds its certificate chain.
  • Check hostname coverage and intermediate certificates before changing client security settings.

Account registration fails

  • Confirm that the host argument exactly matches an entry in hosts.
  • Run the command against the installation’s own ejabberdctl, not a different version left on the PATH.
  • Inspect the live diagnostics and logs for authentication or database errors.

Administration rights do not work

Check that the ACL contains the full JID, that the access rule points to the same ACL name, and that you reloaded or restarted after editing. A username without its @host portion does not identify the same account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan upgrades, backups, and ongoing maintenance

Back up the active YAML configuration, TLS material according to your security policy, and the Mnesia data directory before upgrades. Keep backups off the VPS and test that they can be restored. Record which installation family you used; package paths and service behavior differ from the RUN layout.

For each upgrade, read the release notes, stage the new version where possible, preserve the current configuration, stop or restart through the supported service mechanism, and verify the node, TLS login, account authentication, and message exchange afterward. Avoid replacing a working package installation with a RUN installer merely to obtain a newer version unless you have planned the data and service migration.

Final deployment checklist

  • The VPS is updated and you retain an SSH or console path.
  • DNS points the intended XMPP name to the VPS.
  • The chosen installer or package is the only active ejabberd installation.
  • hosts contains the client-facing XMPP domain with valid YAML indentation.
  • Certificate and key files are referenced correctly and readable by ejabberd.
  • Only required listener ports—normally 5222 and, when needed, 5269—are open.
  • Erlang distribution and epmd are limited to localhost or trusted peers.
  • The first account is registered and its full JID is in the administrator ACL.
  • systemctl status ejabberd and ejabberdctl status show a started node.
  • A real client can log in, a second account can be created, and messages can be exchanged.
  • Configuration, certificates, and Mnesia data are included in a tested backup plan.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.