๐ Self-Host Guide โ OmniRoute (้ถๆ่ดน่ชๆ็ฎก / zero-fee self-host)
๐ Self-Host Guide โ OmniRoute
์น์ ์ ๋ชฉ: โ๐ Self-Host Guide โ OmniRouteโTL;DR โ three commands, one local endpoint, zero monthly fees. No SaaS billing, no multi-tenant isolation, no hosted prompt-processing hop. Your prompts go straight to the provider you pick.
cp .env.selfhost.example .env # then edit the 2 lines marked "EDIT ME"docker compose -f docker-compose.selfhost.yml up -dopen http://127.0.0.1:20128This is the self-host carrier for OmniRouteโs โ้ถๆ่ดน + ่ชๆ็ฎกโ product form: a packaged container/binary you run on your own machine in 5 minutes.
Why this guide exists
์น์ ์ ๋ชฉ: โWhy this guide existsโOmniRoute ships a sophisticated docker-compose.yml with profiles
(base, web, cli, host, cliproxyapi, memory, bifrost). Each app
service is profile-gated, so a bare docker compose up -d only starts Redis.
That is correct for power users who pick a profile โ but it is not a
5-minute self-host story.
docker-compose.selfhost.yml is the KISS overlay: one command, published
image, loopback-only, Redis included, no profile choice, no build step.
When you outgrow it, graduate to the full
DOCKER_GUIDE profiles.
| Audience | Start here | Graduate to |
|---|---|---|
| Self-hoster, single user | this guide | โ |
| Power user, CLI tools / web-cookie providers / sidecars | โ | docker-compose.yml profiles |
Prerequisites
์น์ ์ ๋ชฉ: โPrerequisitesโ- Docker Engine 24+ (or Docker Desktop 4.30+) with the Compose v2 plugin.
- ~2 GB RAM free (see Sizing).
- A provider API key from any supported provider (OpenAI, Anthropic, Google, or one of the 150+ free tiers).
No build toolchain, no Node, no git clone required โ the image is pulled.
Step 1 โ Configure (1 min)
์น์ ์ ๋ชฉ: โStep 1 โ Configure (1 min)โcp .env.selfhost.example .envEdit exactly two lines in .env:
REQUIRE_API_KEY=true # was false โ lock the endpoint downAPP_BIND_HOST=127.0.0.1 # keep loopback; see "Exposing" only if neededREQUIRE_API_KEY=true makes every /v1 request and the dashboard require an
API key / login. On first boot the dashboard auto-generates an
INITIAL_PASSWORD โ read it from the logs:
docker logs omniroute | grep -i passwordThe other variables (DASHBOARD_PORT, API_PORT, LIVE_WS_PORT,
OMNIROUTE_MEMORY_MB) already have sane defaults. Leave them unless you know
you need to change them.
Step 2 โ Start (1 min)
์น์ ์ ๋ชฉ: โStep 2 โ Start (1 min)โdocker compose -f docker-compose.selfhost.yml up -dPulls diegosouzapw/omniroute:latest (multi-arch AMD64 + ARM64, ~250 MB) and
redis:8.6.5-alpine, starts both, and waits for Redis to be healthy before
the app boots.
Step 3 โ Verify (30 s)
์น์ ์ ๋ชฉ: โStep 3 โ Verify (30 s)โ# process lifecycle + readinesscurl -fsS http://127.0.0.1:20128/healthz && echo
# container healthdocker inspect --format '{{.State.Health.Status}}' omnirouteYou should see {"status":"ok"} and healthy. Then open the dashboard:
http://127.0.0.1:20128Within ~300 s of up -d the endpoint is locally reachable and the healthcheck
is healthy โ the acceptance bar from the self-host issue.
| Port | What | Default bind |
|---|---|---|
20128 |
Dashboard + /v1 LLM proxy (unified entry) |
127.0.0.1 |
20129 |
API port (server-to-server) | 127.0.0.1 |
20132 |
Live WebSocket (realtime dashboard updates) | 127.0.0.1 |
All three bind to loopback only by default. Redis is not published to
the host at all โ the app reaches it over the compose network. This is
deliberate: shipping an unauthenticated Redis on 0.0.0.0 is a footgun.
Connecting a provider
์น์ ์ ๋ชฉ: โConnecting a providerโ- Open the dashboard โ Providers.
- Add a provider and paste its API key. Keys are encrypted at rest with AES-256-GCM; the cleartext never leaves your machine.
- Point your IDE / agent at the unified entry:
http://127.0.0.1:20128/v1For provider choice, see the
Free Tiers Guide โ OmniRoute aggregates 150+ free
tiers into one endpoint, so you can run model: "auto" to pick the best free
option per request.
Sizing the container
์น์ ์ ๋ชฉ: โSizing the containerโThe image pins OMNIROUTE_MEMORY_MB=1024. That is enough for the dashboard
and light chat. Coding agents (POST /v1/responses from Claude Code,
Codex, Grok, โฆ) retain multiple large context graphs during compression and
can abort V8 at ~12 GiB old-space under two overlapping long contexts
(#7849).
.env.selfhost.example defaults to OMNIROUTE_MEMORY_MB=2048 โ a safe floor
for a single user running coding agents. Raise it if you fan out many models
in parallel (fusion combos) or hit FATAL ERROR: Reached heap limit:
OMNIROUTE_MEMORY_MB=4096Memory is a V8 heap ceiling; native buffers (SQLite, ONNX, better-sqlite3) sit outside it, so size the container a few hundred MB above the heap.
Local binary build (optional)
์น์ ์ ๋ชฉ: โLocal binary build (optional)โPrefer a binary over Docker? The npm package is the same code:
npm install -g omnirouteomnirouteThis runs the Next.js standalone server directly on your host โ same ports,
same DATA_DIR (./data by default). Use it when you cannot run Docker
(e.g. a locked-down VM). The container path above is the recommended default
because it bundles the exact runtime the image was tested with.
From source (development only โ not a deploy path):
git clone https://github.com/diegosouzapw/OmniRoute.gitcd OmniRoutenpm installnpm run build && npm startExposing beyond localhost
์น์ ์ ๋ชฉ: โExposing beyond localhostโDo not flip APP_BIND_HOST=0.0.0.0 while REQUIRE_API_KEY=false. That
publishes an open /v1 proxy on every LAN/WAN interface โ anyone on the
network can burn your provider quotas. The order is fixed:
- Set
REQUIRE_API_KEY=truein.env. - Read
INITIAL_PASSWORDfrom the logs and log in. - Only then set
APP_BIND_HOST=0.0.0.0(or put an auth-enforcing reverse proxy in front and keep loopback).
For TLS / a domain, run Caddy or Traefik in front and leave APP_BIND_HOST
at 127.0.0.1. See the
DOCKER_GUIDE โ Caddy HTTPS
and
Cloudflare Quick Tunnel
sections for copy-paste reverse-proxy configs.
Data, backups, and resets
์น์ ์ ๋ชฉ: โData, backups, and resetsโ- Data dir:
./data(bind-mounted to/app/data). All SQLite DBs, migrations, audit trail, and encrypted provider keys live here. - Backups: SQLite auto-backup is on by default
(
DISABLE_SQLITE_AUTO_BACKUPis unset โ enabled). For a manual snapshot:Restore withํฐ๋ฏธ๋ ์ฐฝ ./bin/snapshot-data.sh./bin/restore-data.sh. - Reset the dashboard password:
ํฐ๋ฏธ๋ ์ฐฝ docker exec -it omniroute node bin/reset-password.mjs - Reset policies (routing/failover/quota to factory defaults):
ํฐ๋ฏธ๋ ์ฐฝ docker exec -it omniroute node bin/restore-policies.sh
Common issues
์น์ ์ ๋ชฉ: โCommon issuesโdocker compose up only starts Redis
You are running the full docker-compose.yml, whose app services are
profile-gated. For the one-command path use the self-host file:
docker compose -f docker-compose.selfhost.yml up -dOr, with the full compose, pick a profile:
docker compose --profile base up -d.
Healthcheck stays starting / unhealthy
- Check Redis is up:
docker inspect --format '{{.State.Health.Status}}' omniroute-redis - Check app logs:
docker logs omniroute - The healthcheck probes
/healthzand allows a 20 s start period. A slow first boot (cold migrations) can take longer โ bumpstart_periodin the compose file if your disk is slow.
FATAL ERROR: Reached heap limit under coding agents
Raise OMNIROUTE_MEMORY_MB in .env (e.g. 4096), then
docker compose -f docker-compose.selfhost.yml up -d. See
Sizing the container.
Web-cookie providers (Gemini Web, Claude Turnstile) fail with
Executable doesn't exist at .../ms-playwright/chromium
The base image ships without Chromium. The self-host compose uses the
published base image. For web-cookie providers, switch to the full compose
with the web profile (which bundles Playwright/Chromium):
docker compose --profile web up -dPort 20128 already in use
Set DASHBOARD_PORT, API_PORT, LIVE_WS_PORT in .env to free ports and
re-run up -d.
What this deliberately is NOT
์น์ ์ ๋ชฉ: โWhat this deliberately is NOTโPer the self-host KISS constraint, this path does not include:
- โ SaaS billing / metering / plan tiers
- โ Multi-tenant isolation / per-tenant namespaces
- โ A hosted prompt-processing hop (your prompts go straight to the provider)
- โ Any baked-in credentials or secrets
It is a pure local self-host carrier โ the simplest thing that makes the โ้ถๆ่ดน + ่ชๆ็ฎกโ promise real.
Security checklist (self-host)
์น์ ์ ๋ชฉ: โSecurity checklist (self-host)โBefore you expose beyond loopback:
-
REQUIRE_API_KEY=truein.env -
INITIAL_PASSWORDrotated to a strong, unique value -
APP_BIND_HOSTleft at127.0.0.1unless behind an auth-enforcing proxy - TLS terminated by Caddy/Traefik/Cloudflare in front (never plain HTTP on WAN)
- Redis not published to the host (the self-host compose already enforces this)
-
./datavolume backed up regularly (bin/snapshot-data.sh) - Provider keys rotated per the providerโs own policy
For the full supply-chain / image / dependency audit dimension, see SECURITY.md and SUPPLY_CHAIN.
Related
์น์ ์ ๋ชฉ: โRelatedโ- Docker Guide โ profiles, Caddy HTTPS, tunnels, image tags
- Quick Start โ 3-minute path for first-time users
- Free Tiers Guide โ 150+ free provider tiers
- Providers Guide โ connecting and configuring providers
- Troubleshooting โ deeper issue resolution
HagiCode
HagiCode๋ ์์ด์ ํธ ์ฝ๋ฉ ์์ ๊ณต๊ฐ์ ๋๋ค. ํ๋ถํ๊ณ ํธ๋ฆฌํ UI ์ํธ์์ฉ์ผ๋ก ๊ณํ ์๋ฆฝ, ์์ด์ ํธ ์คํ, ํ๋ก์ ํธ ์์ ์ ์ฝ๊ฒ ์์ํ๊ณ ๋ฐ๋ผ๊ฐ๋ฉฐ ๊ฐ๋ฐ์ ๋ ํฅ๋ฏธ๋ก์ด ๊ฒฝํ์ผ๋ก ๋ง๋ญ๋๋ค.
ํ๋ถํ๊ณ ํธ๋ฆฌํ UI ์ํธ์์ฉ์ผ๋ก ๊ณํ๋ถํฐ ํ๋ก์ ํธ ์์ ๊น์ง ์ฝ๊ฒ ๋ฐ๋ผ๊ฐ ์ ์์ต๋๋ค.
- ์ค๋งํธOpenSpec ์ํฌํ๋ก๋ ์๋๋ฅผ ์ ์, ์ค๊ณ, ์์ ์ ๊ฑฐ์ณ ๋ฐฐํฌ๊น์ง ์ด์ด์ง๋ ์คํ ๊ฐ๋ฅํ ๊ฒฝ๋ก๋ก ๋ฐ๊ฟ๋๋ค.
- ํจ์จ์ ๋ค์ค ์์ด์ ํธ ์คํ์ผ๋ก ์กฐ์ฌ, ๊ตฌํ, ๊ฒํ ๋ฅผ ๋ณ๋ ฌ๋ก ์งํํ๋ฉฐ ์ฌ๋ฌ ์ ์ฅ์์ ์ต์ํ Agent CLI๋ฅผ ์ง์ํฉ๋๋ค.
- ํฅ๋ฏธ๋ก์ดํ๋ถํ๊ณ ํธ๋ฆฌํ UI ์ํธ์์ฉ์ผ๋ก ๊ณํ ์๋ฆฝ, ์์ด์ ํธ ์คํ, ํ๋ก์ ํธ ์์ ์ ์ฝ๊ฒ ์์ํ๊ณ ๋ฐ๋ผ๊ฐ ์ ์์ต๋๋ค.
Windows์ฉ ๋ค์ด๋ก๋
HagiCode ๊ณต์
์์ด๋์ด๋ฅผ ์ค์ ๋ก ๋ฐฐํฌ๋๋ ์ํํธ์จ์ด๋ก.
HagiCode๋ ์์ด์ ํธ ์ฝ๋ฉ ์์ ๊ณต๊ฐ์ ๋๋ค. OpenSpec ์ํฌํ๋ก๋ก ๋ณ๊ฒฝ์ ๊ณํํ๊ณ , ๋ค์ค ์์ด์ ํธ ์คํ์ผ๋ก ์งํํ๋ฉฐ, Hero Scenario๋ก ๊ธด ์์ ์ ์งํ ์ํฉ์ ํ๋์ ๋ณด์ฌ ์์ด๋์ด๋ฅผ ์ค์ ๋ก ๋ฐฐํฌ๋๋ ์ํํธ์จ์ด๋ก ๋ง๋ญ๋๋ค.
- ์ค๋งํธ
- OpenSpec ์ํฌํ๋ก๋ ์๋๋ฅผ ์ ์๋ถํฐ ๋ฐฐํฌ๊น์ง ์ด์ด์ง๋ ์คํ ๊ฐ๋ฅํ ๊ฒฝ๋ก๋ก ๋ฐ๊ฟ๋๋ค.
- ํจ์จ์
- ๋ค์ค ์์ด์ ํธ ์คํ์ผ๋ก ์กฐ์ฌ, ๊ตฌํ, ๊ฒํ ๋ฅผ ๋ณ๋ ฌ๋ก ์งํํฉ๋๋ค.
- ์ฆ๊ฑฐ์ด
- ํธ๋ฆฌํ UI ์ํธ์์ฉ์ผ๋ก ๊ณํ, ์์ด์ ํธ ์คํ, ํ๋ก์ ํธ ์์ ์ ์ฝ๊ฒ ๋ฐ๋ผ๊ฐ ์ ์์ต๋๋ค.
ยฉ 2026 HagiCode | Powered By hagilight-starlight@0.21.0 | Branch: main | Commit: de60bcd | Built:

