How to run meteor on a different port, for example on port 80.
I tried to use meteor --port 80
, but I get this error Error: listen EACCES
help me please.
How to run meteor on a different port, for example on port 80.
I tried to use meteor --port 80
, but I get this error Error: listen EACCES
help me please.
Sounds like it might be access issue on your machine.
Check out this following answer, which might be related to your question. Quoting:
"As as a general rule processes running without root privileges cannot bind to 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 that you can address the root cause, which is fixing the node root privilege.
You can't bind to ports < 1024 on Linux/Unix operating systems with a non-privileged account.
You could get around this by running meteor as root, but this is a really bad idea. In development mode, running as root will modify the permissions of the files under your application directory. In production, it's just a giant security hole. Never run a meteor app as root.
Listed below are the best practices depending on your environment.
Run meteor on a high port number. The default is 3000 when you don't give a --port
argument. Connect to it via the URL printed in the console - e.g. http://localhost:3000/
.
Here you have two choices:
Run meteor on a high port number and connect it to the outside world via a reverse proxy like nginx or HAProxy.
Start the webserver as root but step down the permissions once it's running using something like userdown. This is how mup works which, incidentally, is probably what you should be using to deploy your app.
The meteor run --port 8080
terminal command can be used.
run it with sudo
sudo meteor --port 80