Port 3000 (Node.js and Grafana)

Port 3000 is best known as the default port of Node.js development tools and applications, and also of the Grafana dashboard system.

Key facts

Port
3000
Protocols
TCP
Range
Registered port, 1024-49151
IANA service name
hbci, remoteware-cl
Unofficial use
The use described on this page is not the IANA assignment for this port. Source (opens in a new tab) Checked on 30.11.2026

IANA assigns ports in this range to services on request, under RFC 6335.

About port 3000

Port 3000 is best known as the default port of Node.js development tools and applications, and also of the Grafana dashboard system. It runs over TCP, and usually serves HTTP without encryption. This is unofficial use: in the IANA registry, port 3000 is registered for the hbci and remoteware-cl services.

According to each tool's official documentation, Next.js listens on port 3000 by default, the Express starter example listens on port 3000, and Grafana listens on port 3000 by default.

What port 3000 is used for

  • Next.js: the next dev and next start commands listen on port 3000 by default, and you can change it with the -p option or the PORT environment variable.
  • Express and Node.js applications: many applications listen on port 3000, behind a web server that acts as a reverse proxy.
  • Grafana: Grafana's web interface for graphs and dashboards listens on port 3000, according to the http_port setting.

Note: Next.js and Grafana listen on all of the server's addresses by default, not only on 127.0.0.1. So it's important to decide in advance whether the port should be reachable from outside.

Port 3000 in the firewall

In most cases, there's no need to open port 3000 to the internet. With an application in production, visitors arrive through port 80 and port 443, and the web server passes the requests to the application on port 3000. In that case, set the application to listen only on 127.0.0.1, for example next start -H 127.0.0.1.

When you need direct access, for example to the Grafana interface or for testing, allow it only from specific addresses:

  • UFW: ufw allow from 203.0.113.10 to any port 3000 proto tcp
  • firewalld: firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="3000" protocol="tcp" accept'

A port published from a Docker container may be reachable from outside even when a UFW rule blocks it. To limit it to the server itself, publish it on 127.0.0.1, for example -p 127.0.0.1:3000:3000.

Risks and security

A development server left open to the internet may expose code, detailed error messages, and interfaces that weren't meant for the public. An admin interface such as Grafana that's exposed to everyone attracts login attempts.

  • Don't run a development server (next dev) on a public server. In production, build the application and run it with next start or with a process manager.
  • Serve the application to visitors over HTTPS, through a reverse proxy, and set it to listen only on 127.0.0.1.
  • In Grafana, change the default password of the admin user at the first login, and limit access by IP address.
  • Check from time to time which ports are open on the server, and shut down development servers that are no longer in use.

Commands to check and configure

  • ss -tlnp | grep ':3000 '

    Shows which process is listening on port 3000 and on which address (requires root for the process details).

  • lsof -i :3000

    Shows the process holding port 3000, useful when an application fails with the EADDRINUSE error.

  • curl -I http://127.0.0.1:3000

    Checks from the server itself that the application on port 3000 responds, and shows the response headers.

  • npx next start -H 127.0.0.1 -p 3000

    Starts a prebuilt Next.js application so that it listens only on the server's 127.0.0.1 address, behind a reverse proxy.

  • PORT=4000 npx next dev

    Starts the Next.js development server on port 4000 instead of 3000.

  • ufw allow from 203.0.113.10 to any port 3000 proto tcp

    Allows access to port 3000 only from the given IP address (UFW).

  • firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="3000" protocol="tcp" accept'

    Allows access to port 3000 in firewalld only from the given IP address. Then run firewall-cmd --reload.

Port 3000 in the IANA registry

Port Protocol Service IANA registry description
3000 TCP hbci HBCI
3000 TCP remoteware-cl RemoteWare Client
3000 UDP hbci HBCI
3000 UDP remoteware-cl RemoteWare Client

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 3000 FAQ

What does the EADDRINUSE error on port 3000 mean?

The error appears when another process is already listening on port 3000, for example an earlier copy of the application that's still running. Run lsof -i :3000 to see which process holds the port, then stop it or start the application on a different port.

How do I serve a Node.js application at a regular address, without a port number?

Set up a web server as a reverse proxy: it receives visitors on ports 80 and 443, handles the SSL certificate, and passes the requests to the application on port 3000. The Next.js in production page explains the setup in full.

How do I change the port of a Next.js application?

Add the -p option to the command, for example next dev -p 4000, or set the PORT environment variable. According to the Next.js documentation, PORT can't be set in the .env file, because the server starts before the file is loaded.

Do I need to open port 3000 in the firewall?

In most cases, no. When the application runs behind a reverse proxy, visitors arrive through ports 80 and 443, and port 3000 stays closed. Open it only to specific addresses, when you need direct access.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement