Skip to main content

Overview

Orphelix can be deployed in multiple ways depending on your infrastructure and requirements. This guide covers all deployment methods from simple standalone setups to enterprise Kubernetes deployments.

Standalone

Single-server deployment with PM2

Docker

Containerized deployment with Docker Compose

Kubernetes

Native Kubernetes deployment with Helm

Cloud Platforms

AWS, GCP, Azure managed services

Prerequisites

General Requirements

Required for all deployment methods
Required for real cluster mode
  • Valid kubeconfig file
  • Appropriate RBAC permissions
  • Network access to Kubernetes API
Minimum permissions:
  • get, list, watch on: pods, deployments, services, nodes, events, configmaps, secrets
  • patch on deployments (for restart)
Required for GitOps features
  • GitHub OAuth App credentials
  • GitHub App credentials (for repository access)
See GitHub Setup Guide
Required for AI features

Deployment Methods

Method 1: Standalone (PM2)

Best for: Small teams, single server, quick setup
1

Clone repository

2

Install dependencies

3

Configure environment

Edit .env.local:
4

Build application

This creates a standalone build in .next/standalone/
5

Start with CLI

6

Access application

Production considerations:
  • Use reverse proxy (nginx, Caddy)
  • Enable HTTPS with Let’s Encrypt
  • Configure firewall rules
  • Set up log rotation
  • Enable automatic restart on crash

Method 2: Docker

Best for: Containerized environments, isolated deployments
Important notes:
  • Mount kubeconfig as read-only volume
  • Persist database with volume
  • Use secrets management for sensitive data
  • Configure health checks
  • Set resource limits (CPU, memory)

Method 3: Kubernetes (Helm)

Best for: Enterprise deployments, high availability, scalability
1

Install Helm

2

Add Orphelix Helm repository

Helm chart coming soon! For now, use manual deployment below.
3

Create namespace

4

Create secrets

5

Create deployment manifest

Create orphelix-deployment.yaml:
6

Create RBAC for cluster access

Create orphelix-rbac.yaml:
7

Deploy

8

Access application

High availability configuration:
  • Set replicas: 3 or more
  • Use anti-affinity rules
  • Configure HPA for auto-scaling
  • Use external database (PostgreSQL)
  • Implement distributed sessions

Method 4: Cloud Platforms

AWS Elastic Kubernetes Service (EKS)
1

Create EKS cluster

2

Install AWS Load Balancer Controller

3

Deploy Orphelix

Use Kubernetes deployment method aboveUpdate Ingress:
AWS-specific features:
  • Use EKS IRSA for kubeconfig auth
  • Store secrets in AWS Secrets Manager
  • Use RDS for database
  • CloudWatch for logs and metrics

Configuration

Environment Variables

Reverse Proxy (nginx)

nginx configuration:

Monitoring

Health Checks

Endpoint: /api/health
Response:

Logs

Metrics

Prometheus metrics: (Coming soon)

Backup and Recovery

Database Backup

SQLite database:
Automated backup script:
Cron job:

Kubernetes Backup

Using Velero:

Security Hardening

Best Practices

  • Force HTTPS redirect
  • Use valid SSL certificates
  • Enable HSTS headers
  • Configure secure cookies
  • Never commit secrets to Git
  • Use environment variables
  • Use secret managers (AWS Secrets Manager, Azure Key Vault, etc.)
  • Rotate secrets regularly
  • Configure firewall rules
  • Use private networks
  • Implement rate limiting
  • Enable DDoS protection
  • Enforce strong passwords
  • Enable 2FA for GitHub
  • Use short-lived tokens
  • Implement session timeout
  • Enable audit logging
  • Monitor failed login attempts
  • Set up alerts for anomalies
  • Regular security reviews

Security Headers

Add to nginx config:

Troubleshooting

Check:
  • Node version: node --version (must be 20+)
  • Port availability: lsof -i :3000
  • Environment variables: Check .env.local
  • Database: Verify orphelix.db exists and is writable
Logs:
Check:
  • Kubeconfig: kubectl config view
  • Current context: kubectl config current-context
  • Cluster access: kubectl get nodes
  • RBAC permissions: kubectl auth can-i get pods
For cloud providers:
  • AWS: Token may be expired, run aws eks update-kubeconfig
  • GCP: Run gcloud container clusters get-credentials
  • Azure: Run az aks get-credentials
Check:
  • OAuth App credentials in .env.local
  • GitHub App credentials
  • Callback URL matches: https://your-domain.com/api/auth/callback/github
  • Organization access granted
Test:
Solutions:
  • Increase memory limit in PM2/Docker/K8s
  • Reduce concurrent requests
  • Enable aggressive garbage collection:
  • Check for memory leaks in logs

Upgrading

Standalone

Docker

Kubernetes

Performance Tuning

Node.js Optimization

Next.js Optimization

Database Optimization

Next Steps

Getting Started

Development environment setup

Architecture

System design and patterns

Configuration

Cluster and application config

Contributing

Contribute to Orphelix

Support

Need help? Create an issue or ask in Discussions.