Installation Overview
Overview
Synjar Community can be deployed using several methods. This guide covers the recommended deployment options.
CapRover Deployment
CapRover is a self-hosted PaaS that makes deployment simple. Synjar includes a captain-definition file for easy deployment.
Prerequisites
- CapRover instance set up and running
- Domain configured and pointing to CapRover
- PostgreSQL with pgvector extension (can use CapRover One-Click Apps)
Steps
-
Create a new app in CapRover dashboard
-
Set environment variables in CapRover App Configs:
Variable Required Description DATABASE_URLYes PostgreSQL connection string JWT_SECRETYes Random string (min 32 chars) OPENAI_API_KEYYes OpenAI API key for embeddings B2_KEY_IDYes Backblaze B2 key ID B2_APPLICATION_KEYYes Backblaze B2 application key B2_BUCKET_NAMEYes Backblaze B2 bucket name B2_ENDPOINTYes Backblaze B2 endpoint URL PORTNo Default: 6200 NODE_ENVNo Set to production -
Deploy using CLI:
caprover deployOr connect your Git repository for automatic deployments.
-
Enable HTTPS in CapRover dashboard (Let's Encrypt)
-
Run database migrations:
# SSH into container or use CapRover terminal
npx prisma migrate deploy
Health Check
The API exposes a health endpoint at /health that returns:
{"status": "ok", "timestamp": "2025-12-25T15:30:00.000Z"}
CapRover will use this to verify deployment success.
Docker Compose Deployment
For self-hosting without CapRover, use Docker Compose.
Steps
-
Clone the repository:
git clone https://github.com/synjar/community.git
cd community -
Configure environment:
cp apps/api/.env.example apps/api/.env
# Edit apps/api/.env with your configuration -
Start services:
docker-compose up -d -
Run migrations:
docker-compose exec api npx prisma migrate deploy
Services
| Service | Port | Description |
|---|---|---|
| API | 6200 | Main NestJS API |
| PostgreSQL | 6201 | Database with pgvector |
Production Checklist
Before going to production, verify:
-
NODE_ENV=productionis set -
JWT_SECRETis cryptographically random (useopenssl rand -base64 32) - Database uses dedicated user (not
postgressuperuser) - HTTPS is enabled
- CORS_ORIGINS set to production domain only
- Rate limiting configured (if applicable)
- Backups configured for PostgreSQL
- Monitoring/logging set up
Troubleshooting
Port Mismatch
Ensure PORT=6200 in environment variables matches Dockerfile configuration.
Database Connection
Verify DATABASE_URL format:
postgresql://user:password@host:port/database?schema=public
File Upload Fails
Check Backblaze B2 credentials and bucket permissions.
Container Crashes
Check logs: docker logs <container_id> or CapRover logs.
Alternative Deployments
- Kubernetes: Helm chart coming soon
- Traditional VPS: Manual Node.js setup (see README.md)
- Railway/Render: Use Dockerfile directly