CaptainCore is a WordPress management toolkit for hosting professionals. Built with Cobra in Go, it manages WordPress sites at scale via SSH and WP-CLI.
- Backups -- Incremental backups with Restic to B2 cloud storage
- Quicksaves -- Git-based change tracking for plugins, themes, and config
- Uptime Monitoring -- Parallel HTTP checks with SQLite-backed stats and email alerts
- SSH Management -- Direct SSH and remote script execution across sites
- WordPress Updates -- Automated core, plugin, and theme updates with before/after diffs
- Provider Integrations -- Kinsta and GridPane hosting provider APIs
- HTTP Server -- REST + WebSocket API for remote command dispatch
~/.captaincore/
βββ captaincore.go # Entry point
βββ cmd/ # Cobra command definitions
βββ models/ # GORM data models (SQLite)
βββ config/ # Config file parsing
βββ providers/ # Hosting provider integrations (Kinsta, GridPane)
βββ apiclient/ # HTTP client for CaptainCore API
βββ server/ # HTTP server (REST + WebSocket)
βββ app/ # Bash scripts for operations
βββ lib/
β βββ remote-scripts/ # Bash scripts executed on sites via SSH
β βββ arguments # Argument parsing helpers
β βββ excludes # Backup exclusion rules
βββ config.json # CLI configuration (see config-sample.json)
βββ data/ # Runtime data (databases, keys, payloads)
βββ go.mod / go.sum
βββ install.sh # curl | bash installer
βββ .goreleaser.yml # Release builds (linux/darwin, amd64/arm64/armv7)
# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/CaptainCore/captaincore/master/install.sh | bashThe installer downloads the release build for your platform (Linux or macOS on x86_64, arm64 or armv7), verifies it against the release checksums and installs it as /usr/local/bin/captaincore. The binary carries its own runtime scripts and unpacks them into ~/.captaincore/ the first time it runs, so there is nothing else to clone. Set INSTALL_DIR to install somewhere else, or CAPTAINCORE_VERSION=v1.0.0 to pin a release.
Then connect it to your CaptainCore Manager site (a WordPress site with pretty permalinks enabled and the CaptainCore Manager plugin active). One command pairs both directions: it fetches the Manager's CLI token, and with --server-url it registers this machine's address so the Manager can dispatch jobs to captaincore server. No wp-config constants needed.
captaincore connect --server-url=https://captaincore-api.example.comKeep it current with the built-in updater, which checks GitHub for a newer release, verifies the download and swaps the binary in place:
captaincore upgrade # install the latest release
captaincore upgrade --check # only report, exit 1 when behindReleases are published at https://github.com/CaptainCore/captaincore/releases for manual download.
To build from source (requires Go 1.25+):
git clone https://github.com/CaptainCore/captaincore.git ~/.captaincore/
cd ~/.captaincore
go build -o captaincore .A source checkout owns its own app/ and lib/ scripts. captaincore upgrade and install.sh detect the .git directory and leave it alone; update a checkout with git pull and a rebuild.
captaincore connect writes config.json for you. To configure by hand, copy config-sample.json to config.json and set:
- System config -- server paths, master SSH connection, fleet mode
- Per-tenant config -- API keys, cloud storage remotes (rclone), branding, site list
# Site operations
captaincore site list
captaincore site get <site>
captaincore ssh <site>
# Backups
captaincore backup generate <site>
captaincore backup list <site>
captaincore backup download <site>
# Quicksaves (change tracking)
captaincore quicksave generate <site>
captaincore quicksave list <site>
captaincore quicksave show-changes <site>
# Monitoring
captaincore monitor
# Updates
captaincore update <site>
# Bulk operations (target groups)
captaincore backup generate @all
captaincore update @production
# Fleet mode (multi-tenant)
captaincore backup generate @all --fleet
# Start HTTP server
captaincore serverRun captaincore --help for a full list of commands.
git tag -a v1.0.0 -m "v1.0.0"
git push origin v1.0.0
goreleaser release --snapshot --skip-publish --clean # Preview
goreleaser release --skip-validate --clean # PublishRefer to docs.captaincore.io for full documentation.
MIT License. See license for details.
