Quick Start
Fastest way to run Testiment, including prerequisites and deployment options.
Prerequisites
- Docker Engine 24+ and Docker Compose v2
- 2 vCPU / 4 GB RAM / 40 GB SSD recommended baseline
- Linux VPS (Ubuntu 22.04+ recommended) or local machine with Docker Desktop
- Domain + reverse proxy for production (
80/443)
Security baseline:
- Expose only
80/443publicly - Keep
3000,3001, and5432private - Use a strong
BETTER_AUTH_SECRET
If you plan to use the built-in Caddy production setup, create your DNS record before starting the stack and wait until it resolves from public resolvers.
Want the fast path instead of following the manual steps below? Run:
./scripts/setup.shThe install wizard handles env files, secrets, domains, Caddy, and Docker startup for a terminal-only VPS setup.
Clone Repository
git clone https://github.com/redpangilinan/testiment
cd testimentCreate Env Files
cp .env.example .env
cp apps/server/.env.example apps/server/.env
cp apps/web/.env.example apps/web/.envConfigure App Env
Root .env is Docker-only (ports, database mode, and bundled Postgres config).
App settings belong in:
apps/server/.envapps/web/.env
For production, set these explicitly:
DATABASE_URL
BETTER_AUTH_SECRET
NEXT_PUBLIC_APP_URL
NEXT_PUBLIC_SERVER_URL
BETTER_AUTH_URL
CORS_ORIGINS
ENABLE_PAYMENTS (false)For the supported Caddy deployment, set these to the same public origin:
NEXT_PUBLIC_APP_URL=https://app.example.com
NEXT_PUBLIC_SERVER_URL=https://app.example.com
BETTER_AUTH_URL=https://app.example.com
CORS_ORIGINS=https://app.example.comOptional but recommended for security:
CAPTURE_SUBMIT_TOKEN_SECRET
UPSTASH_REDIS_REST_URL
UPSTASH_REDIS_REST_TOKEN
TURNSTILE_SITE_KEY
TURNSTILE_SECRET_KEYOptional Google OAuth:
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
NEXT_PUBLIC_GOOGLE_AUTH_ENABLED=trueStart Stack
Prebuilt images:
docker compose up -dIf you use an external PostgreSQL provider:
docker compose -f docker-compose.external-db.yml up -dProduction with built-in Caddy:
docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -dBefore using the built-in Caddy setup, confirm public DNS propagation:
dig @1.1.1.1 +short app.example.comThe command should return your VPS public IP before you bring up the HTTPS stack.
Production with built-in Caddy and external PostgreSQL:
docker compose -f docker-compose.external-db.yml -f docker-compose.caddy.yml up -dValidate Deployment
./scripts/healthcheck.shIf you need live logs while debugging:
docker compose logs -f server
docker compose logs -f webSchema migrations run automatically through the migrate service before server starts.