Installation & Configuration
This guide covers all configuration options for Nodebyte. Every setting is controlled through environment variables, set in your .env file or passed directly to Docker Compose.
Prerequisites
Section titled “Prerequisites”- Docker Engine 24+ with the Compose plugin
- At least 2 GB of available RAM
- Ports 3000, 8000, and 5432 available (or configure alternatives)
Backend Environment Variables
Section titled “Backend Environment Variables”| Variable | Description | Default |
|---|---|---|
DATABASE_URL | PostgreSQL connection string | (set by docker-compose) |
JWT_SECRET | Secret key for signing JWTs — change in production | (required) |
JWT_ISSUER | Issuer claim in JWTs | nodebyte |
ACCESS_TOKEN_EXPIRES_MINUTES | Access token lifetime in minutes | 15 |
REFRESH_TOKEN_EXPIRES_DAYS | Refresh token lifetime in days | 30 |
COOKIE_SECURE | Set true when serving over HTTPS | false |
COOKIE_SAMESITE | SameSite cookie policy (lax, strict, none) | lax |
FRONTEND_ORIGIN | Allowed CORS origin for the frontend | http://localhost:3000 |
REGISTRATION_ENABLED | Allow public user registration (false = invite-only) | true |
TURNSTILE_ENABLED | Enable Cloudflare Turnstile bot protection | true |
TURNSTILE_SECRET_KEY | Turnstile server-side secret key | (test key) |
NODEBYTE_ENV | Environment name (dev or production) | dev |
Frontend Environment Variables
Section titled “Frontend Environment Variables”| Variable | Description | Default |
|---|---|---|
NODE_ENV | Set to production for optimized builds | development |
NEXT_PUBLIC_API_BASE_URL | Backend API URL (used client-side) | http://localhost:8000 |
NEXT_PUBLIC_TURNSTILE_SITE_KEY | Turnstile client-side site key | (test key) |
NEXT_PUBLIC_EDITION | Landing page variant: cloud or oss | cloud |
Docker Compose Environment Variables
Section titled “Docker Compose Environment Variables”| Variable | Description | Default |
|---|---|---|
POSTGRES_DB | Database name | nodebyte |
POSTGRES_USER | Database user | nodebyte |
POSTGRES_PASSWORD | Database password — change in production | changeme |
POSTGRES_PORT | Host port for PostgreSQL | 5432 |
Cloudflare Turnstile
Section titled “Cloudflare Turnstile”Nodebyte supports Cloudflare Turnstile as an optional bot protection layer on the registration page.
For development, test keys are built in — Turnstile renders an invisible widget that always passes. No configuration needed.
For production, get real keys from the Cloudflare dashboard:
- Set
TURNSTILE_ENABLED=true - Set
TURNSTILE_SECRET_KEYto your server-side secret - Set
NEXT_PUBLIC_TURNSTILE_SITE_KEYto your client-side site key
To disable Turnstile entirely, set TURNSTILE_ENABLED=false.
Database Migrations
Section titled “Database Migrations”Nodebyte uses Alembic for database schema migrations. Migrations run automatically on container startup.
To create a new migration after modifying models:
docker compose exec backend alembic revision --autogenerate -m "description"docker compose exec backend alembic upgrade headNext Steps
Section titled “Next Steps”- Quickstart — get running in 5 minutes
- Deploy to Production — production hardening checklist