Hosting platforms
Make sure you have read the deployment guide.
Note
Commercial services mentionned here are chosen for their quality. No commercial affiliation.
Fly.io
Fly.io is the fastest way to deploy a container. It can even scales to 0 and be automatically restarted when new requests arrive, bringing hosting cost down.
- Install flyctl, their CLI utility:
curl -L https://fly.io/install.sh | sh - Create an account with
fly auth signupor log in withfly auth login. - Run
fly launch --secret "FLASK_SECRET_KEY=$(uv run hyperflask gen secret-key)" - Run
fly deployto redeploy your app
Using litestream
- Create a storage:
fly storage create - Add the following section to your
fly.tomlfile:
[env]
LITESTREAM_ENDPOINT = "fly.storage.tigris.dev"
LITESTREAM_BUCKET = "YOUR_BUCKET_NAME"
LITESTREAM_REGION = "auto"
Re-deploy using fly deploy
(Credentials for the storage will be provided directly by the platform)
Digital Ocean
Digital Ocean is an affordable and easy to use all around infrastructure provider. Their App Platform service allows to deploy container images.
- Create a container registry
- Login locally to your registry (follow the provided instructions)
- Build your app image using the name
registry.digitalocean.com/<YOUR_REGISTRY>/<IMAGE_NAME> - Push your app image:
docker push registry.digitalocean.com/<YOUR_REGISTRY>/<IMAGE_NAME> - Create a new app on Digital Ocean
- Choose your container registry and your image
- Add
FLASK_SECRET_KEYas App-level environment variable, choose encrypt (value can be generated usinguv run hyperflask gen secret-key)
- Validate app and wait for deployment
VPS or bare metal
Kamal and Uncloud are 2 great options to deploy your app on a VPS.
Example using Uncloud:
- Install:
curl -fsS https://get.uncloud.run/install.sh | sh - Initialize a machine:
uc machine init root@your-server-ip - Create a
.env.productionfile and add your production environment variables (notableFLASK_SECRET_KEY) - Build your image:
docker build --env-file .env.production . -t my-app-image - Deploy your app:
uc run -p yourdomain.com:80/https my-app-image
Static hosting
Some well-known providers: