Railway template generates invalid ENCRYPTION_KEY (should be 64-char hex string)
Author: vitalos-devCreated Aug 4, 2026Updated Sep 12, 2026
Labelsbug
Description
Deploying Sim using the official Railway template generates an ENCRYPTION_KEY that is not compatible with Sim.
The generated value looks like:
9U8FH7siuiZFhVbe--pf...
However, when attempting to save Workspace Secrets, the backend returns:
ENCRYPTION_KEY must be set to a 64-character hex string
and the request fails with HTTP 500.
Expected
The Railway template should generate ENCRYPTION_KEY as:
openssl rand -hex 32
which produces a 64-character hexadecimal string.
Actual
The generated value appears to be a generic secret (base64/url-safe), not a hex string.
Steps to reproduce
- Deploy using the official Railway template.
- Open Settings → Secrets.
- Add TEST_SECRET=hello.
- Click Save.
- Observe HTTP 500.
Railway log:
ENCRYPTION_KEY must be set to a 64-character hex string
Workaround
Generate a new key with:
openssl rand -hex 32
Replace ENCRYPTION_KEY in Railway and redeploy.
Source: simstudioai/sim