OneDev
All-in-one DevOps platform with Git and CI/CD.
Overview
OneDev is an all-in-one DevOps platform that combines Git repository management, continuous integration and deployment, code review workflows, issue tracking, and project wikis into a single self-hosted solution. Originally developed as an open-source alternative to platforms like GitLab and GitHub Enterprise, OneDev distinguishes itself by using Kubernetes YAML syntax for pipeline definitions and providing built-in Docker integration for job execution. The platform emphasizes simplicity and performance while offering enterprise-grade features like branch protection rules, service desk functionality, and comprehensive audit logging.
This Docker configuration deploys OneDev as a standalone server with direct access to the host's Docker daemon, enabling it to spawn containers for CI/CD job execution. The setup exposes both HTTP and SSH interfaces, allowing developers to interact with Git repositories through web browsers or command-line tools. OneDev's architecture eliminates the need for separate components like Redis or PostgreSQL by using an embedded database and file-based storage, making it particularly suitable for organizations wanting a complete DevOps solution without complex infrastructure management.
Small to medium-sized development teams, startups seeking cost-effective DevOps tooling, and organizations requiring full control over their source code and CI/CD processes will find this configuration valuable. OneDev excels in environments where teams want GitHub or GitLab-like functionality without vendor lock-in or subscription costs, while maintaining the flexibility to customize workflows and integrate with existing Docker-based development environments.
Key Features
- Git repository hosting with advanced branching strategies and merge request workflows
- Kubernetes YAML-based CI/CD pipeline syntax with visual pipeline editor
- Built-in Docker job executor that spawns containers for build and deployment tasks
- Integrated code review system with inline comments and approval workflows
- Service desk functionality for customer support ticket management
- Symbol navigation and code search across repositories with language-aware indexing
- Issue tracking with customizable fields, workflows, and board views
- Built-in package registry for Docker images and Maven artifacts
Common Use Cases
- 1Small development teams migrating from GitHub or GitLab to self-hosted solutions
- 2Startups building Docker-based applications requiring integrated DevOps workflows
- 3Organizations needing air-gapped development environments with full CI/CD capabilities
- 4Educational institutions teaching DevOps practices with hands-on Git and pipeline management
- 5Open source projects requiring comprehensive code review and contributor management
- 6Companies consolidating multiple DevOps tools into a single platform to reduce complexity
- 7Development teams practicing trunk-based development with automated testing pipelines
Prerequisites
- Minimum 4GB RAM recommended for OneDev server with active CI/CD pipelines
- Docker daemon access required for job execution (Docker socket mounted)
- Available ports 6610 (HTTP) and 6611 (SSH Git) for external access
- At least 20GB disk space for repositories, build artifacts, and Docker images
- Basic understanding of Kubernetes YAML syntax for pipeline configuration
- Knowledge of Git workflows and branching strategies for team collaboration
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 onedev: 3 image: 1dev/server:latest4 container_name: onedev5 restart: unless-stopped6 volumes: 7 - onedev_data:/opt/onedev8 - /var/run/docker.sock:/var/run/docker.sock9 ports: 10 - "6610:6610"11 - "6611:6611"1213volumes: 14 onedev_data: .env Template
.env
1# Configure via web interfaceUsage Notes
- 1Docs: https://docs.onedev.io/
- 2Access at http://localhost:6610 - create admin on first visit
- 3Port 6611 for SSH git operations
- 4Built-in CI/CD runs jobs in Docker containers
- 5Code review, issue tracking, and wiki included
- 6Kubernetes YAML pipeline syntax (different from GitLab)
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 onedev:5 image: 1dev/server:latest6 container_name: onedev7 restart: unless-stopped8 volumes:9 - onedev_data:/opt/onedev10 - /var/run/docker.sock:/var/run/docker.sock11 ports:12 - "6610:6610"13 - "6611:6611"1415volumes:16 onedev_data:17EOF1819# 2. Create the .env file20cat > .env << 'EOF'21# Configure via web interface22EOF2324# 3. Start the services25docker compose up -d2627# 4. View logs28docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/onedev/run | bashTroubleshooting
- Permission denied accessing Docker socket: Ensure OneDev container runs with proper Docker group permissions or use Docker-in-Docker setup
- SSH Git clone fails on port 6611: Verify SSH key configuration in OneDev user settings and check firewall rules
- Build jobs fail with resource constraints: Increase Docker daemon memory limits or configure job resource quotas in OneDev settings
- OneDev web interface returns 502 errors: Check container logs for database corruption and verify volume permissions for onedev_data
- Pipeline jobs stuck in pending status: Restart OneDev container to reset job executor and check Docker daemon connectivity
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download