Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    One-Box Server: Several Apps + Self-Hosted Supabase on 1 VPS

    1

    When every small app needs its own hosting project and its own database project, the bills grow with the number of apps, not the traffic.

    Free

    Security scanned
    One-Box Server: Several Apps + Self-Hosted Supabase on 1 VPS

    One-Box Server: Several Apps + Self-Hosted Supabase on 1 VPS

    Example session with this skill installed

    앱 세 개를 서버 한 대로 옮겨줘. 지금은 호스팅 프로젝트 셋, DB 프로젝트 셋이야. (Move my three apps onto one server; today each has its own hosting and DB project.)

    • Read your context and instructions
    • Compiled the one-box server

    Summary

    First turn is a plan only. Nothing has been run on a server yet. It checks fit, fixes the values, and lays out the order; every step after this waits for your yes.

    Fit check

    Three low-traffic Next.js apps, each with Postgres + storage, no Realtime or Edge Functions, and you can answer alert mails -> fits. If one app later needs zero downtime or a second region, move that one back out.

    Values to confirm (examples, replace with yours)

    AppHostPortDB tunnel
    app1app1.example.com301054321
    app2app2.example.com302054322
    app3app3.example.com303054323

    Also: backup bucket, alert address, ssh alias (myserver), server size (4 GB RAM recommended; building Next on the server peaked around 1.5-2.5 GB).

    Order (one step at a time, each confirmed)

    1. Server prep: prep.sh, reboot once.
    2. Per app: clone -> bootstrap-keys.sh (before the first db start) -> push secrets with env-push.sh -> dc <app> up -d --wait db -> bootstrap-db.sh -> storage -> migrations with --dry-run shown first -> rest.
    3. Edge: switch DNS host by host, staging CA for the first run, then caddy-apply.sh.
    4. Deploy each app with deploy.sh; check the public URL returns 200.
    5. Alerts and backups: check.sh --test should mail you; next morning confirm "backup ok", then run restore-drill.sh once.

    Traps I will avoid (from gotchas.md)

    • Cron lines written in host time, because Ubuntu cron ignores CRON_TZ.
    • $ doubled when merging env files, so values like pbkdf2$... are not cut by compose.
    • notify pgrst, 'reload schema' after each migration, or new tables 404 until a restart.
    • Never re-create .env.generated: a new JWT secret logs everyone out and breaks the anon key baked into builds.

    Shall I start with step 1 on myserver?

    Traps I will avoid (from gotchas.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    When every small app needs its own hosting project and its own database project, the bills grow with the number of apps, not the traffic. This skill is the template of a real setup that runs several apps on one VPS, generalised (app1, example.com) and with the mistakes it made written down.

    Fit check first

    It starts by asking what you run today, how many apps and roughly how many visits, then answers in one line whether this fits. It does not fit if you need zero downtime or multiple regions, nobody can answer alert mails, or you rely on Realtime, Edge Functions or a hosted dashboard.

    What you get (templates/)

    • bin/dc — dc <app> <compose args> with fixed project name, folder, env file and compose file.
    • edge/ — one Caddy for TLS and routing of every host. Applied with caddy reload (a bad file is rejected and the old config keeps serving).
    • ops/ — server prep (swap, Docker, firewall, unattended upgrades, timezone), key generation (Postgres password, JWT secret, anon/service JWTs, cron secret), DB bootstrap, env merge, SQL migrations recorded like the Supabase CLI (file and record in one transaction), host-side cron caller, alert mails (one per key per 6 hours, with the count held in between), hourly health check (disk, memory, OOM, containers, certificates, last backup), nightly backup to any S3-compatible bucket, monthly restore drill into a throwaway container, rollback of the app container only.
    • app/ — per-app compose, Dockerfile (Next.js standalone), deploy.sh (clean main, gate, push, build on the server, wait for healthy, fall back to the previous image if it does not come up; stops and lists pending migrations instead of applying them), env-push.sh (only allowed names, refuses if a required one is missing).
    • gotchas.md — 44 traps hit in practice, one line each with the reason. Examples: Ubuntu cron ignores CRON_TZ; compose --env-file cuts values at $; grep -q after a pipe with pipefail turns a match into a failure; PostgREST needs notify pgrst, 'reload schema' after a migration; restarting the Caddy container with a bad file takes every host down.

    Rules it follows on a server

    • Dump before any production DB write, say what will change, wait for an explicit yes.
    • Never print secrets (cat .env, env, docker inspect, compose config are off limits; it checks names only).
    • Touch one app at a time. No edge restarts, no prune -a, no volume deletes.
    • Fix the cause when a check fails; never silence the alert.

    Instructions are in Korean; scripts and comments are in English.

    Source: https://github.com/Stophyuk/solutionzip-skills

    One server means one point of failure: no zero-downtime deploys, no multi-region. Covers Postgres, PostgREST and storage-api (auth optional), not Supabase Realtime, Edge Functions or Studio. Templates assume Next.js standalone. Linux-only scripts (check, backup, prep, caddy-apply, deploy) were syntax-checked, not run end to end on a fresh box; image tags should be checked before installing. Instructions are in Korean.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed today

    • Free with an Agensi account

    Requires

    Resend
    Docker
    Amazonaws
    VPS (Ubuntu 22.04 or 24.04)
    Docker + compose
    Caddy
    S3-compatible bucket for backups
    Resend API key for alert mail
    ssh
    Git

    Permissions

    Terminal / Shell
    Network Access
    Read Files
    Write Files
    Environment Variables

    Allowed Hosts

    download.docker.com
    awscli.amazonaws.com
    api.resend.com
    Listedtoday

    What's inside

    Frequently Asked Questions

    No. Every setup step is shown and confirmed first. Before any production DB write it takes a dump, tells you what will change and waits for an explicit yes. It never prints secrets.

    It covers the database, the REST API (PostgREST) and file storage, with optional auth. Realtime, Edge Functions and the hosted dashboard are not included; the fit check asks about them first.

    deploy.sh waits for the health check and puts the previous image back if the new one does not come up. Rollback replaces only the app container; the database is not rolled back, which is why migrations only add.

    A monthly restore drill loads last night's backup into a throwaway container, runs per-app checks and logs the result. The hourly health check also mails you if the last backup is missing.