@@ -71,6 +71,39 @@ If you’re filing a bug, please include the output of:
71714 ) Copy the ** Bot Token** and paste it into ` /setup `
72725 ) Invite the bot to your server (OAuth2 URL Generator → scopes: ` bot ` , ` applications.commands ` ; then choose permissions)
7373
74+ ## Persistence (Railway volume)
75+
76+ Railway containers have an ephemeral filesystem. Only the mounted volume at ` /data ` persists across restarts/redeploys.
77+
78+ What persists cleanly today:
79+ - ** Custom skills / code:** anything under ` OPENCLAW_WORKSPACE_DIR ` (default: ` /data/workspace ` )
80+ - ** Node global tools (npm/pnpm):** this template configures defaults so global installs land under ` /data ` :
81+ - npm globals: ` /data/npm ` (binaries in ` /data/npm/bin ` )
82+ - pnpm globals: ` /data/pnpm ` (binaries) + ` /data/pnpm-store ` (store)
83+ - ** Python packages:** create a venv under ` /data ` (example below). The runtime image includes Python + venv support.
84+
85+ What does * not* persist cleanly:
86+ - ` apt-get install ... ` (installs into ` /usr/* ` )
87+ - Homebrew installs (typically ` /opt/homebrew ` or similar)
88+
89+ ### Optional bootstrap hook
90+
91+ If ` /data/workspace/bootstrap.sh ` exists, the wrapper will run it on startup (best-effort) before starting the gateway.
92+ Use this to initialize persistent install prefixes or create a venv.
93+
94+ Example ` bootstrap.sh ` :
95+
96+ ``` bash
97+ #! /usr/bin/env bash
98+ set -euo pipefail
99+
100+ # Example: create a persistent python venv
101+ python3 -m venv /data/venv || true
102+
103+ # Example: ensure npm/pnpm dirs exist
104+ mkdir -p /data/npm /data/npm-cache /data/pnpm /data/pnpm-store
105+ ```
106+
74107## Troubleshooting
75108
76109### “disconnected (1008): pairing required” / dashboard health offline
0 commit comments