---
title: "How to Deploy a FastAPI App | Hostman Docs"
description: "Learn how to host your FastAPI Python applications on Hostman’s cloud platform. Enjoy fast and scalable deployment!"
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

You can find the step-by-step deployment guide [here](https://hostman.com/docs/app-platform/backend-apps/).

## Application Build

Hostman uses the following environment when building a FastAPI application:

-   Python 3.10, 3.11, 3.12, 3.13, or 3.14
-   pip
-   gunicorn
-   System libraries for working with PostgreSQL and MySQL

Hostman will execute the following commands during the build:

```shell
apt-get install -y python3 python3-pip gunicorn python3-psycopg2 libpq-dev python-dev default-mysql-client python3-dev default-libmysqlclient-dev python3-mysqldb --fix-missing
pip3 install psycopg2 django
ln /usr/bin/python3 /usr/bin/python -sf
ln /usr/bin/pip3 /usr/bin/pip -sf
```

To install dependencies, add the following line to the build command:

```shell
pip3 install --upgrade -r requirements.txt
```

The default start command is:

```shell
uvicorn main:app --host 0.0.0.0
```

If necessary, you can specify a port, for example:

```shell
uvicorn main:app --host 0.0.0.0 --port 80
```

## Requirements

-   Make sure the application initialization file is named `main.py`.
-   Make sure the application is listening on `0.0.0.0` rather than `127.0.0.1`; otherwise, external connections will not work.
