LinuxCommandLibrary

caprover

Manage and deploy applications on CapRover

SYNOPSIS

caprover <command> [<options>]

PARAMETERS

login
    Login to CapRover server with URL and password

logout
    Logout from CapRover server

deploy
    Deploy app from Git, Dockerfile, or one-click app

rollback
    Rollback to previous deployment

ssh
    SSH into app container

variables
    Manage environment variables for apps

cron
    Manage cron jobs for apps

apps
    List apps on a server

deleteApp
    Delete an app

serverInfo
    Print server information

captainDefinition
    Validate captain-definition file

servers
    List configured servers

deleteServer
    Delete server from CLI config

version
    Print CLI version

--debug
    Enable debug logging

--json
    Output in JSON format

--help
    Show help

--version
    Show CLI version

DESCRIPTION

The caprover command is the official CLI tool for CapRover, an open-source PaaS (Platform as a Service) that simplifies deploying and managing web applications on your own servers using Docker. Installed via npm as npm install -g caprover-cli, it requires Node.js. It allows automation of deployments from Git repositories, Dockerfiles, or local folders, server management, environment variables, cron jobs, rollbacks, and SSH access—all from the terminal. Ideal for CI/CD pipelines like GitHub Actions or Jenkins.

Key workflows include logging into a CapRover server, listing apps or servers, deploying with caprover deploy, and scaling services. Outputs support JSON for scripting. Debug mode aids troubleshooting. CapRover handles Nginx, SSL (Let's Encrypt), databases, and one-click apps like WordPress.

It's lightweight, zero-config for basics, and extends via captain-definition files specifying build packs. Community-driven, it abstracts server ops for developers focused on code.

CAVEATS

Not a standard Linux utility; requires Node.js/npm. Global install needed. Server must run CapRover. Git/Docker access required for deployments.

INSTALLATION

npm install -g caprover-cli
Requires Node.js ≥ 14.

BASIC DEPLOY

caprover login https://captain.server.com <password>
caprover deploy --url https://github.com/user/repo.git --appName myapp

CONFIG FILE

Uses captain-definition JSON for custom builds, e.g., Node.js, static sites.

HISTORY

CapRover launched in 2018 by Arsh Bansal as a Docker-based PaaS alternative to Heroku. CLI (caprover-cli) added early for automation, evolving with v1.x releases. Now at v1.20+, supports multi-server management and advanced features.

SEE ALSO

docker(1), npm(1), git(1)

Copied to clipboard