Deploy FastAPI App on Seenode | FastAPI Hosting & Deployment Guide
This guide will walk you through deploying your existing FastAPI application on seenode using Uvicorn as the ASGI server.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- A seenode account at cloud.seenode.com
- Git configured on your machine
- Existing FastAPI project ready to deploy
Configure for seenode Deployment
Section titled “Configure for seenode Deployment”Application Structure
Section titled “Application Structure”Ensure your project has a main.py file and a requirements.txt. seenode will look for an app instance in your main.py file.
from fastapi import FastAPI
app = FastAPI()
@app.get("/")def read_root(): return {"message": "Hello from FastAPI"}Requirements
Section titled “Requirements”Your requirements.txt should include fastapi and an ASGI server like uvicorn for production:
fastapiuvicorn[standard]Deploy on seenode
Section titled “Deploy on seenode”-
Push to Git
Commit your project and push it to GitHub or GitLab.
-
Create a Web Service
From the seenode Dashboard, create a new Web Service and connect the Git repository for your FastAPI application.
-
Configure Build & Start
seenode automatically detects a Python project. Configure the build and start commands:
- Build Command: pip install -r requirements.txt
- Start Command: uvicorn main:app --host 0.0.0.0 --port ${PORT:-80}
- Build Command:
-
Choose Pricing Tier
Select your preferred instance size and click Create Web Service.
-
Deploy
Click Create Web Service and watch logs until your web service is live.
-
Success
Once complete, your API will be live and accessible at your service’s public URL.
Starting from Scratch?
Section titled “Starting from Scratch?”If you don’t have a FastAPI project yet:
Option 1: Use our Template (Recommended)
FastAPI Template
Deploy a minimal FastAPI application designed for zero-configuration deployment on **seenode**.Option 2: Create from FastAPI Docs + seenode Setup
Follow the official FastAPI documentation to create a new project, then return here for seenode-specific deployment steps.
seenode-Specific Setup Steps:
- Create
main.pywith FastAPI app - Add
requirements.txtwith FastAPI and Uvicorn - No additional configuration needed
Next Steps
Section titled “Next Steps”Now that your API is live, here are some recommended next steps:
Set up a Custom Domain (Coming Soon)
Configure a custom domain to point to your new web service.Connect to a Database
Instantly scaffold and connect PostgreSQL and MySQL databases