|
2 | 2 | title: Configure |
3 | 3 | --- |
4 | 4 |
|
5 | | -TODO: env vars, plugin manifest, business DB drivers. |
| 5 | +# Configure |
| 6 | + |
| 7 | +ObjectOS is configured by environment variables. The runtime has two |
| 8 | +boot modes: **offline** from a local artifact file, or **cloud-connected** |
| 9 | +from an ObjectStack control plane. |
| 10 | + |
| 11 | +## Core variables |
| 12 | + |
| 13 | +| Variable | Required | Default | Description | |
| 14 | +|---|---:|---|---| |
| 15 | +| `PORT` | No | `3000` | HTTP port inside the container. | |
| 16 | +| `OS_CACHE_DIR` | No | `/var/cache/objectos` | Runtime cache directory. Persist it across restarts. | |
| 17 | +| `OS_PROJECT_ID` | Cloud: Yes, File: No | `proj_local` in file mode | Project id used for hostname resolution and runtime identity. | |
| 18 | +| `OS_BUSINESS_DB_URL` | No | `file:/var/lib/objectos/data.db` in compose | Per-project business data location. | |
| 19 | + |
| 20 | +## Offline / air-gapped mode |
| 21 | + |
| 22 | +Offline mode reads a compiled ObjectStack artifact from disk: |
| 23 | + |
| 24 | +| Variable | Required | Example | |
| 25 | +|---|---:|---| |
| 26 | +| `OS_ARTIFACT_FILE` | Yes | `/artifacts/objectstack.json` | |
| 27 | +| `OS_WATCH_ARTIFACT` | No | `1` while developing | |
| 28 | + |
| 29 | +Docker Compose mounts `docker/artifacts` to `/artifacts`, so the default |
| 30 | +offline path is: |
| 31 | + |
| 32 | +```bash |
| 33 | +docker/artifacts/objectstack.json |
| 34 | +``` |
| 35 | + |
| 36 | +## Cloud-connected mode |
| 37 | + |
| 38 | +Cloud-connected mode fetches the current Project Version artifact from an |
| 39 | +ObjectStack control plane: |
| 40 | + |
| 41 | +| Variable | Required | Example | |
| 42 | +|---|---:|---| |
| 43 | +| `OS_CLOUD_URL` | Yes | `https://cloud.example.com` | |
| 44 | +| `OS_PROJECT_ID` | Yes | `proj_xxxxxxxxxxxxx` | |
| 45 | +| `OS_CLOUD_API_KEY` | Optional | deployment token for private control planes | |
| 46 | + |
| 47 | +ObjectOS only talks to the control plane over HTTP. It must not connect |
| 48 | +to the control-plane database directly. |
| 49 | + |
| 50 | +## Business database |
| 51 | + |
| 52 | +The runtime stores customer business rows outside the control-plane |
| 53 | +database. For a first local deployment, the compose default is enough: |
| 54 | + |
| 55 | +```bash |
| 56 | +OS_BUSINESS_DB_URL=file:/var/lib/objectos/data.db |
| 57 | +``` |
| 58 | + |
| 59 | +For production, point this value at a managed or self-hosted database |
| 60 | +driver supported by the upstream `@objectstack/*` packages. Keep the |
| 61 | +business database lifecycle separate from ObjectOS container lifecycle. |
| 62 | + |
| 63 | +## Enterprise plugins |
| 64 | + |
| 65 | +Enterprise plugins belong in `packages/` and are composed in |
| 66 | +`apps/objectos/objectstack.config.ts`. Keep protocol schemas and kernel |
| 67 | +changes upstream in `objectstack-ai/framework`; this repository should |
| 68 | +only package runtime distribution behavior and deployment integrations. |
0 commit comments