Skip to content

CLI (handwritten backup)

All commands use the --config flag for server config (default: /etc/simpledeploy/config.yaml). Remote commands use the active context from ~/.simpledeploy/config.yaml.

Start the SimpleDeploy server.

Terminal window
simpledeploy serve --config /etc/simpledeploy/config.yaml

Starts: reverse proxy (Caddy), management API, reconciler watcher, metrics collector, backup scheduler, alert evaluator.

Generate a default config file.

Terminal window
simpledeploy init --config /etc/simpledeploy/config.yaml

Deploy apps from compose files.

Terminal window
# Single app
simpledeploy apply -f docker-compose.yml --name myapp
# All apps in directory
simpledeploy apply -d ./apps/

Copies the compose file to the server’s apps directory and triggers deployment.

FlagShortRequiredDescription
--file-fwith —nameCompose file path
--dir-dalt to -fDirectory of app subdirectories
--namewith -fApp name/slug

Remove a deployed app.

Terminal window
simpledeploy remove --name myapp

Stops containers, removes network, deletes from store and apps directory.

List deployed apps with status.

Terminal window
simpledeploy list

Output:

NAME STATUS DOMAIN
myapp running myapp.example.com
postgres running

Stream container logs.

Terminal window
simpledeploy logs myapp
simpledeploy logs myapp --follow=false --tail 50 --service db
FlagShortDefaultDescription
--follow-ftrueFollow log output
--tail100Number of historical lines
--servicewebCompose service name

Manage remote server connections.

Terminal window
# Add a context
simpledeploy context add production --url https://manage.example.com --api-key sd_...
# Switch context
simpledeploy context use staging
# List contexts (* = active)
simpledeploy context list

Export remote app config to local files.

Terminal window
simpledeploy pull --app myapp -o ./
simpledeploy pull --all -o ./apps/

Downloads compose files from the remote server.

Compare local config vs remote state.

Terminal window
simpledeploy diff --app myapp
simpledeploy diff -d ./apps/

Shows line-by-line differences between local compose files and remote.

Sync a local directory to the remote server.

Terminal window
simpledeploy sync -d ./apps/

Deploys new/changed apps and removes apps not present locally.

Trigger an immediate backup.

Terminal window
simpledeploy backup run --app myapp

List backup runs for an app.

Terminal window
simpledeploy backup list --app myapp

Restore from a backup.

Terminal window
simpledeploy restore --app myapp --id 42

Manage users (requires direct database access).

Terminal window
# Create user
simpledeploy users create --username admin --password secret --role super_admin
# List users
simpledeploy users list
# Delete user
simpledeploy users delete --id 2

Roles: super_admin (full access), admin (per-app access), viewer (read-only per-app).

Manage API keys.

Terminal window
# Create key (prints plaintext once)
simpledeploy apikey create --name "claude-code" --user-id 1
# List keys
simpledeploy apikey list --user-id 1
# Revoke key
simpledeploy apikey revoke --id 3

API keys authenticate CLI and API requests via Authorization: Bearer sd_... header.

Manage private container registry credentials.

Terminal window
# Add a registry
simpledeploy registry add --name ghcr-org --url ghcr.io --username myuser --password mytoken
# List registries
simpledeploy registry list
# Remove a registry
simpledeploy registry remove ghcr-org
SubcommandDescription
addAdd registry credentials (encrypted with master_secret)
listList configured registries with decrypted usernames
removeRemove a registry by name
FlagRequiredDescription
--nameYesRegistry identifier (referenced in config/labels)
--urlYesRegistry URL (e.g., ghcr.io, 123456.dkr.ecr.us-east-1.amazonaws.com)
--usernameYesRegistry username
--passwordYesRegistry password or token

Credentials are encrypted with AES-256-GCM using the master_secret from config.

Write all config sidecars from the current DB state to disk. Useful to verify sidecar content or backfill after a manual DB edit.

Terminal window
simpledeploy config export

See Config sidecars for the file layout.

Rebuild the DB from on-disk sidecars. Normally auto-recovery on startup handles this; use this command when you want to force an import into a non-empty DB.

Terminal window
simpledeploy config import --force --wipe
FlagDescription
--forceRequired to import into a non-empty DB
--wipeTruncate config tables before importing (destructive)

Show current git sync status: remote, branch, last sync time, and any recent conflicts.

Terminal window
simpledeploy git status

Trigger an immediate pull-and-apply cycle without waiting for the next poll interval.

Terminal window
simpledeploy git sync-now

See Git sync for setup.

Print version, commit hash, and build date.

Terminal window
simpledeploy version
# simpledeploy 1.2.0 (commit: abc1234, built: 2026-04-08T18:00:00Z)
FlagDefaultDescription
--config/etc/simpledeploy/config.yamlServer config file path
--helpShow help