Docs/Zurvan/Self-Hosting
Deployment & Operations6 min read

Self-Hosting, Memory DB & Private Cloud Setup

Deploy VynTech Zurvan on your own servers, CI/CD pipelines, virtual machines, or Kubernetes clusters. Choose from In-Memory RAM Mode, Local SQLite WAL, or Clustered PostgreSQL with zero vendor lock-in.

Tri-Engine Storage Architecture

VynTech Zurvan features a versatile 3-tier database abstraction layer engineered for pure flexibility:

1. In-Memory (RAM Only)

Ephemeral / CI

Shared-memory SQLite (:memory:) with zero disk I/O. Ideal for fast automated testing, ephemeral CI/CD pipelines, demo sandboxes, and stateless runners.

go run cmd/server/main.go -db :memory:

2. Local SQLite (WAL)

Zero CGO

Pure Go embedded SQLite (modernc.org/sqlite). Zero CGO, tuned WAL mode, automatic background checkpointing, and single-file simplicity.

go run cmd/server/main.go -db ./data/zurvan.db

3. PostgreSQL (HA)

Enterprise Scale

High-availability connection pooling via DATABASE_URL with automatic parameter query adaptation ($1 rebind) for large multi-tenant teams.

DATABASE_URL="postgres://..."

In-Memory Database Mode (:memory:)

When running Zurvan in test environments or automated CI workflows, you can boot the entire backend in RAM mode using the shared in-memory URI:

Running In-Memory Database
💡

Shared In-Memory Connection Pool: Zurvan automatically configures file:zurvan_shared_memory?mode=memory&cache=shared with persistent idle connection holding so that table schemas and migrations remain intact across concurrent HTTP requests without touching the filesystem.

Docker Compose Quickstart

Spin up both the Go backend and Next.js frontend with isolated volume persistence using Docker Compose:

docker-compose.yml

Configuration & Environment Variables

VariableDefaultDescription
PORT8080HTTP server listening port.
DB_TYPEsqliteDatabase engine: sqlite or pgsql.
DB_PATHzurvan.dbFile path for local SQLite or :memory: for in-RAM mode.
DATABASE_URL-Standard PostgreSQL connection string (auto-detects pgsql).
JWT_SECRETdev-secretHMAC-SHA256 secret for signing local access tokens.
CORS_ALLOWED_ORIGINS*Comma-separated list of allowed frontend origins.
BEHIND_PROXYfalseEnables trusted reverse proxy headers (e.g. Nginx, Cloudflare, Traefik).

Production Dockerfile

The backend builds into a lean distroless container under 25MB:

Dockerfile (Multi-Stage Distroless)

Diagnostic Database Health Check

Before launching your service, run a one-off diagnostic check of database latency, schema migration status, and pool connectivity across any engine:

Terminal Health Check

We use cookies and similar technologies to measure traffic and improve the site. You can choose which categories to allow. Manage Preferences.