🚧 This page is still under construction.

Infrastructure

If your product starts to get a lot of traffic then you may need to scale your infrastructure…

Our current deployment platform (Vercel) has been great for us so far, but bills can get expensive when we scale.

The next step is to move to your own infrastructure.

Don’t even think about this until you have a serious amount of traffic.

Self-Hosting Options

If you want to scale while maintaining cost efficiency, self-hosting is the way to go.

What does that mean?

  • You deploy your own web server, database server, configure your own SSL certificates, application proxy, etc.
  • You’ll be responsible for the hardware and infrastructure.
  • You’ll be responsible for the maintenance and updates.
  • You’ll be responsible for the security.

Fear not, we know some foolproof ways to do this:

  1. Bare Metal VPS Setup ($200/month)

  2. Global Bare Metal Servers

    • Latitude.sh - Enterprise-grade infrastructure with:
      • 23 global edge locations across 5 continents
      • API, CLI, and SDKs for automation
      • Terraform provider for Infrastructure as Code
      • DDoS protection included
      • Ideal for AI/ML workloads and high-performance computing
  3. Containerized Deployment Options

    • Coolify - Self-hosting platform for easy deployment
    • Dokploy - Simplified VPS deployment solution
  4. Self-Hosted Database Solutions

    • Self-hosted Supabase ($3/month) - Complete guide to self-host Supabase on a budget:
      • Full Postgres database functionality
      • Real-time subscriptions
      • Auto-generated APIs
      • Dashboard interface

Docker Log Management

To prevent Docker logs from consuming excessive disk space, configure log rotation limits:

  1. Create/edit /etc/docker/daemon.json:
{
  "log-driver": "local",
  "log-opts": {
    "max-size": "20m",
    "max-file": "3"
  }
}
  1. Restart Docker daemon:
sudo systemctl restart docker
  1. Recreate containers to apply new config:
docker compose up -d --force-recreate

The “local” log driver is optimized for disk usage and performance with automatic size limits and rotation, preventing logs from consuming your entire disk space.

Professional Support Services

If you need additional expertise:

Self-hosting can offer significant cost savings compared to cloud services, but requires more hands-on management and infrastructure knowledge.