How to start a meteorite on another port

How to start a meteorite on another port, for example, on port 80. I tried to use meteor --port 80 , but I get this error Error: listen EACCES

help me please.

+7
meteor
source share
4 answers

It looks like this might be a problem with access on your computer.

Check out this next answer, which may be related to your question. Citation:

"Typically, processes running without root privileges cannot communicate with ports below 1024.

So, try a higher port or run with elevated privileges via sudo . "

So, you can see that sudo meteor run with your port number will work, but you can refer to the root cause, which fixes the root node privilege.

Node.js EACCES error while listening on most ports

+12
source share

You cannot bind to ports <1024 on Linux / Unix operating systems with an unprivileged account.

You can get around this by running meteor as root, but this is a really bad idea. In development mode, working with root privileges will change the permissions of files in the application directory. In production, it's just a giant security hole. Never run the meteor app as root .

The following are best practices based on your environment.

Development

Launch a meteor with a large port number. The default value is 3000 unless you give the --port argument. Connect to it using the URL printed on the console. http://localhost:3000/ .

Products

Here you have two options:

  • Run meteor with a high port number and connect it to the outside world through a reverse proxy, such as nginx or HAProxy .

  • Run the web server as root, but release the permissions after starting it with userdown . This is how mup works, which, by the way, should probably be used to deploy your application.

+9
source share

run it with sudo

 sudo meteor --port 80 
+5
source share

You can use meteor run --port 8080 , it works ...

0
source share

All Articles