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.
Sign in with a profile
Section titled “Sign in with a profile”Alchemy reaches a workspace through a profile:
alchemy profile edit --add RailwayOAuth 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:
export const Site = Railway.Project("Site", { workspaceId: "ws_123" });See Setup for the details.
Keep production apart
Section titled “Keep production apart”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:
alchemy profile create prodalchemy profile edit --profile prod --add Railwayalchemy deploy --stage prod --profile prodWith 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.