Skip to content

Railway template generates invalid ENCRYPTION_KEY (should be 64-char hex string) #6246

Description

@vitalos-dev

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

  1. Deploy using the official Railway template.
  2. Open Settings → Secrets.
  3. Add TEST_SECRET=hello.
  4. Click Save.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions