Self-Hosted Deployment Guide
Deploy HRPulsar on your own infrastructure using Docker Compose.
Prerequisites
- Docker 24.0+
- Docker Compose 2.20+
- 2+ vCPU, 4+ GB RAM, 20+ GB SSD (minimum)
- A domain name (optional, for HTTPS)
Installation
1. Clone the repository
git clone https://github.com/hrpulsar/hrpulsar.git
cd hrpulsar
2. Configure environment
cp .env.example .env
Edit .env and set at minimum:
JWT_SECRET=your-random-secret-string-here
POSTGRES_PASSWORD=a-strong-database-password
3. Start all services
docker compose -f docker-compose.self-hosted.yml up -d
This starts 5 containers:
- Caddy — Reverse proxy (ports 80/443)
- Backend — FastAPI application (port 8000 internal)
- Frontend — Next.js application (port 3000 internal)
- PostgreSQL — Database with pgvector extension
- Redis — Cache
4. Access the application
- HTTP: http://your-server-ip
- HTTPS: https://your-domain.com (if you configured a domain in the Caddyfile)
Create your first account at the registration page.
HTTPS with a Domain
To enable automatic HTTPS:
- Point your domain's A record to your server IP
- Edit
deploy/Caddyfile: replace:80with your domain (e.g.,app.yourcompany.com) - Restart Caddy:
docker compose -f docker-compose.self-hosted.yml restart caddy
Caddy will automatically obtain a Let's Encrypt certificate.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
JWT_SECRET | Yes | change-me-to-a-random-string | Secret key for JWT tokens |
POSTGRES_PASSWORD | Yes | hrpulsar | PostgreSQL password |
DATABASE_URL | No | Auto-configured | PostgreSQL connection string |
REDIS_URL | No | Auto-configured | Redis connection string |
ANTHROPIC_API_KEY | No | — | Claude API key (for AI features) |
OPENAI_API_KEY | No | — | OpenAI API key (for AI features) |
GEMINI_API_KEY | No | — | Gemini API key (for AI features) |
LLM_PROVIDER | No | claude | LLM provider (claude, openai, gemini) |
SMTP_HOST | No | — | SMTP server for email notifications |
SMTP_PORT | No | 587 | SMTP port |
SMTP_USER | No | — | SMTP username |
SMTP_PASSWORD | No | — | SMTP password |
S3_ENDPOINT | No | — | S3/MinIO endpoint for file storage |
S3_ACCESS_KEY | No | — | S3 access key |
S3_SECRET_KEY | No | — | S3 secret key |
S3_BUCKET | No | hrpulsar | S3 bucket name |
Upgrading
cd hrpulsar
git pull
docker compose -f docker-compose.self-hosted.yml build
docker compose -f docker-compose.self-hosted.yml up -d
Migrations run automatically on backend startup.
Backup & Restore
Backup
./scripts/backup_db.sh ./backups
Or set up a daily cron job:
crontab -e
# Add: 0 3 * * * /path/to/hrpulsar/scripts/backup_db.sh /path/to/backups
Restore
gunzip -c backups/hrpulsar_YYYYMMDD_HHMMSS.sql.gz | \
docker compose exec -T postgres psql -U hrpulsar hrpulsar
Troubleshooting
Check service status
docker compose -f docker-compose.self-hosted.yml ps
View logs
docker compose -f docker-compose.self-hosted.yml logs backend
docker compose -f docker-compose.self-hosted.yml logs frontend
Health check
curl http://localhost:8000/health
Hardware Recommendations
| Users | CPU | RAM | Disk |
|---|---|---|---|
| Up to 100 | 2 vCPU | 4 GB | 20 GB SSD |
| 100-500 | 4 vCPU | 8 GB | 50 GB SSD |
| 500+ | 8 vCPU | 16 GB | 100 GB SSD |