Export your code
Before you can deploy anywhere, you need the generated source. You can export as a ZIP or push to GitHub (which gives you a cleaner workflow for ongoing updates).
1
Open Project Settings → Export
Click the project name in the left rail → Settings → Export.
2
Choose format
Select 'ZIP download' for a one-time snapshot, or 'GitHub push' to export to a connected repository (see the GitHub Sync guide first).
3
Download
The ZIP contains the React frontend, FastAPI backend, database migration files, a Dockerfile, and a docker-compose.yml for local development.
The exported structure looks like this:
tree
my-project/
├── frontend/ # React + Vite app
│ ├── src/
│ └── package.json
├── backend/ # FastAPI app
│ ├── app/
│ ├── migrations/
│ └── requirements.txt
├── Dockerfile
├── docker-compose.yml
└── .env.example
💡Tip.Copy .env.example to .env and fill in the values before deploying. The file lists every environment variable the app needs.
VPS (any provider)
Any Linux VPS with Docker installed (DigitalOcean, Hetzner, Linode, OVH, etc.) works. This is the quickest self-hosted path.
1
Copy the code to the server
SCP the ZIP, or clone from GitHub if you pushed there.
2
Fill in environment variables
Copy .env.example to .env and add your database URL, secret key, and any third-party API keys.
3
Build and start with Docker Compose
bash
# On the server
docker compose up -d --build
Docker Compose starts the frontend, backend, and a Postgres container. The frontend is served on port 3000, the backend API on port 8000.
4
Set up a reverse proxy
Use Caddy or nginx to handle SSL and route traffic. Caddy is the simplest — it provisions Let's Encrypt certificates automatically.
Caddyfile
yourdomain.com {
reverse_proxy localhost:3000
}
api.yourdomain.com {
reverse_proxy localhost:8000
}AWS
The recommended AWS pattern is: Elastic Container Registry (ECR) for the image, Elastic Container Service (ECS) with Fargate for running it, and RDS for the database.
1
Build and push the image to ECR
bash
# Authenticate
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 123456789.dkr.ecr.eu-west-1.amazonaws.com
# Build and push
docker build -t my-project .
docker tag my-project:latest 123456789.dkr.ecr.eu-west-1.amazonaws.com/my-project:latest
docker push 123456789.dkr.ecr.eu-west-1.amazonaws.com/my-project:latest
2
Create an ECS cluster and service
In the AWS Console, create a new ECS cluster (Fargate), define a task using the ECR image, and create a service. Set the CPU to 0.5 vCPU and memory to 1 GB for a small app.
3
Provision an RDS Postgres instance
Create a db.t3.micro RDS instance in the same VPC. Copy the connection string into your ECS task's environment variables.
4
Add an Application Load Balancer
Route HTTPS traffic to the ECS service. Use AWS Certificate Manager for a free SSL certificate on your domain.
ℹNote.For GCC region deployments, use the me-south-1 (Bahrain) or me-central-1 (UAE) region to keep data within the GCC. Contact us if you need help with sovereignty requirements.
Custom domain
Regardless of hosting provider, the steps to attach a custom domain are the same:
1
Buy or use an existing domain
Point the DNS A record (or CNAME for subdomains) to your server or load balancer IP.
2
Configure SSL
Use your provider's managed SSL (ACM on AWS, Azure-managed cert, GCP-managed cert), or Caddy / Certbot on a VPS for automatic Let's Encrypt.
3
Update CORS and cookie settings
Set the ALLOWED_ORIGINS environment variable in the backend to your production domain, and update FRONTEND_URL in the .env.
4
Test
Visit your domain in a fresh browser session. Check that login, API calls, and any third-party integrations work correctly.
💡Tip.You can also set a custom domain on Myndlab's managed hosting (without exporting) from Project Settings → Domain. This is the fastest option if you don't need a specific cloud provider.