Skip to content
RU

Port 5222: XMPP Jabber (clients)

Smartphone and tablet on a wooden desk showing a blurred chat conversation, cup of tea nearby
Key idea:

Port 5222 (TCP) is XMPP (Jabber) client-to-server traffic, defined in RFC 6120; servers talk to each other on 5269. ejabberd, Prosody and Openfire listen on 5222 and upgrade the connection with STARTTLS; 5223 is the legacy direct-TLS port. Open 5222 to the internet only if you run a public chat server.

Below: what uses this port, security considerations, online check, FAQ.

Check your host & ports →

What runs on this port

XMPP Jabber (clients)

Port 5222 — XMPP (Jabber) client connections (Prosody, Openfire, ejabberd). 5269 — server-to-server. Used in the WhatsApp backend (modified XMPP), legacy Facebook Messenger, Google Talk (deprecated), enterprise messengers.

Security considerations

STARTTLS mandatory in modern XMPP (RFC 6120). Plaintext auth rejected. Spam/abuse — use ejabberd mod_anti_abuse + pubsub rate limits.

Check this port online

Check port online →

Enterno.io Ping + Port checker tests TCP reachability of any port from our server in Moscow.

Understanding XMPP and Its Use Cases on Port 5222

Port 5222 is the default TCP port used for XMPP (Extensible Messaging and Presence Protocol) client connections, primarily for Jabber clients. XMPP is an open-standard communication protocol widely used for instant messaging, presence information, and contact list maintenance. Its extensibility and real-time communication capabilities make it suitable for various applications beyond simple messaging.

Common use cases of XMPP over port 5222 include:

  • Instant Messaging: Applications like Jabber clients (e.g., Pidgin, Gajim) utilize port 5222 for real-time messaging.
  • Collaboration Tools: Platforms like Mattermost and Rocket.Chat leverage XMPP for team communication.
  • IoT Communication: XMPP is also used in IoT devices for real-time data exchange and notifications.

Additionally, many chat applications have adopted XMPP as a backbone for their messaging systems due to its scalability and flexibility.

Security Considerations for Using Port 5222

While port 5222 serves as a critical communication channel for XMPP, it is essential to consider security implications associated with its use. By default, XMPP traffic over port 5222 is transmitted in plaintext, which can expose sensitive data to potential eavesdroppers. To mitigate these risks, the following security measures should be implemented:

  • Enable TLS: Transport Layer Security (TLS) can be enforced on port 5222 to encrypt data in transit. This ensures that even if traffic is intercepted, the information remains confidential.
  • Implement Authentication: Use SASL (Simple Authentication and Security Layer) mechanisms to authenticate users securely before allowing them to connect to the XMPP server.
  • Regular Updates: Keep your XMPP server and libraries up to date to protect against known vulnerabilities.

Additionally, consider using firewalls to restrict access to port 5222 from untrusted networks, and monitor traffic for unusual patterns that may indicate a security breach.

Practical Examples: Configuring XMPP Clients for Port 5222

Configuring XMPP clients to connect over port 5222 is straightforward. Below are practical examples for popular XMPP clients:

1. Pidgin

To configure Pidgin to connect to an XMPP server using port 5222:

  1. Open Pidgin and go to Accounts > Manage Accounts.
  2. Click on Add and select XMPP as the protocol.
  3. Enter your Jabber ID (e.g., user@domain.com) and password.
  4. In the Advanced tab, ensure that Port is set to 5222.
  5. Check the box for Use encryption if your server requires it.
  6. Click Add to save the account.

2. Gajim

For Gajim, follow these steps:

  1. Launch Gajim and navigate to Accounts > Add Account.
  2. Input your Jabber ID and password.
  3. In the Advanced settings, set the Port to 5222.
  4. If needed, enable Use TLS for secure connections.
  5. Click Add to finalize the setup.

These configurations allow users to connect to their XMPP servers securely and efficiently using port 5222, facilitating seamless communication.

Learn more

Sources

Frequently Asked Questions

Is port 5222 open by default?

No, modern cloud providers close all incoming ports by default. Explicitly allow 5222 in your Security Group or firewall.

How to check if port 5222 is reachable?

Use Enterno Ping + Port Checker. Or in shell: nc -vz example.com 5222.

Is port 5222 safe to expose?

Depends on the service. XMPP Jabber (clients) should be hardened (auth + TLS + rate limit) before public exposure. See our 2026 exposure research.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.