ZeroOps is a simple CLI tool to deploy applications to your VPS using Docker Compose. It helps you manage deployment contexts, render docker-compose templates with environment variables, and automate remote deployments.
- Manage multiple VPS deployment contexts
- Render and upload docker-compose files with environment variables
- Deploy, check status, list, and remove applications on your VPS
- Manage nginx proxy configurations remotely
- Docker and Docker Compose installed on your VPS
- SSH access to your VPS
scpandsshavailable on your local machine- Nginx installed on your VPS (for proxy management)
You can install ZeroOps using the provided install script:
curl -sL https://raw.githubusercontent.com/DominikPalatynski/zeroops/main/install.sh | bashThis will download the latest release and install it to ~/.local/bin/zeroops. Make sure ~/.local/bin is in your PATH.
- Go to the Releases page and download the latest
zeroops_<version>_windows_amd64.zip(orarm64.zipif needed). - Extract the
zeroops.exefile. - Add the folder containing
zeroops.exeto your systemPATH. - You can now use
zeroopsfrom Command Prompt or PowerShell.
A context defines the VPS you want to deploy to.
Add a new context:
zeroops context add my-vps --docker "host=ssh://user@your-vps-ip"List available contexts:
zeroops context listSet the current context:
zeroops context use --name my-vpsShow the current context:
zeroops context currentRemove a context:
zeroops context rm --name my-vpsCreate a .env file in your project directory with the required environment variables. For example:
RESEND_API_KEY=your_api_key_here
The variables in .env will be injected into docker-compose.tpl.yml.
Edit docker-compose.tpl.yml to define your services. Example:
version: "3"
services:
nextjs:
image: <your-image>
ports:
- "3004:3000"
environment:
- RESEND_API_KEY={{ .RESEND_API_KEY }}Deploy your app to the current context:
zeroops deploy add my-appYou can specify custom paths for environment and template files:
zeroops deploy add --env_file prod.env --template docker-compose.prod.yml my-appBy default:
- Environment file:
.envin current directory - Template file:
docker-compose.tpl.ymlin current directory
The deployment process will:
- Render the template file with your environment values
- Upload the rendered
docker-compose.ymland environment file to your VPS - Run
docker compose up --build -dremotely
Check status of a deployed app:
zeroops deploy status my-appList all deployed apps:
zeroops deploy listRemove an app (stops containers and removes files):
zeroops deploy rm my-appZeroOps allows you to manage nginx proxy configurations on your VPS directly from your local machine.
Add a new nginx configuration:
zeroops proxy add --conf nginx.conf my-appThis will:
- Copy your local nginx configuration to the VPS
- Install it in
/etc/nginx/sites-enabled/ - Reload nginx to apply changes
View an existing configuration:
zeroops proxy status my-appList all proxy configurations:
zeroops proxy listRemove a proxy configuration:
zeroops proxy rm my-appThis will remove the configuration and reload nginx automatically.
If you see errors about sudo requiring a password for remote commands, you may need to allow passwordless sudo for your user on the VPS. You can do this by running:
sudo visudoAnd adding a line like:
youruser ALL=(ALL) NOPASSWD:ALL
Replace youruser with your VPS username.