1. Ports
  2. Port 4000

Port 4000 is an anomaly. Unlike most ports that belong to a single protocol or service, port 4000 has been claimed and reclaimed by different technologies across different eras of the Internet. It's been the heartbeat of instant messaging, the gateway to virtual dungeons, the channel for remote desktop control, and now the default home for web development servers.

This port has no single owner because it belongs to something larger: the cultural evolution of online communication itself.

The Many Lives of Port 4000

The MUD Era: Text-Based Worlds (1991)

Before graphical MMORPGs, before Discord, before Twitch, there were MUDs: Multi-User Dungeons. These text-based virtual worlds let players explore, fight monsters, and socialize through nothing but typed commands and imagination.

When DikuMUD officially opened to the public on February 3, 1991, running at freja.diku.dk, it listened on port 4000.1 This wasn't a random choice. The developers at the University of Copenhagen's Department of Computer Science (DIKU) needed a port high enough to avoid conflicts with system services but memorable enough for players to type into their telnet clients.

Port 4000 became the de facto standard. CircleMUD, which began on a DECstation named "circle" at Johns Hopkins University in 1992, inherited this default.2 Today, MUD servers still use port 4000 as their traditional home: telnet coremud.org 4000 connects you to a world that hasn't forgotten its text-based roots.

The MUD community's choice of port 4000 would echo through decades of Internet history. Every modern MMORPG from EverQuest to World of Warcraft traces its lineage back to these text adventures, and many began their journeys through this port.

The ICQ Revolution: "I Seek You" (1996)

In the summer of 1996, four young Israelis, Yair Goldfinger, Sefi Vigiser, Amnon Amir, and Arik Vardi, left their jobs at Zapa Digital Arts with an idea: what if you could know when your friends were online?3

They built ICQ in less than two months. The name was a phonetic play on "I Seek You," and the technology was revolutionary. For the first time, ordinary Internet users could see which of their friends were connected and send them instant messages.

The ICQ client communicated with Mirabilis servers by sending UDP packets to port 4000.4 When you logged in, your client announced your presence to icq.mirabilis.com:4000, sharing your IP address, the TCP port you were listening on, your password, and your contact list. The server kept track of who was online and brokered connections between users.

That distinctive "uh-oh" sound effect announced incoming messages to millions of users worldwide. By 1998, when AOL acquired Mirabilis for $407 million (just 19 months after launch), ICQ had 100 million registered accounts.5 The sale created what Israelis called "the Mirabilis Effect," inspiring a generation of entrepreneurs and helping establish Israel as a tech startup powerhouse.

Port 4000 wasn't just carrying packets. It was carrying a cultural shift: the birth of modern instant messaging.

Remote Desktop: Taking Control (1998)

The same year AOL acquired ICQ, a former Nasdaq:SPCO engineer founded TWD Industries to create RemoteAnything, a tiny (90KB) remote desktop tool that could traverse firewalls without configuration.6

At the time, Symantec's pcAnywhere owned 53% of the market. RemoteAnything was smaller, faster, more secure, and 3.7 times cheaper. By 2002, over 20 million RemoteAnything licenses had been deployed. TWD declined an acquisition offer from Summit Partners.

The software used port 4000 by default, leading to its informal association with "remoteanything" in port databases. This is why many security scanners flag port 4000 as suspicious: not because RemoteAnything was malware, but because the line between legitimate remote access and unauthorized backdoor access has always been razor-thin.

Gaming Servers: Battle.net and Diablo (1996-2000s)

When Blizzard launched Diablo in 1996, players connecting to Battle.net needed to allow traffic through port 4000.7 The port served as a primary connection point for Blizzard's online gaming infrastructure.

This wasn't coincidental timing with ICQ. The mid-to-late 1990s saw an explosion of consumer Internet applications, and port 4000, memorable and unassigned to any critical system service, became a popular choice for applications targeting home users who might need to configure their routers or firewalls.

The Development Server Era: Phoenix and Jekyll (2008-Present)

Today, port 4000 has found its most widespread use yet: as the default port for development servers.

When Tom Preston-Werner (cofounder of GitHub) created Jekyll in December 2008, he chose port 4000 as the default for the local development server.8 Jekyll's influence extended far beyond static sites. The 2012 Obama campaign's fundraising platform, built on Jekyll, handled 81 million pageviews and raised over $250 million, all developed locally on port 4000.

When Chris McCord created the Phoenix framework for Elixir in 2014, he also defaulted to port 4000.9 McCord built Phoenix because Ruby on Rails couldn't handle the real-time, scalable applications he wanted to create. Phoenix was designed from the ground up for concurrent connections and real-time messaging, which meant that before it could even render HTML, it supported websocket channels.

Today, when a developer runs mix phx.server or bundle exec jekyll serve, they're connecting to localhost:4000. Node.js and Express developers frequently choose this port for custom servers. The port that once carried instant messages now carries the future of the web during development.

IANA Registration: Terabase

Officially, IANA has registered port 4000 to "Terabase," a legacy database service.10 The registration also notes "icq-udp" for UDP traffic. But official registrations tell only part of the story. Port 4000's real history is written in the applications that claimed it.

Security Considerations

Port 4000's versatility is also its vulnerability. Because it hosts so many different services, attackers know it's worth probing.

Known threats:

  • Trojan Cow and other backdoor trojans have historically used port 4000 for command-and-control traffic11
  • Misconfigured remote desktop tools can expose systems to unauthorized access
  • Development servers accidentally exposed to the Internet can leak source code or provide attack surfaces

Defensive measures:

  • Block port 4000 at the firewall unless explicitly needed
  • Never expose development servers to public networks
  • Monitor for unexpected listeners on this port
  • Audit any software claiming to use port 4000

The RemoteAnything story carries a cautionary tale: when major antivirus vendors began flagging the legitimate software as malware (allegedly due to competitive pressure), it became effectively unsellable despite having hundreds of millions of deployments.6 The security industry's relationship with port 4000 has always been complicated.

How It Works: A Port of Many Protocols

Port 4000 doesn't have a single protocol. Instead, it speaks whatever language the application requires:

For MUDs (1991-present):

telnet mud.example.com 4000

Raw text over TCP. You type commands; the server sends descriptions. No encryption, no authentication beyond in-game passwords.

For ICQ (1996-early 2000s): UDP packets to port 4000 containing login credentials, contact lists, and presence information. The client would receive back information about which contacts were online and handle peer-to-peer messaging on other ports.

For development servers (2008-present): HTTP over TCP. Your browser requests http://localhost:4000/, and the development server returns HTML, CSS, and JavaScript.

For remote desktop (1998-present): Proprietary protocols over TCP, often with firewall traversal capabilities via directory servers.

PortServiceRelationship
23TelnetOriginal MUD connection method
5190ICQ (OSCAR)ICQ's later protocol replaced UDP 4000
6112Battle.netUsed alongside 4000 for Blizzard games
3000Ruby on Rails defaultCommon alternative development port
4001NewoakAdjacent registered port
5000Flask defaultAnother development server convention

The Cultural Weight

Port 4000 has witnessed three decades of Internet culture:

1991: Players typing telnet freja.diku.dk 4000 to enter the first DikuMUD, exploring text-based dungeons that would inspire every MMORPG to come.

1996: A teenager in Tel Aviv installing ICQ and seeing that green flower icon light up when their friend came online. That "uh-oh" sound. The first time the Internet felt like a place where your friends were.

2008: Tom Preston-Werner running jekyll serve and watching his blog appear at localhost:4000, nine months after cofounding GitHub.

2014: Chris McCord deciding that real-time web applications needed a new framework, and Phoenix rising to serve developers on port 4000.

Today: Millions of developers worldwide starting their local servers, the same port number that carried teenage instant messages now carrying the code that will become tomorrow's applications.

Frequently Asked Questions

Was this page helpful?

😔
🤨
😃