© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Mustafizur Rahman
how can i run uvicorn on specific port ?
Shah Nawaz
Senior Software Engineer | Polyglot Developer
Use the following command: gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b :5000 main:app
gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b :5000 main:app
This will run the server on port 5000.
Shah Nawaz Shuvo in digital ocean port is not accessible. Is there any suggestions?
Mgc Labs
The Mgc Labs
Mustafizur Rahman 5000 isn't the port to be exposed to the internet, Nginx is what will control the open port.
So a typical use case would be
mydomain.com:443 -> Nginx -> gunicorn port 5000
That's the meaning of proxy