Once an app is up, life with Yard is mostly pushing code. This chapter is the rest: the commands for looking around, and for the occasional change. Each section is short, and links to the chapter that explains the why.
Every command that acts on one app finds the app from the checkout you stand in: the origin remote and the current branch. Anywhere else, add --app notes.
Look at the host#
yard statusname state cpu mem data rev host deployyard-app-1 up 6h 0.10% 60MB 128MB 9c2c7e1 yard.example.com ok 12s · 2dyard-caddy-1 up 6h 0.30% 24MB 128MB ok 12s · 2dnotes-app-1 up 2h 2.40% 210MB 1.2GB 9c2c7e1 notes.example.com ok 43s · 2hhost: 31% of 4 cores · 294MB of 7.7GB · 1.3GB of 40GBOne row per container. A few words in the table are worth knowing:
unhealthy: the container’s healthcheck fails. Read its log.starting: the healthcheck has not passed yet. It shows for a moment after a deploy.3 restarts: Podman restarted the container because its process exited. The app is crashing.9c2c7e1 → a1b2c3d: the app runs9c2c7e1, but its source is ata1b2c3d. A deploy is on its way, the last one failed, or the app is manual.
An app with no healthcheck has no unhealthy state. It shows up as long as its process runs, even when it answers nothing. Healthchecks fixes that.
Lines that need attention are in color, and below the table Yard prints the one command worth typing next. --running hides stopped containers.
For one app in detail:
yard app statusnotesrev 9c2c7e1 · image localhost/notes:9c2c7e1a2b3c-3f9a1c2e · trigger pushdata 1.2GB · env /srv/yard/apps/notes/envruns auto → yard:python-uv @3f9a1c2e (containerfile; stario: pyproject.toml declares stario)caddy notes.example.com containers notes-app-1 a1b2c3d4e5f6 up 2h 2.4% 210MB deploy ok 43s 2h 9c2c7e1 log listening on :8000And when something feels off about the machine itself, yard status --full runs every host check. It exits 1 when a check fails, so it fits a cron job.
Read logs#
yard app logs # the app's outputyard app logs -f # and keep following ityard app logs --deploy # the last deploy, step by stepyard logs yard-caddy-1 # any container, by nameLogs live in the journal, not in the container. So you can read the log of a container that crashed and was replaced an hour ago. --since -15m, --until, and --tail 500 set the window. --hide and --only filter it. Logs and events explains both.
Read events#
yard events --app notes # one app's timelineyard events --app notes --event deploy. # its deploy historyyard events -f # everything, liveWebhooks, checks, deploys, container starts and stops, and setting changes all appear on one timeline, oldest first.
Change a setting#
yard env set SESSION_SECRET=…yard app deploySaving never restarts the app. The new value reaches the container at the next deploy, and yard app deploy makes that now. yard env cat, get, unset, and edit cover the rest. Settings and data explains the env file.
Change the site file#
yard caddy cat # print the app's site fileyard caddy edit # change it; Caddy checks and loads it on saveAdd a name to the first line, put a password in front, or send a path to another container. Point the DNS at the VM first. An empty file removes the site. Caddy and HTTPS has examples.
Deploy by hand#
yard app deployThis deploys what the source says now, even when nothing changed. It is how you apply a setting, retry after a fix outside the repo, or deploy a manual app. Ctrl-C leaves the deploy running on the host, and yard app logs --deploy -f rejoins it.
Change what an app runs#
yard app cat containerfile # the file the app buildsyard app cat compose # the compose files it runsyard app set --runs Containerfile # build your own file from the repoyard app set --runs yard:python-uv # keep Yard's file, even if a compose.yml appearsyard app set --runs auto # let every deploy decide againNone of these deploys at once. After you change runs, a push app deploys once at the next check, even when the commit is the same. yard app deploy deploys it now. What an app runs explains runs.
The source changes the same way:
yard app set --ref redesign # follow another branchyard app set --image ghcr.io/you/api:1.5 # a new image tagyard app set --trigger manual # stop deploying on pushPreview a branch#
A branch can be an app of its own. Check out the branch, then create an app from it:
git switch redesignyard app new --caddy redesign.example.comThe app is named notes-redesign. It follows the redesign branch, deploys each push to it, and has its own env file and data. When the branch is merged, remove the preview with yard app rm --app notes-redesign.
Roll back#
There is no rollback command, because Yard runs what the source says now. To go back, change the source:
A repo:
git revertthe bad commit and push. The revert is a new commit, and the build cache makes it quick.An image:
yard app set --image ghcr.io/you/api:1.3, thenyard app deploy.A compose URL:
yard app set --compose-urlwith the raw URL of an older commit, thenyard app deploy.
For a repo app on push, the revert is also what makes the rollback stick. Without it, the next check finds the bad commit at the branch tip again. To hold still while you investigate, run yard app set --trigger manual first.
Clean up#
Yard cleans up old images by itself, once a day. Podman and containers explains what it keeps.
When the disk is full right now:
yard prune --dry-run # what would goyard prune # the same as the daily runyard prune --days 1 # also drop what is older than a dayyard status --full shows when the last prune ran and how much it freed, and how full the disk is.
Remove an app#
yard app rmyard app rm deletes everything the app has on the host: its site file, its containers, its clone, its env file, and its data. There is no undo, so it first lists what will go and asks you to type the name:
This deletes the app notes: containers notes-app-1 clone /srv/yard/apps/notes/repo env file /srv/yard/apps/notes/env data /srv/yard/apps/notes/data (1.2GB) caddy site notes.example.comThis cannot be undone. Copy the data directory first if you need it.Type the app name to confirm:Yard removes the site file first, so the names stop answering before the containers go. In a script, --yes skips the question. The yard app cannot be removed this way.
By the way#
Every command prints text, in a pipe too. Add
--jsonfor JSON:yard status --json | jq '.rows[].container'.yard <command> --helplists every flag. The CLI reference has them all on one page.yard app lslists every app on the host with its source and trigger.