1. Ports
  2. Port 504

Port 504 is the IANA-assigned port for Citadel, an open-source groupware server that provides email, calendaring, contacts, bulletin boards, instant messaging, and collaboration tools through a single integrated system.

What Runs on Port 504

The Citadel protocol runs on port 504, handling native communications between Citadel clients and servers. While Citadel supports standard protocols like SMTP, IMAP, POP3, and XMPP on their respective ports, port 504 is reserved for its proprietary protocol—optimized for efficient multiplexing of groupware services over a single dedicated channel.1

Both TCP and UDP are supported. TCP provides reliable, connection-oriented delivery for complex operations like message retrieval and calendar synchronization. UDP can handle lightweight status updates and real-time notifications within the Citadel environment.

The Story Behind Citadel

Art Cancro created the modern Citadel in March 1988, bringing up the first multiuser implementation on an Altos Unix system. The project began in 1987 as a complete rewrite of Citadel-86 for multiuser Unix platforms. Rather than modifying existing code, Cancro decided "a rewrite would be easier, so I started writing a Citadel implementation for Unix."2

Citadel started as a bulletin board system, but by the mid-1990s it began transforming into a full collaboration suite. The evolution was driven by developers and system administrators who were frustrated with the poor quality of commercial solutions like Microsoft Exchange and Lotus Notes.3

The philosophy was simple: build an integrated groupware server that actually worked well, release it as open source, and give it away for free.

What Port 504 Carries

Every connection on port 504 represents:

  • Email synchronization between Citadel clients and servers
  • Calendar and contact updates
  • Bulletin board access
  • Real-time messaging coordination
  • Directory lookups and group collaboration data

The protocol efficiently handles multiple groupware services simultaneously, maintaining state and delivering updates across the integrated system.

Security Considerations

Default Encryption: Communications on port 504 are typically unencrypted by default. If you're running Citadel, implement additional security measures (SSL/TLS tunnels, VPN) if confidentiality is required.

Firewall Configuration: Port 504 should only be exposed to networks where Citadel clients need access. Block external access unless explicitly required.

Authentication: The Citadel protocol includes authentication mechanisms, but the strength depends on your configuration and whether credentials are transmitted over encrypted channels.

The HTTP 504 Confusion

Port 504 has nothing to do with HTTP 504 Gateway Timeout errors. The "504" in the HTTP status code is completely unrelated to this network port—one measures port numbers (0-65535), the other measures HTTP response codes (100-599). They just happen to share three digits.4

How to Check What's Using Port 504

On Linux or macOS:

# See what's listening on port 504
sudo lsof -i :504

# Or using netstat
sudo netstat -tulpn | grep :504

On Windows:

# Check port 504
netstat -ano | findstr :504

If you see something listening on port 504 and you're not running Citadel, investigate what service is using it.

Citadel doesn't live in isolation. A full Citadel installation typically uses:

  • Port 25 - SMTP for incoming and outgoing email
  • Port 110 - POP3 for email retrieval
  • Port 143 - IMAP for email access
  • Port 443 - HTTPS for Citadel's web interface
  • Port 504 - Native Citadel protocol
  • Port 5222 - XMPP for instant messaging

The native Citadel protocol on port 504 is designed for specialized Citadel clients, while the other ports provide access through standard Internet protocols.

Why This Port Matters

Port 504 represents an alternative path in groupware history. While most organizations adopted commercial solutions—Exchange, Notes, eventually Google Workspace and Microsoft 365—Citadel offered a free, open-source option that integrated everything into a single self-hosted system.

The port isn't widely used today compared to its commercial counterparts, but it's still actively maintained. Every connection on port 504 represents someone choosing self-hosted open source over commercial cloud services.

That choice—and the protocol that enables it—is what port 504 carries.

Frequently Asked Questions

Was this page helpful?

😔
🤨
😃
Port 504: Citadel — Open Source Groupware's Quiet Channel • Connected