Service
up service
Manage services
Synopsis
Create, deploy, inspect, stop, start, and remove services.
A service is a long-running container (or a one-shot job). Services are
defined declaratively in up.yaml and applied with up apply, but these
commands let you operate on them directly: create one interactively,
deploy the latest build, stop or restart it, tail logs, or remove it.
Run up service with no subcommand to list services in a project.
up service [flags]
Options
--env string target or filter environment name
-f, --file string path to config file (default "up.yaml")
-p, --project string project name or ID
Options inherited from parent commands
-o, --output string output format: table, json, yaml (list commands only) (default "table")
-q, --quiet suppress output
-v, --verbose count enable debug output (-v debug, -vv trace)
up service create
Create a service
Synopsis
Create a service from flags, or interactively when flags are omitted.
Pick an image source (a pre-built image) or a git source (built on a build node). For git sources, choose a build backend (dockerfile or railpack) and the registry to push the result to. Set the port, domain, health check, and environment variables as needed.
For full declarative control, prefer describing the service in up.yaml
and running up apply.
up service create [name] [flags]
Examples
# Create a service from a pre-built image
up service create api --image nginx:latest --port 8080 --domain api.example.com
# Create a git-source service built with Railpack
up service create api \\
--source-url git@github.com:org/api.git \\
--build railpack --output-registry ghcr \\
--port 8080 --health-path /health
Options
--args stringArray argv passed to the entrypoint; each value is split on whitespace (repeatable)
--build string build backend: dockerfile, railpack
--build-node string build node name (default: any build-role node)
--command stringArray container entrypoint override; each value is split on whitespace (repeatable)
--dockerfile string Dockerfile path (default: Dockerfile)
--domain string domain to route to this service
-e, --env-var stringArray environment variable KEY=VALUE (repeatable)
--health-path string HTTP path for health checks
--image string container image
--output-registry string registry to push built images to (default: default registry)
--port int container port (default 8080)
--registry string registry name for private image auth
--source-ref string branch, tag, or commit SHA to build (default: repo default branch)
--source-token string git auth token for private repos
--source-url string git clone URL
--ssl enable HTTPS with Caddy-managed certificates
--ssl-redirect redirect HTTP to HTTPS when ssl is enabled (default true)
up service deploy
Deploy a service
Synopsis
Queue a new deployment for a service and wait for it to become healthy.
By default the service is rebuilt from its source (or its current image) from its source, pushed to the output registry, deployed, and promoted once the health check passes. Use –skip-build to redeploy the last built image without rebuilding. Use –no-follow to queue the deployment and return immediately.
up service deploy <service> [flags]
Examples
# Deploy the api service to production
up service deploy api
# Deploy to a specific environment without streaming logs
up service deploy api --env staging --no-follow
# Redeploy the last-built image
up service deploy api --skip-build
Options
--no-follow queue deploy and return without streaming logs
--skip-build redeploy the last-built image without rebuilding
up service list
List services
Synopsis
List the services in a project as a table. This is the default action
when up service is run with no subcommand. Pass –env to show only the
services of one environment.
With –desired, list the services declared in up.yaml instead of the live ones. This reads the config locally and never contacts the control node, so it works before the project exists. Combine it with –preview and –env to render the per-environment preview domains apply will create.
up service list [flags]
Options
--desired list the services declared in up.yaml instead of live services
--pr string with --desired, pull request number; shorthand for --env pr-<n>
--preview with --desired, resolve per-environment preview domains
up service logs
Show service logs
Synopsis
Show the runtime (container) logs for a service. Add –follow to stream new lines as they arrive, and –tail to control how many recent lines are shown.
Use the build and deploy subcommands to inspect build output and rollout logs instead.
up service logs <service> [flags]
Examples
# Tail runtime logs for the api service
up service logs api --follow
# Show the last 50 lines
up service logs api --tail 50
Options
--follow stream logs as they arrive
--tail int number of recent lines (default 200)
up service logs build
Show build logs
Synopsis
Show the build logs for a service. Defaults to the latest build; pass –build to inspect a specific build ID.
up service logs build <service> [flags]
Options
--build string build ID (default: latest)
--tail int number of recent lines (default 200)
up service logs deploy
Show deployment/rollout logs
Synopsis
Show the rollout logs for a deployment. Defaults to the latest deployment; pass –deployment to inspect a specific deployment ID.
up service logs deploy <service> [flags]
Options
--deployment string deployment ID (default: latest)
--tail int number of recent lines (default 200)
up service remove
Remove a service (–force cancels any active deployment first)
Synopsis
Remove a service and its deployments. Any active deployment is cancelled first. A service that still has dependent resources cannot be removed without –force, which forces removal of the dependents.
Pass the name as an argument or omit it to pick from a list.
up service remove <name> [flags]
Examples
# Remove the api service, confirming dependents
up service remove api --force
Options
--force skip confirmation and force removal
up service restart
Restart a service without rebuilding
Synopsis
Rolling restart from the last image without rebuilding. The current container keeps serving until the new deployment passes health checks and promotes, so there is no downtime.
up service restart <service> [flags]
Examples
up service restart api
Options
--no-follow queue restart and return without streaming logs
up service start
Start a stopped service without rebuilding
Synopsis
Redeploy a stopped service from its last image without rebuilding. Image services reuse their configured image; build services reuse the last succeeded build. Fails when the service was never deployed.
up service start <service> [flags]
Examples
up service start api
Options
--no-follow queue start and return without streaming logs
up service stop
Temporarily stop a service
Synopsis
Stop a service’s containers and remove its proxy routes. The service
record and active deployment are kept, so up service start or the
next up apply brings it back. Named volumes are preserved.
up service stop <service> [flags]
Examples
up service stop api
up service update
Update a service (does not redeploy; run ‘up service deploy’ after)
Synopsis
Patch a service’s configuration: image, port, domain, TLS,
environment variables, or container command and args. The update is
stored but not deployed; run up service deploy afterwards to roll
it out.
For most workflows, edit up.yaml and run up apply instead, which
updates and deploys in one step.
up service update <name> [flags]
Examples
# Point a service at a new image and redeploy
up service update api --image nginx:1.27
up service deploy api
Options
--args stringArray new argv for the entrypoint; each value is split on whitespace (repeatable; pass once with no value to clear)
--command stringArray new entrypoint override; each value is split on whitespace (repeatable; pass once with no value to clear)
--domain string new domain
-e, --env-var stringArray set or update env var KEY=VALUE (repeatable)
--image string new container image
--port int new container port (0 = unchanged)
--ssl enable HTTPS with Caddy-managed certificates
--ssl-redirect redirect HTTP to HTTPS when ssl is enabled (default true)