Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk11 min

How to Install ejabberd XMPP Chat Server on a Linux VPS (Ubuntu and Debian)

Install ejabberd on an Ubuntu or Debian VPS with the self-contained Linux installer or distribution packages. Configure the XMPP domain, TLS, firewall ports, first administrator account, service checks and recovery steps.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most predictable way to run ejabberd on one Ubuntu or Debian VPS is the official self-contained Linux RUN installer: it includes the Erlang runtime, creates a systemd service, and starts the server automatically. You then set the XMPP domain in ejabberd.yml, install a certificate that matches that domain, allow only the listeners you use, create an account with ejabberdctl, and verify a real client login. Distribution packages, containers, and source builds are valid alternatives when their filesystem layout and maintenance model fit your environment.

What you need before installing

Prepare these items before changing the server:

  • A supported Linux distribution, sudo or root access, and an SSH session that you can keep open while changing firewall rules.
  • A DNS name for XMPP, such as chat.example.com, pointing to the VPS address. Use the same name in ejabberd’s hosts setting and in the certificate.
  • A decision about whether the server will accept only client connections or also server-to-server federation. The usual TCP ports are 5222 for client-to-server (C2S) and 5269 for server-to-server (S2S), but your actual listeners are authoritative.
  • A plan for certificates, backups, upgrades, and who will administer the node.

Update the operating system first. Do not close your working SSH session until you have confirmed that the new firewall rules still permit SSH.

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.

Choose an installation method

The ejabberd documentation groups self-hosted installations into Linux RUN installers, DEB/RPM packages, operating-system packages, containers, and source builds. Pick one method and keep its paths and service commands consistent; mixing files from different methods makes upgrades and troubleshooting harder.

Method Dependency isolation Typical control and layout Best fit
Official Linux RUN High: the installer contains a stripped-down Erlang runtime, so Erlang does not need to be installed separately. Root installs use an /opt/ejabberd-XX.YY/ program directory and place configuration, Mnesia data, and logs under /opt/ejabberd/; a systemd unit is created. A single VPS where you want the vendor’s tested runtime and a quick, self-contained deployment.
DEB/RPM or distribution package Managed by the operating system; package dependencies and versions follow the repository. On Debian, the main file is commonly /etc/ejabberd/ejabberd.yml and logs are under /var/log/ejabberd. Service and file locations can differ on other distributions. Hosts managed with normal OS patching, repository policy, and standard package auditing.
Container Isolated in an image, but persistent configuration, Mnesia data, certificates, networking, and upgrades become container-operator responsibilities. Use the image’s documented entrypoint and mount persistent storage; do not assume host paths from a package installation. Existing container platforms with monitoring, backup, and secret-management workflows.
Source build Lowest isolation; you own the Erlang/toolchain compatibility and build process. Layout, service unit, and upgrade procedure are yours to define. Development, patches, or environments that require a controlled build.

For a first deployment on one VPS, the RUN installer normally minimizes dependency work. A managed XMPP service is another operational model, but it is not an installation on your VPS and provides less control over local files, networking, and backup timing.

#1 Best Overall
Forvencer Server Book, 2 Zipper Pocket, Server Books for Waitress
  • Upgraded Two Zipper Pockets: Forvencer server books feature two secure zipper pockets for better organization of coins, cash, and receipts, ensuring that everything you collect has a safe and secure place
  • Smart Storage & Quick Access: Designed with 8 multi-functional compartments, the right side includes a guest receipt pad, while the left has a money pocket, ticket pocket, and credit card slot. Two small clear pockets store bills, receipts, and other visible items. A stitched pen loop ensures you always have your favorite pen ready
  • High-quality & Easy to Clean: Crafted from high-quality PU leather with heavy-duty stitching, this server book is built to last. It resists tears, scratches, and its waterproof surface makes cleaning easy with just a damp cloth or a non-chlorine sanitizer
  • Perfect Fit for Your Apron: Measuring 5” x 8”, this compact organizer is slightly smaller than other models, making it ideal for bending or sitting while carrying in your server apron. It holds everything a waitress needs—a place for everything
  • What's Included: This server organizer comes with multiple open and zippered pockets to store money, receipts, tips, etc. Clear sleeves are perfect for keeping menus or special lists while serving. Available in a variety of colors, allowing you to express yourself even when in uniform

Install the official Linux RUN package

1. Obtain the correct installer

Download the Linux RUN file matching the VPS architecture from the official ejabberd release channel. Keep the downloaded file in a temporary directory and verify its publisher-provided integrity information when available. The exact filename changes with each release, so use the name you actually downloaded rather than copying an old version into a command.

2. Make it executable and run it as root

Rename the downloaded file to a simple local name if that makes the commands unambiguous, then run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
chmod +x ./ejabberd-installer.run
sudo ./ejabberd-installer.run

A root installation places the executable release in an /opt/ejabberd-XX.YY/ directory, keeps the active configuration, Mnesia database, and logs under /opt/ejabberd/, creates a systemd unit, and starts ejabberd. The bundled runtime is sufficient; installing a separate Erlang package is not required for this installation path.

3. Confirm the service before editing configuration

sudo systemctl status ejabberd --no-pager
sudo ejabberdctl status

The first command should show an active service and the second should report a started node. If the installer did not place ejabberdctl on the shell path, invoke the script from the installation’s bin directory or use the path printed by the installer.

Install with Debian or Ubuntu packages

Use this path when your VPS is managed as a normal Debian-family host and you want package upgrades and dependency tracking handled by APT. Repository availability and the ejabberd version depend on the distribution release and enabled repositories.

sudo apt update
sudo apt install ejabberd
sudo systemctl status ejabberd --no-pager

Debian’s manual identifies /etc/ejabberd/ejabberd.yml as the principal configuration file and /var/log/ejabberd as the log directory. Confirm the paths on your release with the package contents and systemd unit instead of assuming that a RUN installation’s /opt layout applies. A package may start the service during installation; if it is stopped, use the unit supplied by the package:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
LINTRU 5x8 Server Book, 7 Pocket Zipper Organizer, Fits Apron, Black
  • Built for Heavy-Duty Shifts — Unlike Vinyl, PU Leather Won't Crack: This server books for waitress for Reinforced odorless PU leather with double-stitched seams resists tears and scratches far better than vinyl, which cracks and peels over time. The textured surface adds grip and an anti-slip effect on counters and tabletops for steadier writing. The thickened rigid writing surface stays perfectly flat for comfortable order-taking in high-traffic dining rooms and busy bars. This waitress book design works for both left- and right-handed users — built to withstand fast-paced service without warping.
  • Wipes Clean in Seconds — Water-Resistant Surface, Hand Wipe Only: This black server book spill-resistant surface wipes clean with a damp cloth between tables — coffee spills and food grease come right off. Avoid alcohol-based sanitizers; for stubborn oil stains, wipe with mild soapy water, let sit 2 minutes, then wipe. This waitress book is not machine washable — hand wipe only to preserve the PU leather finish. Maintains a sharp, professional look shift after shift.
  • 7 Compartments Keep Cash, Cards & Tips Organized: This serving book Secure zipper pocket (1,000+ open/close cycles) is designed for coins and small bills (For maximum security, keep coin pocket moderately filled) — use the main compartment for unfolded bills up to 6.75 inches. Clear receipt windows are made from thickened, scratch-resistant PVC for lasting clarity and durability. The waitress books for servers Clear card slots that hold multiple cards and an elastic pen loop keep everything visible and accessible. Fits standard 3.5" x 6.75" guest checks without folding, so cash, cards, and order slips stay organized during rush hours.
  • Slim Apron Fit — Elastic Pen Loop Fits Standard & Jumbo Pens: This server book Compact 5" x 8" slim profile slips into any apron pocket and sits flush against your waist for unrestricted movement — whether bending, sitting, or rushing through a busy dining room. The elastic pen loop stretches to fit both standard pens and jumbo markers, so you always have your preferred writing tool ready. The waitress book Holds all shift essentials without adding weight or bulk.(Pen is not included and must be purchased separately)
  • Professional Server Gear for Waitstaff, Bartenders & Cashiers: Streamline orders, tips, and payments with a server book built for waitstaff, bartenders, cashiers, and fast-food crews — not just waitresses. This server books for waitress is Ideal for fine dining, busy cafes, high-volume bars, and fast-food counters. A practical gift for new staff or a reliable upgrade for seasoned teams who demand professional appearance and secure cash handling. This waitress book built for daily professional use with durable construction that holds up shift after shift.
sudo systemctl enable --now ejabberd

Configure the XMPP domain in ejabberd.yml

Open the configuration belonging to the installation method you selected. Do not create a minimal file from memory: start with the shipped example and change only the values you need. YAML is indentation-sensitive, option names are version-specific, and unknown options or invalid values can prevent startup. A rejected reload is atomic, so the currently running configuration remains in effect rather than being partially replaced.

Set the host name clients will use

Set hosts to the DNS name that will appear in user JIDs:

hosts:
  - 'chat.example.com'

Every account registered on this host will have a JID such as [email protected]. If you serve more than one XMPP domain, list each deliberately and ensure that certificates and DNS cover those names. A mismatch between the name entered by a client and the configured host is a common cause of failed registration or login.

Keep listeners aligned with the configuration

The shipped configuration defines the listener modules, bind addresses, access rules, and TLS behavior. Preserve those structures when enabling or disabling services. A typical deployment exposes C2S on TCP 5222 and, only when federation is required, S2S on TCP 5269. Do not open a port merely because it is conventional; inspect the active listen section and expose exactly those listeners.

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

Add an administrator rule

After creating the first account (the command is shown below), add its full JID to the administrator ACL using the syntax in your installed example. A common YAML form is:

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

access_rules:
  configure:
    admin: allow

Option names and rule structure can vary between ejabberd releases. If the generated file uses a different administrator rule, follow that file’s model rather than combining snippets from another release. Preserve spaces, indentation, and list markers exactly. Save the file, then reload or restart the service and check its status immediately.

Rank #3
Forvencer Server Book High Volume, Expandable Waitress Book with 2 Zipper
  • Upgraded Magnetic Closure Pocket and Two Zipper Pockets: Unlike other brands, Forvencer server books are designed with two secure zipper pockets and two expandable magnetic pockets. These allow you to easily store and organize a large number of coins, cash, and receipts.
  • Smart Storage & Quick Lookup: 10 multi-functional compartments. On the right side has a check pad, and on the other has a Money Pocket, Tickets Pocket and Credit Card Slot. Two small clear pockets can store bills, receipts and other items to be viewed. A stitched pen loop to store your favorite pen.
  • Long-Lasting and Easy to Clean: Serving book features high-quality PU leather and heavy-duty stitching. PU is extremely strong with high tensile strength and good resistance to tearing, abrasion and scratching. Waterproof leather makes it simple to wipe down your server book with warm water or non-chlorine sanitizer solution to remove any dirt, soil, grime, or soda residue to keep it clean.
  • Fit Perfectly in your Apron: Our 5" x 9" server book is designed to accommodate regular checks and fit easily in your apron pocket.
  • What You Get: Forvencer server book in strict quality control, our worry-free 1-Year warranty, and friendly customer service.

Install and configure TLS certificates

TLS protects client authentication and, when configured, server-to-server connections. Obtain a certificate whose subject or subject-alternative name matches the XMPP DNS name. Place the certificate and private key where the ejabberd service account can read them, while keeping the private key inaccessible to unrelated users.

Reference the certificate files using the certificate options already present in your ejabberd.yml. Depending on the release and packaging method, the configuration may use a certfiles list or a listener-specific certificate setting. Do not guess an option name: copy the form from the shipped configuration for that release. Ensure the chain file contains the required intermediate certificates and that the private key matches the certificate.

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.

At startup or reload, ejabberd reads the files, matches private keys, removes duplicate certificates, and rebuilds certificate chains for TLS connections. Consequently, renewing a file on disk does not change existing configuration until you reload or restart:

sudo systemctl reload ejabberd
sudo systemctl status ejabberd --no-pager

If the unit does not implement reload or the reload is rejected, restart after correcting the configuration:

sudo systemctl restart ejabberd

Check file ownership and permissions first when TLS fails. A certificate that is valid for a different name, an unreadable key, or a missing intermediate certificate will cause client warnings or prevent the listener from starting.

Open only the required network ports

Firewall rules must match the listeners you actually enabled:

Rank #4
Sale
Slohif Waitress Server Book, Cute Black Polka Dot Restaurant Organizer
  • Eye-Catching & Stylish Design: Designed with unique and fun patterns that add personality to your work essentials. The stylish server book helps you stand out from coworkers while creating a more professional and enjoyable work experience
  • Durable Vegan Leather Material: Made from quality PU vegan leather that is soft, durable, water-resistant, and easy to clean. Reinforced metal corner protectors help prevent daily wear and extend the life of the server book
  • 7 Organized Storage Compartments: Features 7 functional storage spaces including card slots, cash pocket, zipper coin pocket, guest check holder, menu pocket, receipt section, and pen holder to keep everything organized and easy to access
  • Perfect Size for Aprons & Daily Work: Compact and lightweight design fits comfortably into most server aprons without adding bulk. Helps keep your hands free while staying organized during busy shifts
  • Ideal for Restaurants, Bars & Cafes: Perfect for waiters, waitresses, bartenders, servers, cafes, food trucks, and restaurants. A practical work accessory that helps improve efficiency and customer service
Port Purpose When to allow it
TCP 5222 Client-to-server XMPP connections. Allow for normal desktop and mobile client access.
TCP 5269 Server-to-server XMPP federation. Allow only if this host must exchange stanzas with other XMPP servers.
Erlang distribution and epmd Internal node control and clustering. Keep restricted to localhost or explicitly trusted cluster peers; do not expose them to the public internet.

Use your provider’s firewall and the host firewall together. On a host using UFW, the corresponding rules are typically:

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

Apply the 5269 rule only when S2S is enabled, and use your distribution’s documented firewall syntax if it is not UFW. Never remove SSH access until you have confirmed the new policy from a second session. Administrative HTTP, WebSocket, BOSH, and API listeners may exist in an example configuration; expose them only when enabled and protected by an appropriate access policy.

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

Create the first user and grant administration rights

Register an account

Use the ejabberdctl script installed with the RUN package, package installation, or container image. Its registration syntax is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ejabberdctl register admin chat.example.com 'use-a-long-unique-password'

The arguments are the local username, the configured XMPP host, and the password. Use a unique password stored in a password manager; do not place a real password in shell history on a shared system. Confirm that registration succeeds before adding the account to the administrator rule.

Apply the ACL change

Add [email protected] to the administrator rule, save the YAML file, and reload or restart ejabberd. Then verify the node again:

sudo ejabberdctl status
sudo systemctl status ejabberd --no-pager

The account remains a normal XMPP account unless the ACL is both syntactically valid and loaded by the running node. If the reload is rejected, the previous configuration remains active; inspect the diagnostic output before trying another change.

Best Value
ZPARIK 6 Pack Guest Checks Books, Server Note Pads, Pink
  • Standard size: 6 pink server note pads, Each Book Comes with 50 bound order slips - that's 300 ticket sheets total! Check Pads Size 6.75 x 3.5 inch.
  • Convenient Work: These guest check books for servers have a tear-free dotted line that is easy to rip off. You can give as a customer copy or keep for record keeping. We've provided extra rows on the back for additional note taking.Perfect For Restaurants, Lounges, Hotels, Cafes, And Waiters To Use.
  • Record Important Information: These server note pads can record important information.Each ticket has a unique serial number printed at the top, dates, order details, number of guests, order amount, table numbers etc. They are lightweight, small and can fit most aprons. They can be used on-demand and can help decrease errors in orders, while improving work efficiency.
  • High Quality: Sturdy, Not Drop Powder, It's Thick, You Can Write On The Back And Front Easily.Their whole page printing has clear handwriting and a reasonable layout. On the customer retention part of each guest check, "THANK YOU" on the back to make customers feel appreciated.
  • Contact Us: We're confident that the quality of the server note pads will go beyond your expectation. If you experience an issue, feel free to contact us, we'll appreciate it to learn from your experience, and we'll make it better

Verify a working deployment

Check the service and node

  1. Run systemctl status ejabberd and confirm that systemd reports the service as active.
  2. Run ejabberdctl status and confirm that the Erlang node reports started.
  3. Review the service log for configuration, certificate, or listener errors.

Test real client traffic

  1. Configure an XMPP client with the full JID [email protected], its password, and the server name used in the certificate.
  2. Connect using the normal client-to-server port (usually TCP 5222) and require encrypted transport when the client offers that setting.
  3. Register a second test account and send a message in both directions. This verifies authentication, roster/session handling, and message routing rather than only process startup.
  4. If federation is enabled, test a conversation with an account on a separate XMPP domain after confirming that TCP 5269 is reachable in both directions.

Check the surrounding services

  • Resolve the XMPP name from an external network and confirm it reaches the VPS address.
  • Confirm that the certificate hostname exactly matches the name entered by the client.
  • Check that the listener is bound to the intended address and port and that firewall counters show the test traffic.
  • Confirm that a reverse proxy, cloud firewall, or security group is not blocking the same port upstream.

Troubleshoot failures in the right order

Symptom Likely cause Action
The service will not start after editing YAML. Indentation, an unknown option, invalid value, or malformed list. Run sudo ejabberdctl live for Erlang diagnostics, inspect the systemd log, restore the last known-good file, and reapply one change at a time. The running configuration is not replaced by a rejected reload.
Clients cannot resolve the server. DNS record points elsewhere, has not propagated, or the client is using a different host name. Resolve the exact XMPP name from outside the VPS and compare it with hosts and the certificate names.
Connection is refused on 5222 or 5269. The listener is disabled, bound to another address, or blocked by a host/provider firewall. Inspect the listen section, service status, and firewall/security-group rules. Open only the listener that is configured.
TLS reports an untrusted or mismatched certificate. Wrong hostname, missing intermediate chain, unreadable key, or an old certificate still loaded. Check the certificate and key files, service-account permissions, and chain; then reload or restart so ejabberd rebuilds its TLS certificate data.
ejabberdctl cannot connect to the node. Wrong installation path, stopped service, or a node/environment mismatch. Use the script shipped with the active installation, check systemctl status ejabberd, and run ejabberdctl live from that installation.
Login works locally but not from the internet. Provider firewall, NAT, DNS, or an incorrect public bind address. Test from an external network and inspect each firewall layer and listener binding before changing authentication settings.

Logs and live diagnostics

For a systemd-managed service, begin with:

sudo journalctl -u ejabberd -e
sudo ejabberdctl live

ejabberdctl live keeps the Erlang runtime in the foreground so startup and configuration diagnostics are visible. For Debian-style packages, inspect /var/log/ejabberd. For a root RUN installation, inspect the logs under /opt/ejabberd/. Use the path belonging to the installation you selected; an empty directory at the other path does not prove that logging is broken.

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.

Maintenance, upgrades, and backups

Record which installation method, release, host names, certificate locations, firewall rules, and administrator JIDs you used. Upgrade through the same channel that installed ejabberd: package upgrades for a package install, a newer compatible RUN installer for a RUN install, or the image and persistent-volume procedure for a container. Do not overwrite a working release directory before confirming that you can roll back.

Back up ejabberd.yml, certificate configuration and renewal material, and the Mnesia data directory used by the installation. Protect backups as confidential because they can contain account and server state. Test restoration on a separate instance, and keep a copy of the last known-good configuration before changing listeners, ACLs, or TLS settings.

When another deployment model is better

A VPS is appropriate when you need control over the operating system, data location, network policy, and upgrade schedule and can operate backups and security updates yourself. A container is preferable when your organization already standardizes on image-based deployment and persistent storage. A source build is justified when you must control patches or build tooling. A managed host can reduce system administration, but it changes where data and configuration live and does not provide the same low-level control as an ejabberd process on your VPS.

For most first-time Ubuntu or Debian deployments, the practical sequence is: use the self-contained RUN installer, set one DNS name in hosts, configure a matching readable certificate, expose TCP 5222 (and 5269 only for federation), register an account, add its full JID to the administrator ACL, reload, and prove the setup with two real client accounts.

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

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 from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.