SupaScale 12-Container Supabase Docker Workbench Emblem SupaScale 12-Container Docker
  • 12-Container Workbench
  • Blueprints (8)
  • Comparisons (4)
  • Methodology
  • About
  • Contact
  • VI // TIẾNG VIỆT
    BP-01 // 12-SERVICE COMPOSE RAM MODEL // SUPASCALE BLUEPRINT

    Self-Hosted Supabase Docker RAM: 12-Service Audit — SupaScale Docker Guide

    SupaScale explains why an untouched git clone of supabase/docker reserves over 4.3 GB of RAM before serving user traffic — and how we cap container memory cleanly.

    SupaScale minimum floor: 8 GB RAM • Sweet-spot tier: 16 GB RAM (Public vendor rates retrieved 2026-11-12).

    SupaScale Deterministic OOM Risk Analysis:

    Three Erlang/BEAM + Lua runtimes (Logflare + Vector ~1.52 GB, Kong Nginx/Lua ~440 MB, Realtime + Supavisor ~730 MB) reserve ~2.7 GB before PostgreSQL even allocates shared_buffers. On a 2 GB or 4 GB VPS, Linux oom-killer terminates postgres pid 1 during autovacuum.

    SupaScale Self-Hosted Supabase Docker RAM: 12-Service Audit Self-Hosted Supabase Docker Architecture Diagram
    SupaScale deterministic container topology for Self-Hosted Supabase Docker RAM: 12-Service Audit.

    SupaScale Deterministic Memory Model Table: Self-Hosted Supabase Docker RAM: 12-Service Audit

    Supabase Docker Subsystem Baseline Idle Reserve 50K MAU Projected Reserve Memory Role
    Logflare + Vector Analytics (BEAM + Rust) 1,520 MB 1,700 MB OOM Culprit #1
    PostgreSQL 15 + pgvector (Core DB) 540 MB 1,620 MB Core ACID + Cache
    ImgProxy (Go + libvips WebP Arena) 70 MB 670 MB cap Burst Spike #2
    Kong + Supavisor + Realtime + GoTrue + REST 1,420 MB 2,120 MB Gateway & Pool

    SupaScale docker-compose.override.yml — Deterministic Memory Guards

    services:
      db:
        mem_limit: 4096m
        command:
          - postgres
          - -c
          - shared_buffers=1536MB
          - -c
          - effective_cache_size=4608MB
          - -c
          - work_mem=16MB
      analytics:
        mem_limit: 1536m
        environment:
          ERL_FLAGS: "+MBas aobf +MBlmbcs 512"
      imgproxy:
        mem_limit: 768m
        environment:
          IMGPROXY_CONCURRENCY: "4"
          MALLOC_ARENA_MAX: "2"
      kong:
        mem_limit: 640m
        environment:
          KONG_NGINX_WORKER_PROCESSES: "2"

    Load "Self-Hosted Supabase Docker RAM: 12-Service Audit" Preset in SupaScale 12-Container Workbench →

    1. SupaScale Audit: Why Outdated 2GB VPS Guides Crash Modern Supabase Docker

    Older community guides often claim self-hosted Supabase fits on a $4 2 GB cloud droplet. That assumption held in 2022 when Supabase shipped 6 lightweight containers. Today, upstream supabase/docker orchestrates 12 logical services (13 containers) including three Elixir/Erlang BEAM clusters (Supavisor, Realtime, and Logflare) plus Rust Vector and OpenResty Kong. In our deterministic SupaScale sizing model, we sum those baseline runtime heaps to ~4.35 GB before user load even begins.

    2. SupaScale Formula for Sizing PostgreSQL shared_buffers Beside 11 Sidecars

    Textbook PostgreSQL documentation suggests assigning 25% of total host RAM to shared_buffers. On a single-node Supabase Docker server, we subtract active sidecar reservations first: on an 8 GB Hostinger KVM 2 running all 12 services, cap PostgreSQL shared_buffers at 1,536 MB. Stepping up to a 16 GB KVM 4 node unlocks 4,096 MB of shared_buffers plus ~6 GB of Linux filesystem page cache.

    3. SupaScale Worker Caps for Kong LuaJIT and Deno Edge Runtime

    By default, Kong spawns one OpenResty Nginx worker per visible vCPU core, duplicating LuaJIT schema caches in memory. We recommend setting KONG_NGINX_WORKER_PROCESSES=2 in your Compose override to trim Kong RAM by ~35% on 4-to-8 vCPU hosts.

    SupaScale Matched KVM & VDS Tiers for Self-Hosted Supabase Docker RAM: 12-Service Audit

    SUPASCALE PRIMARY MATCH

    Hostinger KVM NVMe VPS (1-Click Docker / Coolify + Supabase) — SupaScale

    From $4.99/mo (~127k)

    12–24 mo KVM 2 (8GB) or KVM 4 (16GB) locks lowest rate + stacks Extra 20% partner discount.

    Check Hostinger KVM VPS Specs for Self-Hosted Supabase Docker RAM: 12-Service Audit on SupaScale →
    SUPASCALE RUNNER-UP

    Vultr 3.5GHz+ High Frequency NVMe (Low-Latency pgvector & Realtime) — SupaScale

    From $24/mo (~612k)

    Hourly billing lets you benchmark HNSW pgvector recall on 16GB/32GB HF nodes for cents.

    Compare Vultr High Frequency Options for Self-Hosted Supabase Docker RAM: 12-Service Audit on SupaScale →

    SupaScale rate citation: Public vendor tariffs retrieved 2026-11-12; promotional and renewal prices change — verify exact checkout pricing before ordering.

    SupaScale Engineering FAQ: Self-Hosted Supabase Docker RAM: 12-Service Audit

    Why does SupaScale advise against running full 12-service Supabase Docker on a 4 GB VPS with swap?

    Swap prevents an instant kernel panic, but Erlang BEAM garbage collection inside Logflare and Supavisor scans heap pages continuously, causing persistent SSD swap thrashing and >800 ms API tail latency. Upgrading to an 8 GB KVM 2 ($5.99/mo public promo) or disabling Logflare in Slim Mode is far more reliable.

    Which Supabase Docker container reserves the most baseline RAM in the SupaScale model?

    Logflare + Vector Analytics (#12 in the SupaScale toggle grid) reserves ~1.52 GB at idle, followed by PostgreSQL 15 + pgvector and Kong API Gateway (~440 MB).

    How does SupaScale account for idle Supabase Studio memory in Docker Compose?

    The Next.js Node server inside supabase-studio holds ~260 MB of baseline memory so Table Editor and SQL Editor respond immediately, which our SupaScale model includes whenever tile #10 is checked.