1---
2title: Projects
3description: A workspace-scoped namespace containing Services, Environments, Volumes, Variables, and Buckets.
4---
5
6A [`Railway.Project`](/providers/railway/project) is a workspace-scoped
7namespace. It owns environments and services. Names are unique per
8workspace.
9
10## Create a Project
11
12Alchemy generates a unique name unless you pass one.
13
14```typescript
15const site = yield* Railway.Project("Site");
16```
17
18`url` is `https://railway.com/project/{projectId}`. A production
19environment is created with the project — do not recreate it as an
20[Environment](/railway/compute/environments). `environmentId` is that
21primary environment.
22
23Nothing answers on the public internet until a
24[Service](/railway/compute/services) is deployed. The Service gets its
25own `*.up.railway.app` hostname.
26
27:::note
28Prefer omitting `name` in tests and CI so names stay unique and
29reclaimable.
30:::
31
32## A stable name
33
34Pass `name` when you need a stable project name.
35
36```typescript
37const site = yield* Railway.Project("Site", {
38 name: "my-site",
39});
40```
41
42Changing `name` later updates the project in place.
43
44## Description
45
46`description` is optional and updates in place.
47
48```typescript
49const site = yield* Railway.Project("Site", {
50 description: "production web app",
51});
52```
53
54## Workspace
55
56Workspace defaults to the current token
57(`me.workspace ?? me.workspaces[0]`). Pass `workspaceId` to pin it.
58
59```diff lang="typescript"
60const site = yield* Railway.Project("Site", {
61 name: "my-site",
62+ workspaceId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
63});
64```
65
66:::caution[Changing `workspaceId` replaces the Project]
67The Project is created in the new workspace. The old Project is
68deleted.
69:::
70
71## Default environment name
72
73`defaultEnvironmentName` is create-only. Railway's default is
74`production`. Extra environments (staging) are a separate
75[Environment](/railway/compute/environments) resource.
76
77```typescript
78const site = yield* Railway.Project("Site", {
79 defaultEnvironmentName: "production",
80});
81```
82
83## Module-scope declarations
84
85Declare the Project once. Pass it into every child.
86
87```typescript
88// src/project.ts
89import * as Railway from "alchemy/Railway";
90
91export const Site = Railway.Project("Site");
92```
93
94Resource-valued props accept the resource or an Effect producing
95it. Do not unwrap it just to pass it along.
96
97## Destroy
98
99`alchemy destroy` deletes children, then the Project.
100
101## Where next
102
103The [tutorial](/railway/tutorial/part-1) deploys a Project from an
104empty directory. [Services](/railway/compute/services) run in the
105Project. [Environments](/railway/compute/environments) add staging.
106The [`Project` reference](/providers/railway/project) lists every
107prop.
108[Example: railway-project](https://github.com/alchemy-run/alchemy/tree/main/examples/railway-project)
109is a Project plus an image Service.