> For the complete documentation index, see [llms.txt](https://docs.kobotai.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kobotai.co/world/guides/deploy-a-world.md).

# Deploy a world

A WorldDevKit server is an ordinary Node.js 20 process. It needs one public HTTPS origin and no central control plane.

## Runtime contract

Configure the starter with:

| Variable    | Example                      | Purpose                                  |
| ----------- | ---------------------------- | ---------------------------------------- |
| `WORLD_URL` | `https://your-world.example` | Canonical public origin and API URL base |
| `HOST`      | `0.0.0.0`                    | Accept traffic from the hosting platform |
| `PORT`      | Supplied by host             | HTTP listener port; defaults to `8787`   |

Use these platform commands:

```
Install: pnpm install --frozen-lockfile && pnpm build
Start: pnpm --dir examples/minimal-world start
Health check: /api/world/v0
```

## DNS and TLS

1. Point `your-world.example` at the hosting platform.
2. Enable HTTPS.
3. Set `WORLD_URL=https://your-world.example`.
4. Route every path to the same Node process.

Do not mount only `/api/world/v0`. Discovery must remain available at:

```
https://your-world.example/.well-known/world.json
```

## Verify production

```sh
curl https://your-world.example/.well-known/world.json
node scripts/worldkit/check-live-level1.mjs https://your-world.example
```

The discovery document must advertise the same HTTPS origin clients use. Never advertise `localhost`, a container hostname or an internal bind address.

## Scaling

The starter keeps entities and rate limits in process. Before running multiple instances:

* replace the in-memory entity source with shared durable storage;
* replace `createMemoryRateLimiter` with a shared limiter;
* keep entity IDs stable;
* deploy backwards-compatible schema changes before new writers.

The protocol handler itself is stateless and can run behind any HTTP load balancer once those adapters are shared.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kobotai.co/world/guides/deploy-a-world.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
