Deploy via the CLI
The CLI runs in two modes.
| Mode | When | How it works |
|---|---|---|
| Local | On the server itself | Reads --config /etc/simpledeploy/config.yaml, writes directly to apps_dir. |
| Remote | From your laptop or CI | Uses an API key + URL stored in ~/.simpledeploy/config.yaml to call the server’s REST API. |
Most people want the remote mode.
Set up a context
Section titled “Set up a context”A “context” is a named (URL, API key) pair. Like kubectl config.
-
On the server, create an API key (or use one from the dashboard):
Terminal window sudo simpledeploy apikey create --name "laptop" --user-id 1# prints sd_xxxx once -
On your laptop:
Terminal window simpledeploy context add prod \--url https://manage.example.com \--api-key sd_xxxxsimpledeploy context use prod -
Verify:
Terminal window simpledeploy list
Deploy
Section titled “Deploy”# Single appsimpledeploy apply -f docker-compose.yml --name myapp
# A whole directory of apps (each subdirectory is one app)simpledeploy apply -d ./apps/The CLI uploads the file, the server writes it to apps_dir, the reconciler deploys.
Other useful commands
Section titled “Other useful commands”# List apps and statussimpledeploy list
# Stream logssimpledeploy logs myapp --followsimpledeploy logs myapp --tail 200 --service db
# Pull latest image, redeploysimpledeploy pull myapp
# Compare local compose to deployed versionsimpledeploy diff -f docker-compose.yml --name myapp
# Push everything in a directory in one shotsimpledeploy sync -d ./apps/Full command reference: CLI.