Back to Medusa

Eaddrinuse

www/apps/resources/app/troubleshooting/_sections/other/eaddrinuse.mdx

2.14.2792 B
Original Source

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

bash
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:

shell
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.