TCPRegistered PortFirewall: Usually Closed
4000

Development Server / Phoenix

What is Port 4000?

Port 4000 is commonly used as a development server port, most notably as the default for the Phoenix web framework (Elixir/Erlang). Phoenix, known for its real-time capabilities and high performance, uses port 4000 for its development server. Beyond Phoenix, port 4000 is used by various other development tools and services — Jekyll (static site generator) sometimes uses it, as do various Node.js applications and Docker development setups. In production, some services use port 4000 for internal APIs, microservices, and custom applications. The port is in the IANA-registered range and is commonly available for application use.

Common Uses

  • Phoenix (Elixir) web framework development
  • Generic web application development servers
  • Internal API and microservice endpoints
  • Docker container port mapping

Technical Details

Port Number4000
ProtocolTCP
CategoryRegistered
Service NameDevelopment Server / Phoenix
Default FirewallUsually Closed
Port Test Commands

Copy-paste commands to check port 4000 (Development Server / Phoenix) from your terminal

Test connectivity

Netcat (nc)Check if TCP port is reachable
nc -zv example.com 4000
curl (HTTP)Test HTTP response on this port
curl -v --max-time 5 http://example.com:4000/
TelnetBasic TCP port connectivity check
telnet example.com 4000
nmapScan port 4000 with service detection
nmap -p 4000 -sV example.com
Bash /dev/tcpPure bash TCP check (no extra tools needed)
(echo > /dev/tcp/example.com/4000) 2>/dev/null && echo "open" || echo "closed"

Open port in firewall

UFW (Ubuntu / Debian)
sudo ufw allow 4000/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 4000 -j ACCEPT
firewalld (RHEL / CentOS)
sudo firewall-cmd --permanent --add-port=4000/tcp && sudo firewall-cmd --reload

Security Considerations

!

Development servers on port 4000 should bind to localhost in development. For production Phoenix applications, use a reverse proxy (Nginx/Caddy) on ports 80/443 and don't expose port 4000 directly. Apply the same security practices as any web application — authentication, input validation, and rate limiting.

Popular Ports Reference

The most commonly used and referenced network ports

Related Ports