#Railway fix
1 messages Ā· Page 1 of 1 (latest)
Hey, whatās up? What are you running into with Railway? š¦
logs; Config invalid
File: /data/.openclaw/openclaw.json
Problem:
- channels.discord.streaming: Invalid input (allowed: true, false, "off", "partial", "block", "progress")
That error means the value at channels.discord.streaming is the wrong shape for the build youāre running.
For your current validator, it wants a scalar there, for example:
{
"channels": {
"discord": {
"streaming": "partial"
}
}
}
Valid values are exactly:
true
false"off""partial""block""progress"
So if you currently have something like:
"streaming": { "mode": "partial" }
change it to:
"streaming": "partial"
Also paste:
openclaw --version
Version matters here, because the streaming config shape has changed a bit across releases.
If you want, paste your channels.discord block and Iāll tell you the exact edit.
Docs:
You can also try:
openclaw doctor --fix
That often repairs/migrates config automatically.
This issue we fixed otherday too now again when i did a redeploy of repo, also the version gets back to 2026.3.13.
Itās because i first setup using a railway template and the template owner hasnāt updated repo in a while.
Openclaw doctor āfix doesnāt work on this
And openclaw config set too
So have to edit config file nano doesnāt work too so need a command from you to edit config then i will openclaw uodate and after that i need idea that how can we fix this issue forever
Yep, that tracks.
Whatās happening is:
- Railway keeps
/data - your newer config survives in
/data/.openclaw/openclaw.json - but redeploy pulls the old 2026.3.13 app code from that stale template
- old code canāt read the newer
channels.discord.streamingshape, so boot dies again
So this is basically version drift between code and persistent config.
Use this in the Railway shell to patch the config directly, without nano:
node -e 'const fs=require("fs"); const p="/data/.openclaw/openclaw.json"; const cfg=JSON.parse(fs.readFileSync(p,"utf8")); fs.copyFileSync(p,p+".bak"); cfg.channels ??= {}; cfg.channels.discord ??= {}; cfg.channels.discord.streaming = "partial"; fs.writeFileSync(p, JSON.stringify(cfg, null, 2) + "\n"); console.log("updated:", p, "backup:", p + ".bak");'
Then run:
openclaw --version
openclaw update
openclaw doctor
openclaw gateway restart
Forever fix
openclaw update will unblock you for now, but it will not fix the root cause if Railway keeps redeploying from an old template.
The real fix is:
- Stop using that stale Railway template
- Repoint/recreate the service from the current official Railway setup:
https://docs.openclaw.ai/install/railway
3. Make sure the deploy source itself is current, otherwise every redeploy will rewind the code again
So, short version: persisted /data + old template redeploy = same config crash forever.
If you paste the Railway repo/template link or the build/start command, I can tell you the cleanest permanent setup.
Ok docs shows a template too so in same service i deploy this template and in service settings i change source ?
Yes, if Railway lets you change the existing serviceās source cleanly, thatās the simplest path.
Iād do it like this:
-
Back up first if you can
openclaw backup create -
Point that same service to the official/current OpenClaw Railway template/repo
-
Keep the same env vars
-
Keep the same
/datavolume attached -
Redeploy
-
Check:
openclaw --version
That should stop the old 2026.3.13 code from coming back on redeploy.
If Railway doesnāt let you switch the source nicely, then do this instead:
- create a new service from the official template
- attach the same
/datavolume, or restore from backup - copy over the same Railway variables
My recommendation: use the official template, not the old third-party one.
Docs:
If you want, send a screenshot of the Railway service settings page and Iāll tell you which button to press.
Where will it save backup after Openclaw backup create and how will i load it back
By default, openclaw backup create writes the archive to the current working directory.
On Railway, I would not rely on that, because you usually want the backup on the persistent volume. Use /data/backups explicitly:
mkdir -p /data/backups
openclaw backup create --no-include-workspace --output /data/backups --verify
or, if you only want the config file:
openclaw backup create --only-config --output /data/backups --verify
A couple important bits:
- Right now your config is invalid, so plain
openclaw backup createcan fail - In that situation, use:
--no-include-workspace, or--only-config
Where the file ends up
Something like:
/data/backups/2026-04-16T18-36-00.000Z-openclaw-backup.tar.gz
The command also prints the exact path after it creates it.
How to restore it
There is verify, but not a first-class openclaw backup restore command yet.
So restore is basically:
- extract the archive
- inspect
manifest.json - copy the files back into place
Example:
mkdir -p /tmp/openclaw-restore
tar -xzf /data/backups/<your-backup-file>.tar.gz -C /tmp/openclaw-restore
find /tmp/openclaw-restore -name manifest.json -print
On Railway, the main places youād usually restore back to are:
/data/.openclaw/data/workspace
For your current issue
Honestly, for this one, the simplest backup is just the config file itself:
mkdir -p /data/backups
cp /data/.openclaw/openclaw.json /data/backups/openclaw.json.$(date +%F-%H%M%S).bak
Thatās the easiest āundoā button before editing.
If you want, I can give you the exact backup + patch + restore command sequence for Railway.