---
title: "Discussion on \"Deploy FastAPI Application on Ubuntu with Nginx, Gunicorn and Uvicorn\" | Hashnode"
description: "Discussion on \"Deploy FastAPI Application on Ubuntu with Nginx, Gunicorn and Uvicorn\". FastAPI is a promising new Python framework that supports concurrency and type system out of the box. It has many cool features that I like and it's fast. In this post, I will briefly go over the process of deploying a simple FastAPI application on U..."
url: "https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Deploy FastAPI Application on Ubuntu with Nginx, Gunicorn and Uvicorn](https://blog.nawaz.info/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn?utm_source=hashnode&utm_medium=feed)

FastAPI is a promising new Python framework that supports concurrency and type system out of the box. It has many cool features that I like and it's fast. In this post, I will briefly go over the process of deploying a simple FastAPI application on U...

Sep 8, 2020 · 4 min read · blog.nawaz.info  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#python](https://hashnode.com/tag/python)
-   [#fastapi](https://hashnode.com/tag/fastapi)
-   [#deployment](https://hashnode.com/tag/deployment)
-   [#nginx](https://hashnode.com/tag/nginx)

## Written by

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

@shuv1824 · Dhaka, Bangladesh

  
[View profile](https://hashnode.com/@shuv1824)

Senior Software Engineer | Polyglot Developer

A life long learner and tech tinkerer. Making and breaking systems. Learning from mistakes.

## Responses 3

Markdown supported · ⌘↵ to post

[Girish Krishna](https://hashnode.com/@gii-rish)

[May 5, 2021](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/609230e5763ca9303336729f)

How do we deploy fastapi on IIS server?

[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/60038261848f4c3b9a0ef9f3)

Great article, wanted to say thank you, been searching for a super simple deployment guide. Making a fastapi is pretty easy, finding a deployment guide not as easy

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

[Jan 19, 2021](https://hashnode.com/posts/deploy-fastapi-application-on-ubuntu-with-nginx-gunicorn-and-uvicorn/5f57c350a5765727f4c326d4/comment/60038261848f4c3b9a0ef9f3#reply-600649d27b30c23b714abd3b)

Its my pleasure. I am glad that this article helped you in some way. Cheers.

[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
