Skip to content

Workspaces and tokens

Everything you run on Railway belongs to a workspace: your personal account, or a team you share with others. A workspace holds your projects, their members and their bill. Inside it, each project groups services and databases on their own private network.

Alchemy reaches a workspace through a profile:

Terminal window
alchemy profile edit --add Railway

OAuth pairs Alchemy with your Railway account in the browser, with no token to create. Or paste an account or workspace token, made under Account Settings → Tokens. A project token won’t work: it reaches one project, and Alchemy creates projects.

A Project is created in your token’s workspace, or, for an account token or OAuth, in your first workspace. To pin it to another workspace your token can reach, set workspaceId:

src/project.ts
export const Site = Railway.Project("Site", { workspaceId: "ws_123" });

See Setup for the details.

A stage decides what you deploy, and each stage gets its own project. For a stronger line around production, give it its own workspace and profile, so its members and its bill are separate:

Terminal window
alchemy profile create prod
alchemy profile edit --profile prod --add Railway
alchemy deploy --stage prod --profile prod

With CI=true, Alchemy skips the profile and reads RAILWAY_API_TOKEN from the environment. See CI.

Values your Services read at run time are covered in Variables.