---
title: "Comment by Mustafizur Rahman on \"Deploy FastAPI Application on Ubuntu with Nginx, Gunicorn and Uvicorn\" | Hashnode"
description: "how can i run uvicorn on specific port ?"
url: "https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/5fcc6dd0685f4f01c470f93e"
---

[Discussion](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4)

Comment [Deploy FastAPI Application on Ubuntu with Nginx, Gunicorn and Uvicorn](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4)

[Mustafizur Rahman](https://hashnode.com/@sojibmustafiz)

[Dec 6, 2020](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/5fcc6dd0685f4f01c470f93e)

how can i run uvicorn on specific port ?

[Shah Nawaz](https://hashnode.com/@shuv1824)

[Dec 8, 2020](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/5fcc6dd0685f4f01c470f93e#reply-5fcf12d53c92041bab27de52)

Use the following command: `gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b :5000 main:app`

This will run the server on port 5000.

[Mustafizur Rahman](https://hashnode.com/@sojibmustafiz)

[Dec 8, 2020](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/5fcc6dd0685f4f01c470f93e#reply-5fcf2198a38e1f208d80cc11)

[Shah Nawaz Shuvo](https://hashnode.com/@shuv1824) in digital ocean port is not accessible. Is there any suggestions?

[Mgc Labs](https://hashnode.com/@MgcLabs)

[Jan 17, 2021](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/5fcc6dd0685f4f01c470f93e#reply-6003823b7b30c23b714a964a)

[Mustafizur Rahman](https://hashnode.com/@sojibmustafiz) 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
