EADDRINUSE Error

When you run your Medusa application you may run to an error similar to the following:

Terminal
code: 'EADDRINUSE',errno: -48,syscall: 'Listen',address: '::',port: 9000

This means that there's another process running at port 9000. You need to either terminate the other process or change the port used by your Medusa application.

To change the default port used by the Medusa application, set the PORT environment variable before starting your application. For example, set it in .env:

Code
PORT=9001

After changing the port, make sure to change the port used in other apps that interact with your Medusa server, such as in your admin or storefront.

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Medusa MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break