@0xlimo/host
x1-host runs developers' Node.js game servers in a sandbox behind play.0x.limo. This page covers what your server gets, its limits, and the API that 0x deploy-server uses.
0x deploy-server uploads your game server to x1-host, the 0x service that runs it. Players
reach it at https://play.0x.limo/x1/game/<app>/, over HTTP and WebSocket. <app> is your
hosted site's name (the id in 0x.config.json). The package is the runner itself. You do not
need to install it to deploy; the CLI talks to the service. Running your own instance is out of
the scope of these docs.
Registry version: 0.1.1. 0x hosting runs 0.1.2.
#Your server's environment
| Variable | Value |
|---|---|
PORT | 8080; listen on it |
ZEROX_APP | your app (site) name |
ZEROX_PUBLIC_URL | where players reach you (https://play.0x.limo/x1/game/<app>/) |
ZEROX_BCAST_URL, ZEROX_BCAST_SERVER_URL | the broadcast service, through a loopback forwarder (ws://127.0.0.1:7801/…) |
ZEROX_BCAST_PLAYER_URL | the broadcast service's player endpoint, for your clients |
ZEROX_BCAST_TOKEN | your app's broadcast token |
ZEROX_API_URL | the platform API, through a loopback forwarder (http://127.0.0.1:7802) |
The host also sets each of these under its old name, X1_* (for example X1_BCAST_TOKEN), so servers written before the rename to 0x keep working; read ZEROX_* first and fall back to X1_*.
@0xlimo/net's connectServiceServer() and @0xlimo/iap/server's IapServer.fromEnv() pick these up
with no arguments. Requests reach your server with the /x1/game/<app> prefix removed, and with
X-Forwarded-Prefix: /x1/game/<app>.
#The sandbox
| Limit | Value on 0x hosting |
|---|---|
| CPU | 1 |
| Memory | 512 MiB, including /tmp |
| Processes | 128 |
/tmp | 64 MiB tmpfs; everything else is read-only |
| Open files | 4096 |
| Logs | 5 MB per file, 2 files |
Bundle (upload, .tar.gz) | 50 MB |
Installed size (after npm ci) | 400 MB |
| Running servers | 2 per developer, 20 in total |
| Network | loopback only: the broadcast service and the platform API are forwarded in; nothing else (no LAN, no internet) |
- Your code runs as an unprivileged user (
node:24-bookworm-slim), with no capabilities andno-new-privileges. It sees only its own app directory, read-only. - Dependencies install with
npm ci --ignore-scriptsin a throwaway container. No package scripts run, and@0xlimo/*packages are bundled for you by the CLI. - Any exit restarts the server, with a backoff that doubles from 100 ms and resets after 10 s of running.
- Paid games' servers are meant to take owners only, through @0xlimo/paygate, which is not deployed on 0x.limo.
#The developer API
0x deploy-server and 0x server … call these endpoints with your 0x developer token
(0x login). They are on https://api.0x.limo/x1/host:
| Method and path | Purpose | CLI |
|---|---|---|
PUT /x1/host/v1/servers/<app>?entry=server.mjs (body: the bundle .tar.gz) | deploy and (re)start | 0x deploy-server |
GET /x1/host/v1/servers | your servers | |
GET /x1/host/v1/servers/<app> | status: {app, release, entry, deployedAt, url, state, container, usage, limits} | 0x server status |
GET /x1/host/v1/servers/<app>/logs?tail=200 | plain text: the host's notes (install, start, restarts), then your console output; tail 1–5000 lines | 0x server logs |
POST /x1/host/v1/servers/<app>/stop, …/start | stop or start | 0x server stop, 0x server start |
GET /x1/host/v1/public/servers/<app> (no auth) | {app, url, state, release, since}, for the catalog and launchers |
Errors are JSON {"error": "…"}:
| Status | When |
|---|---|
400 | bad app name: lowercase letters, digits and -, 2–41 characters |
401 | no or bad token (sign in with 0x login) |
403 | the app belongs to another developer, or is not one of your hosted sites (0x publish --site <app> first) |
404 | no hosted server |
413 | bundle over 50 MB, or installed size over 400 MB |
422 | the build failed (see 0x server logs), or the entry file is not in the bundle |
429 | you already run 2 servers (0x server stop <app>) |
503 | the hosting pool is full |
A player request for a stopped or unknown app gets 404 no such game server.
The runner's internals are described in the reference.
