Skip to content

Deploy anywhere

Move your Myndlab project off the managed preview and onto your own infrastructure — AWS, Azure, GCP, a bare VPS, or Kubernetes. Every path, step by step.

intermediate

Deploy anywhere

Code & export15 min

Deployment options

Myndlab's managed preview is designed for iteration speed, not production workloads. When your app is ready for real users you have two paths:

  • One-click publish — Myndlab builds a container image and deploys it to a production-grade environment with a managed database, SSL, and autoscaling. Fastest path; you stay on Myndlab infrastructure. Set up a custom domain and go live in minutes.
  • Export and self-host — Download a ZIP of the generated code and deploy it yourself to any cloud or server. Full control; no lock-in.

The rest of this guide covers the self-host path. For one-click publish, see Project Settings → Deploy → Publish.

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. 1

    Open Project Settings → Export

    Click the project name in the left rail → Settings → Export.

  2. 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. 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. 1

    Copy the code to the server

    SCP the ZIP, or clone from GitHub if you pushed there.

  2. 2

    Fill in environment variables

    Copy .env.example to .env and add your database URL, secret key, and any third-party API keys.

  3. 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.

  1. 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. 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
  1. 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.

  2. 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.

  3. 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.

Azure

The recommended Azure pattern is: Azure Container Registry (ACR) + Azure Container Apps + Azure Database for PostgreSQL.

  1. 1

    Push the image to ACR

bash
az acr build --registry myregistry   --image my-project:latest .
  1. 2

    Create a Container App

    In the Azure Portal, create a Container Apps environment, then a Container App pointing to your ACR image. Enable external ingress on port 3000.

  2. 3

    Set environment variables

    Add the DATABASE_URL, SECRET_KEY, and any other .env values in the Container App's environment variables section.

  3. 4

    Provision Azure Database for PostgreSQL

    Use the Flexible Server tier. Place it in the same resource group and virtual network as the Container App.

Tip

Azure Container Apps scales to zero when there's no traffic, which keeps costs low for apps that aren't yet receiving steady traffic.

GCP

The simplest GCP path is Cloud Run (serverless containers) with Cloud SQL for the database.

  1. 1

    Build and push to Artifact Registry

bash
# Configure Docker for GCP
gcloud auth configure-docker europe-west1-docker.pkg.dev

# Build and push
docker build -t europe-west1-docker.pkg.dev/my-project/repo/app:latest .
docker push europe-west1-docker.pkg.dev/my-project/repo/app:latest
  1. 2

    Deploy to Cloud Run

bash
gcloud run deploy my-project   --image europe-west1-docker.pkg.dev/my-project/repo/app:latest   --region europe-west1   --platform managed   --allow-unauthenticated   --set-env-vars DATABASE_URL=postgresql://...
  1. 3

    Connect Cloud SQL

    Create a Cloud SQL Postgres instance and use the Cloud SQL Auth Proxy to connect securely from Cloud Run. Add the connection name in the Cloud Run service configuration.

Custom domain

Regardless of hosting provider, the steps to attach a custom domain are the same:

  1. 1

    Buy or use an existing domain

    Point the DNS A record (or CNAME for subdomains) to your server or load balancer IP.

  2. 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. 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. 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.

Next steps

Back to Guide