Your first app
An app is a container that Velrix keeps running for you. You give it an image and a size; Velrix places it on the server with the most room, starts it, and starts it again if it stops. In this guide you deploy a small web server and look around.
You need an account on a Velrix installation with permission to run apps: your own, or an organisation’s where your role allows it.
1. Open Cockpit
Sign in, then open Cockpit, the first app on the desktop. It shows everything you run as cards, your apps beside your machines, volumes and jobs, or as a table with Table in its toolbar.
2. Deploy an app
Choose Create, then App. The form has a few tabs (General, Run, Health and more); for a first app, only the first one matters.
- Name:
web. - Image: a full reference, with its registry. For example:
docker.io/library/nginx:1.27
A short name such asnginxis refused: Velrix always pulls from the registry you name. - Size: pick one from your catalogue, such as
g.nano. Sizes are your operator’s: each has a family (ggeneral,ccompute,mmemory) and a name. Custom lets you give your own memory and CPU, in cores. - Leave Command empty to run the image’s own command.
Choose Deploy.
A Project field lets you put the app in one of your projects; without one it goes in Default. A project only groups things: it is how the Cockpit frames them, and how a whole group is moved or deleted at once.
Or start from a blueprint. Library in the start menu holds ready-made apps (nginx, PostgreSQL, Redis, Forgejo and more) with a pinned image and a sensible size, in its first section, Blueprints. Choose Deploy on one, and the same form opens filled in.
3. Watch it start
The form closes, and the app’s card is on the Cockpit: open it there. Its status goes from Starting to Running, with the server it runs on. The Deployments tab shows the deploy as its first revision. The Overview tab shows its CPU and memory in use against what its size gives it, measured every ten seconds.
If something is wrong, the page says so in words:
- No host: no server has room for this size right now. Pick a smaller size, or ask your operator.
- It could not be started: the server could not make it. Check the image name, and that the server can pull it.
- Crashing: it stops right after it starts. The page shows the last exit code, and Velrix tries again, each time a little later, up to every five minutes.
4. Read its logs, open a terminal
- Logs shows what the app wrote, followed live, with search and download. Type
@level:errorto see only errors (Apps has the rest). - The Console tab gives you a shell inside the running container, and its files. With several copies, you pick the copy.
5. Tell running from working
Running is not the same as working. A health check is a command Velrix runs inside the container on a timer; exit code 0 means healthy.
On the Settings tab, in Health, choose Add a check, and for this web server enter:
wget -q -O /dev/null http://127.0.0.1/
Then set how often it runs, how many failures in a row mark it Unhealthy, and whether Velrix restarts it then. The image must contain the tool the command calls: here wget.
With a check, a working app reads Healthy, with a beating heart on its card. New revisions are checked too: one that fails its check never replaces the copy that works.
6. Give it a disk
An app’s own files go when it is deleted. Data that must stay goes on a volume.
- In Cockpit, choose Create, then Volume, with a name and a size. Velrix enforces the size.
- Back on the app, open the Volumes tab, choose the volume and a Mount path inside the app, such as
/usr/share/nginx/html, and choose Attach.
7. Variables and secrets
The Variables tab holds the variables the app starts with. Seal the ones that are secrets: a sealed value is encrypted, never shown again, and only the container sees it.
Changes are staged: nothing restarts until you choose Deploy on the bar that says Apply 1 change. Then they run as one revision, rolled out without downtime. References to other apps, shared variables and generated secrets are in Apps.
Clean up
Delete, at the end of the app’s Settings, removes the container for good. Its volumes stay, detached, with what is on them.
The same app, as code
Everything above is also an API call. With an API key (the API reference is in your realm’s Docs window):
curl https://velrix.example.com/api/compute/app.create \
-H "Authorization: Bearer $VELRIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "web", "image": "docker.io/library/nginx:1.27", "size": "g.nano"}'
Or with the velrix command, signed in to your realm with the compute scope:
velrix login https://velrix.example.com --scope compute
velrix api compute:app.create '{"name": "web", "image": "docker.io/library/nginx:1.27", "size": "g.nano"}'
Or with the OpenTofu and Terraform provider, documented in your realm’s Docs window:
resource "velrix_app" "web" {
name = "web"
image = "docker.io/library/nginx:1.27"
memory_mib = 128
}