---
title: OpenCodeHub Documentation
description: The open-source, self-hosted Git platform with Stacked PRs, AI Code Review, and Smart Merge Queues.
hero:
title: OpenCodeHub
tagline: The fully self-hosted GitHub alternative with SSH hosting, CI/CD pipelines, AI code review, and a modern developer experience.
---
import { Card, CardGrid } from "@astrojs/starlight/components";
## Why OpenCodeHub?
Break large features into small, dependent steps. Graphite-style stacked branches with automatic rebase and merge readiness checks.
Built-in LLM agents (GPT-4, Claude, Gemini, Groq, Ollama, and 10+ providers) review your code for bugs and security issues automatically.
Stack-aware merge queue with speculative CI builds, priority lanes, and conflict detection. Ensure `main` never breaks.
GitHub Actions-compatible workflow engine with Docker-based runners, artifact storage, and secrets management.
Keep your code on your servers. No per-seat pricing. No vendor lock-in. Deploy with Docker, Podman, or bare metal.
Built-in npm and Docker container registry. Host private packages alongside your source code.
## Core Capabilities
Full Git support with HTTP smart protocol and SSH. Repository forking, mirroring, LFS, and CODEOWNERS enforcement.
Full PR lifecycle with inline comments, file-level approvals, review templates, reviewer routing rules, and auto-merge.
Issue tracking with custom fields and statuses. Drag-and-drop project boards with columns and cards.
Secret scanning, vulnerability scanning, security policies, path-level permissions, and audit logging.
Outbound webhooks with HMAC signing. Rule-based automations for PR workflows, reviews, and deployments.
Multi-tenant organizations with role-based access control, team management, and fine-grained permissions.
## Deploy Anywhere
The recommended way to deploy. Full Docker Compose setup with PostgreSQL and Redis.
[Deploy with Docker →](/administration/deploy-docker/)
Rootless containers with native systemd integration. Ideal for security-focused deployments.
[Deploy with Podman →](/administration/deploy-podman/)
Deploy to Kubernetes using the bundled Helm chart with horizontal scaling.
[Deploy on Kubernetes →](/administration/kubernetes/)
Self-hosted PaaS alternative to Heroku/Render. Auto-deploy with built-in SSL.
[Deploy on Coolify →](/administration/deploy-coolify/)
Run on Synology, TrueNAS, or QNAP. Perfect for private home/team Git servers.
[Deploy on NAS →](/administration/deploy-nas/)
Cloudflare Tunnel + R2 for zero-port exposure and S3-compatible storage.
[Deploy with Cloudflare →](/administration/deploy-cloudflare/)
Production-ready reverse proxy config with SSL and Git-specific optimizations.
[Configure Nginx →](/administration/deploy-nginx/)
Deploy on shared hosting or VPS panels using Node.js + PM2.
[cPanel →](/administration/deploy-cpanel/) | [CyberPanel →](/administration/deploy-cyberpanel/)
## Tech Stack
| Layer | Technology |
| --- | --- |
| **Framework** | Astro 4.x (SSR, Node standalone adapter) |
| **Frontend** | React 18, Tailwind CSS, Radix UI, Framer Motion |
| **Backend** | Astro API Routes (175+ endpoints), GraphQL |
| **Database** | PostgreSQL (prod), SQLite (dev), Turso/LibSQL (edge) |
| **ORM** | Drizzle ORM (38 schema tables) |
| **Auth** | JWT, bcryptjs, TOTP 2FA, OAuth (Google, GitHub), SSO/SAML, OIDC |
| **Git** | simple-git, isomorphic-git, nodegit, ssh2 |
| **Storage** | Local filesystem or S3-compatible (AWS, MinIO, R2, Garage, Wasabi) |
| **CI/CD** | GitHub Actions-compatible engine, Docker-based runners |
| **AI** | OpenAI, Anthropic, Google, Groq, Ollama, OpenRouter, Together, Bytez |
| **Queue** | BullMQ + Redis |
| **Observability** | OpenTelemetry, Prometheus metrics, Pino logging |
## Quick Start
```bash
# Clone and start with Docker Compose
git clone https://github.com/swadhinbiswas/OpencodeHub.git
cd OpencodeHub
cp .env.example .env # Edit secrets!
docker-compose up -d
# Create admin user
docker-compose exec app bun run scripts/seed-admin.ts
# Open in browser
open http://localhost:4321
```
:::tip[SSH Git Access]
The SSH git server starts automatically on port 2222. Clone with:
`git clone ssh://git@localhost:2222/owner/repo.git`
:::
## Quick Links
Get OpenCodeHub running in minutes. [Read the guide →](/getting-started/installation/)
All environment variables and settings. [View config →](/administration/configuration/)
The `och` CLI with 20+ command groups. [View commands →](/reference/cli-commands/)
REST API with 175+ endpoints. [Explore the API →](/api/rest-api/)
System design, data flow, and component overview. [View architecture →](/development/architecture/)
Help make OpenCodeHub better. [Start contributing →](/development/contributing/)