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
Copy-paste commands to check port 4000 (Development Server / Phoenix) from your terminal
Test connectivity
nc -zv example.com 4000
curl -v --max-time 5 http://example.com:4000/
telnet example.com 4000
nmap -p 4000 -sV example.com
(echo > /dev/tcp/example.com/4000) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 4000/tcp
sudo iptables -A INPUT -p tcp --dport 4000 -j ACCEPT
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