| order | 1 |
|---|---|
| title | Getting Started |
| description | Everything you need to install, configure, and start using OpsKnight |
This section will take you from zero to a fully operational incident management system. By the end, you'll have OpsKnight running, your first service configured, and understand how to create and manage incidents.
| Guide | What You'll Accomplish |
|---|---|
| Installation | Get OpsKnight running with Docker, Kubernetes, or locally |
| Configuration | Understand environment variables and system settings |
| First Steps | Create your first service, incident, and on-call schedule |
Before installing OpsKnight, ensure you have the following:
- Docker Engine v20.10 or later
- Docker Compose v2.0 or later
- 4GB RAM minimum (8GB recommended)
- 10GB disk space for images and data
- Kubernetes v1.24 or later
- Helm v3.10 or later (for Helm deployments)
- kubectl configured for your cluster
- Persistent Volume provisioner for PostgreSQL storage
- Node.js v18 or later
- PostgreSQL v14 or later
- npm or yarn package manager
- Git for cloning the repository
Choose the deployment method that fits your needs:
| Method | Best For | Complexity |
|---|---|---|
| Docker Compose | Development, small teams, quick evaluation | Low |
| Kubernetes (Kustomize) | Production, scaling, existing K8s infrastructure | Medium |
| Kubernetes (Helm) | Production with templated configuration | Medium |
| Local Development | Contributing, debugging, testing changes | Medium |
Want to get started immediately? Here's the fastest path:
# 1. Clone the repository
git clone https://github.com/dushyant-rahangdale/opsknight.git
cd opsknight
# 2. Copy and configure environment
cp env.example .env
# Edit .env: Set NEXTAUTH_SECRET (generate with: openssl rand -base64 32)
# 3. Start all services
docker compose up -d
# 4. Open OpsKnight
open http://localhost:3000First-Time Setup: On first launch, you'll be directed to /setup where you create your admin account by entering your name and email. A secure password is generated for you — save it immediately as it's shown only once.
That's it! Log in with your credentials and start exploring.
Once OpsKnight is running, you'll want to:
- Create a Service — Represent a system you want to monitor (e.g., "Payment API")
- Set Up an Escalation Policy — Define who gets notified when incidents occur
- Create an On-Call Schedule — Assign team members to rotation shifts
- Configure Notifications — Set up Email, SMS, Slack, or Push notifications
- Connect Integrations — Route alerts from Datadog, Prometheus, or other tools
The First Steps Guide walks you through all of these in detail.
At minimum, you need these environment variables configured:
# Database connection (PostgreSQL)
DATABASE_URL=postgresql://opsknight:password@localhost:5432/opsknight_db
# Authentication
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-32-character-secret-key-here
# Application URL (used in notification links)
APP_URL=http://localhost:3000See the Configuration Guide for the complete reference.
After starting OpsKnight, verify everything is working:
Navigate to http://localhost:3000 — you should see the login page.
Log in with your admin credentials — you should reach the dashboard.
Create a test service in Services — if it saves, the database is working.
curl http://localhost:3000/api/health
# Expected: {"status":"ok","database":"connected"}# Check what's using port 3000
lsof -i :3000
# Or change the port in docker-compose.yml:
ports:
- '3001:3000'# Check PostgreSQL is running
docker compose logs postgres
# Reset everything and try again
docker compose down -v
docker compose up -d- Verify
NEXTAUTH_URLmatches your actual URL (including port) - Regenerate
NEXTAUTH_SECRETif sessions aren't persisting - Check browser console for specific error messages
Ready to continue? Here's your path:
- Installation Guide — Detailed installation for all deployment methods
- Configuration Reference — Complete environment variable documentation
- First Steps — Create your first service and incident
- Check the GitHub Issues for known problems
- Join the community Discord for real-time help
- Review the Architecture section for deeper understanding