Managed services are long-lived processes inside a box. A publish maps a name to one (box, port); blue/green is repointing a name onto a new backend. For the concepts, see Services.

service

Run and manage long-lived services in a box
zomg service <command>
SubcommandDescription
listList services for a box
startStart a managed service
statusGet service status
inspectGet service inspect details (spec + reproducible commands)
logsView service logs
restartRestart a managed service
publishPublish an existing managed service
unpublishUnpublish a managed service
stopStop a managed service
removeRemove a managed service: stop it, then delete its spec (the log is kept)
# Start a managed service and publish it
zomg service start my-box web --port 8080 --publish myapp -- python3 -m http.server 8080

# Start a service as a box user with env, a ready gate, and a restart policy
zomg service start my-box api --port 5432 --user postgres --env PGDATA=/data \

# Start a web service that is ready when GET /healthz returns 200
zomg service start my-box web --port 8080 --ready http:/healthz -- ./serve

# Check service status
zomg service status my-box web --json

# Inspect runtime/spec and reproducible commands
zomg service inspect my-box web
zomg service inspect my-box web --json

# Tail service logs
zomg service logs my-box web --lines 50

# Publish/unpublish an existing managed service without restart
zomg service publish my-box web --as myapp
zomg service unpublish my-box web

# Stop a service (keeps the spec so it reconciles on box resume), or remove
# it entirely (deletes the spec; the log is kept)
zomg service stop my-box web
zomg service remove my-box web

# Publishes are gated by deployment auth by default; pass --public to skip it
zomg service publish my-box web --as myapp --public

list

List services for a box
zomg service list <BOX_NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
-p, --project <PROJECT>Target project.
-j, --jsonPrint the JSON response.

start

Start a managed service
zomg service start <BOX_NAME> <NAME> [<CMD>...] [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
--port <PORT>Service port to publish (omit for a portless worker service)
--cwd <DIR>Working directory for the service (absolute path inside the box)
--publish <NAME>Publish at this name under the Zomg domain
--publicSkip deployment auth on the published URL; anyone with it can reach it
-t, --tag <TAGS>Tag as key=value (repeatable); use box.ui=main for the primary web UI
--user <USER>Run the service as this box-local user
-e, --env <ENV>Environment as KEY=VALUE (repeatable), exported to the service
--secret-env <SECRET_ENV>Secret env as KEY=VALUE (repeatable): exported like —env but the value is redacted in status/inspect hints (reveal via outputs —json)
--ready <SPEC>Readiness gate: tcp, tcp:PORT, or http:PATH
--ready-status <READY_STATUS>Expected status for an http ready check (default 200)
--ready-timeout <READY_TIMEOUT>Ready timeout in seconds (default 60, capped at 240)
--stop-signal <STOP_SIGNAL>Signal used to stop the service (default TERM)
--stop-grace <STOP_GRACE>Grace seconds before SIGKILL after the stop signal (default 10)
--restart <RESTART>Restart policy: always (default), on-failure, or never
-p, --project <PROJECT>Target project.
<CMD>Command and arguments (use -- separator) (repeatable)

status

Get service status
zomg service status <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.
-j, --jsonPrint the JSON response.

inspect

Get service inspect details (spec + reproducible commands)
zomg service inspect <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.
-j, --jsonPrint the JSON response.

logs

View service logs
zomg service logs <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-l, --lines <LINES>Number of lines to show (most recent) Defaults to 100.
-p, --project <PROJECT>Target project.

restart

Restart a managed service
zomg service restart <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.

publish

Publish an existing managed service
zomg service publish <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
--as <NAME>Name under the Zomg domain
--port <PORT>Override published port (default: service port)
--publicSkip deployment auth; anyone with the URL can reach it
-p, --project <PROJECT>Target project.
-j, --jsonPrint the JSON response.

unpublish

Unpublish a managed service
zomg service unpublish <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.
-j, --jsonPrint the JSON response.

stop

Stop a managed service
zomg service stop <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.

remove

Remove a managed service: stop it, then delete its spec (the log is kept)
zomg service remove <BOX_NAME> <NAME> [options]
Argument / optionDescription
<BOX_NAME>Box ref.
<NAME>Name.
-p, --project <PROJECT>Target project.