# CapRover Application Platform

> Easy-to-use PaaS to deploy applications with one-click apps.

- Category: DevOps & CI/CD
- Difficulty: intermediate
- Components: caprover, nginx, certbot
- Tags: paas, deployment, caprover, docker, self-hosted
- Source: https://docker.recipes/devops/caprover-paas

## Overview

CapRover is an open-source Platform-as-a-Service (PaaS) built on Docker that transforms any Linux server into a powerful application hosting platform. Created to simplify the deployment process for developers and small teams, CapRover provides a web-based dashboard for managing applications, databases, and services without requiring deep DevOps expertise. It automatically handles container orchestration, load balancing, and SSL certificate management through integrated NGINX reverse proxy and Certbot automation. This stack combines CapRover's application management capabilities with NGINX's proven performance for HTTP routing and SSL termination, while Certbot ensures automatic certificate provisioning and renewal from Let's Encrypt. The platform excels at bridging the gap between simple shared hosting and complex orchestration platforms like Kubernetes, offering one-click deployments for popular applications while maintaining the flexibility to deploy custom Docker images. Development teams, startups, and individual developers benefit from this combination when they need reliable application hosting with minimal infrastructure management overhead, making it particularly valuable for rapid prototyping, staging environments, and production workloads that don't require enterprise-scale orchestration complexity.

## Features

- Web-based dashboard for application lifecycle management with real-time deployment logs
- One-click marketplace apps including WordPress, Ghost, MongoDB, Redis, and PostgreSQL
- Automatic NGINX reverse proxy configuration with custom domain mapping
- Built-in Let's Encrypt integration via Certbot for automatic SSL certificate management
- Docker registry support for private image deployments with authentication
- Application clustering and zero-downtime deployments with health checks
- Built-in monitoring dashboard with container resource usage and application metrics
- CLI tool for CI/CD pipeline integration and automated deployments

## Use cases

- Rapid prototyping environment for development teams testing multiple microservices
- Small to medium business hosting platform for WordPress sites and web applications
- Staging and testing infrastructure for software development workflows
- Personal cloud platform for self-hosted alternatives to SaaS applications
- Startup MVP deployment platform requiring quick iteration and scaling
- Educational environment for teaching containerization and deployment concepts
- Remote team collaboration platform hosting development tools and databases

## Prerequisites

- Linux server with Docker and Docker Compose installed (Ubuntu 18+ recommended)
- Minimum 1GB RAM and 10GB storage (2GB+ RAM recommended for multiple applications)
- Domain name with DNS access for subdomain configuration and SSL certificates
- Ports 80, 443, and 3000 available and accessible from the internet
- SERVER_IP environment variable configured with your server's public IP address
- Basic understanding of Docker concepts and command line interface

## docker-compose.yml

```yaml
services:
  caprover:
    image: caprover/caprover:latest
    container_name: caprover
    environment:
      - CAPTAIN_IS_DEBUG=0
      - MAIN_NODE_IP_ADDRESS=${SERVER_IP}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - caprover-data:/captain
    ports:
      - "80:80"
      - "443:443"
      - "3000:3000"
    networks:
      - caprover-network
    restart: unless-stopped

volumes:
  caprover-data:

networks:
  caprover-network:
    driver: bridge
```

## .env

```bash
# CapRover
SERVER_IP=your_server_ip

# Initial captain password: captain42
# Change immediately after first login
```

## Usage notes

- Dashboard at http://captain.your-domain:3000
- Default password: captain42
- One-click app deployment
- Automatic SSL certificates
- Use CLI: npm i -g caprover

## Troubleshooting

- CapRover dashboard shows 'Cannot connect to Docker daemon': Ensure Docker service is running and user has Docker group permissions
- SSL certificate generation fails: Verify domain DNS points to server IP and ports 80/443 are not blocked by firewall
- Application deployment stuck at 'Building': Check Docker daemon has sufficient disk space and memory for image builds
- Captain.domain:3000 not accessible: Confirm SERVER_IP environment variable matches actual server IP and port 3000 is open
- One-click apps fail to install: Verify Docker Hub connectivity and check CapRover logs for registry authentication issues
- NGINX proxy errors after domain changes: Restart CapRover container to reload NGINX configuration with updated domain mappings

