Deploying an aiohttp app


You can find the step-by-step deployment guide here.

Application Build
Copy link

Hostman uses the following environment to build an aiohttp application:

  • Python 3.10–3.14 (you can choose the version when creating the app)
  • pip

By default, Hostman runs the following commands to prepare the build environment:

apt-get install -y --no-install-recommends curl build-essential libpq-dev
pip install --upgrade pip
pip install aiohttp

The default build command then installs your project's dependencies:

pip install --upgrade -r requirements.txt

The default start command is:

python3 main.py

Requirements
Copy link

  • Make sure requirements.txt lists aiohttp and all other dependencies your project needs.
  • Make sure your project's entry point is named main.py and starts the application server.
  • Make sure the application listens on 0.0.0.0 rather than 127.0.0.1; otherwise, external connections will not work.