Skip to main content
4567

Port 4567Sinatra / Tram

TCP

Port 4567 is the default port for Ruby Sinatra web framework and several development tools. Sinatra applications bind to port 4567 by default in development mode. TRAM (Threat Report ATT&CK Mapper) and some IoT device management interfaces also use this port. Not safe to expose without authentication – development defaults have no access control.

Port Number

4567

Protocol

TCP

Service

Sinatra / Application Default

Range

IANA Registered (1024–49151)

Description

Port 4567 is best known as the Sinatra web framework default. When running a Sinatra application without specifying a port, it binds to 0.0.0.0:4567. This is intended for local development – Sinatra provides no built-in authentication or rate limiting. Other services using port 4567 include TRAM (MITRE's threat mapping tool), Netlify Dev local server, and various IoT management interfaces. In development environments, ensure port 4567 binds to 127.0.0.1 only (set :bind, '127.0.0.1' in Sinatra). Production Sinatra applications should run behind a reverse proxy (Nginx/Caddy) on standard ports with TLS.

Security risks

  • 1Development server in production: Sinatra's WEBrick server (default on 4567) is single-threaded, has no request size limits, and provides verbose error pages with source code to any requester
  • 2No security headers: default Sinatra serves without X-Frame-Options, CSP, HSTS, or X-Content-Type-Options – vulnerable to clickjacking, XSS, and MIME sniffing
  • 3Verbose error output: Sinatra shows full stack traces with file paths, gem versions, and environment variables in development mode (set :environment, :development)
  • 4Binding to 0.0.0.0: Sinatra defaults to binding on all interfaces (set :bind, '0.0.0.0') – developers running locally expose their dev server to the entire network
  • 5No rate limiting or auth: bare Sinatra apps on 4567 have no built-in protection against brute force, DoS, or unauthorized access

Firewall guidance

Port 4567 should never be internet-facing. For development: set :bind, '127.0.0.1' in the Sinatra app. For production: run behind Puma/Unicorn on a Unix socket, fronted by nginx (which handles TLS, rate limiting, and security headers). If port 4567 is found open on a server, it's likely an accidentally-exposed development instance.

Diagnosis commands

Check if a Sinatra app is running

shell
curl -s http://localhost:4567/ -o /dev/null -w '%{http_code}'

Detect Sinatra by its distinctive 404 page ('Sinatra doesn\'t know this ditty')

shell
curl -s http://localhost:4567/nonexistent 2>&1 | grep -i 'sinatra'

Identify process on port 4567

shell
ss -tlnp | grep 4567

Find the Ruby process bound to the Sinatra port

shell
lsof -i :4567

Usage examples

Port 4567 – Sinatra / Tram
shell
ruby app.rb # starts on 4567
curl http://localhost:4567/
sinatra: set :port, 4567

Common services on this port

Sinatra (Ruby)GitLab Pages (internal)Tram (embedded systems)Custom Ruby microservices

Related ports

History

Sinatra is a Ruby web framework created by Blake Mizerany in 2007, inspired by the simplicity of Express.js and Flask. Port 4567 was chosen arbitrarily as the default development port. Sinatra became popular for microservices and APIs due to its minimal DSL (a 'hello world' is 4 lines). It runs on WEBrick by default but should use Puma or Thin in production. Frank Sinatra's estate has not objected to the naming.

FAQ

How do I run Sinatra in production?

Never use WEBrick (the default) in production. Instead: (1) Add gem 'puma' to Gemfile. (2) Create config/puma.rb with workers, threads, and bind settings. (3) Run: bundle exec puma -C config/puma.rb. (4) Front with nginx reverse proxy (handles TLS, static assets, buffering, security headers). (5) Set :environment, :production to disable verbose errors. (6) Use Rack middleware for rate limiting (rack-attack) and security headers (secure_headers gem).