# Managing services

Source: https://kilat.host/docs/services

A service is one running app in your workspace. Each service page has tabs for Overview, Environment, Domains, Logs, Terminal, and Settings.

## Service status

| Status | Meaning |
| --- | --- |
| Queued / provisioning | KilatBot is creating the service on a server. |
| Starting | The app is booting. First starts can take a few minutes while the image downloads. |
| Running | The app is up and reachable at its address. |
| Stopped | The app is stopped. Data in its storage is kept. |
| Failed | Provisioning did not finish. Use **Retry deployment**; you are not charged again. |

## Actions

- **Refresh status** asks the server for the current state.
- **Restart** restarts a running app.
- **Stop** stops the app and keeps its data.
- **Recreate** rebuilds the app with your latest environment variables. Persistent storage is kept.
- **Delete** removes the service and its storage. This cannot be undone, so keep your own backups.

Lifecycle actions need active paid hosting on the workspace.

## Domains

Open the service's **Domains** tab to change its KilatBot subdomain or add a custom domain. Agents and PocketBase use the same DNS ownership checks.

1. Add your hostname, without a scheme or path.
2. Publish the A and TXT records shown. Keep any DNS proxy off while verifying.
3. Select **Verify ownership**. The address becomes active only after routing and a trusted HTTPS certificate work. If HTTPS is still pending, use **Retry routing** after DNS propagates.

A renamed KilatBot address stays active until the new address passes HTTPS checks. Central-proxy domain changes do not restart your service or wake a sleeping Flex agent.

Agent addresses redirect to private chat in KilatBot, where sign-in and owner access are required. They do not publish the agent's API, RPC or runtime dashboard. PocketBase addresses serve PocketBase with its existing access rules.

## Storage and backups

Every catalog app has persistent storage that survives restarts and recreation. Persistent storage is not a backup: export your data regularly.

## Environment variables

Set configuration and secrets for a service from its **Environment** tab.

### Saving and applying

Saving stores the variables encrypted. They take effect when you select **Recreate service**, which rebuilds the app without deleting persistent storage.

### Rules and limits

| Limit | Value |
| --- | --- |
| Variables per service | 50 |
| Key length | 128 bytes |
| Value length | 8,192 bytes |
| Total size | 32,768 bytes |

- Keys must be valid shell variable names, for example `API_BASE_URL`.
- Variables the catalog app manages itself cannot be overridden.
- Dollar signs in values are kept literally.

For model provider keys, create a separate key for each service with a spending limit, and rotate it when you remove the service.

## Logs and terminal

See what your app is doing and run commands inside it, straight from the browser.

### Logs

- Show the last 100, 500, or 1,000 lines, updating live every few seconds.
- Pause the stream, search within it, or download it as a text file.
- Logs can contain secrets from your app. Downloads stay on your device.

### Terminal

The **Terminal** tab opens a shell inside your running app's container, not on the server itself. Commands run as the app's own non-root user.

- Available while the service is running and hosting is paid.
- One terminal session per service at a time; idle sessions close automatically.
- Open links with Cmd-click on macOS or Alt-click elsewhere.
