sailfork / t3code-github / .repos/ alchemy-effect/ website/ src/ content/ docs/ railway/ compute/ regions.mdx

A region is a Railway datacenter. Services, Volumes, Postgres, MySQL, and Mongo take region as a Google-style code (us-west2, us-east4, …). Buckets use a shorter set (sjc, iad, ams, sin). A Project is not pinned to a region.

Omit region and Railway picks the default for that resource.

Pin a Service

export default class Api extends Railway.Service<Api>()(
  "Api",
  {
    project: Site,
    main: import.meta.url,
    region: "us-west2",
    port: 3000,
  },
  Effect.gen(function* () {
    return {
      fetch: Effect.succeed(HttpServerResponse.text("hello")),
    };
  }),
) {}

Updating region on a Service is in place.

Pin Postgres

Postgres region is shared by the service instance and its Volume. Changing it replaces Postgres.

const db = yield* Railway.Postgres("Db", {
  project: site,
  region: "us-west2",
});

Volumes stay in the region

A Volume is created in one region. Changing region replaces the Volume. Attach it to a Service in the same region.

const data = yield* Railway.Volume("Data", {
  project: site,
  mountPath: "/data",
  region: "us-west2",
});

Bucket regions

Buckets speak S3. Their region codes are short:

const data = yield* Railway.Bucket("Data", {
  project: site,
  region: "sjc",
});

Default is sjc. Changing region replaces the Bucket.

CodeLocation
sjcSan Jose, California (US)
iadAshburn, Virginia (US)
amsAmsterdam, Netherlands
sinSingapore

Service region codes

Railway uses Google Cloud region names for compute. This list is what Railway published as of 2026. See Railway regions for the live set.

CodeLocation
us-west1Oregon, USA
us-west2California, USA
us-east4Virginia, USA
europe-west4Amsterdam, Netherlands
asia-southeast1Singapore

Where next

Services pin region on the class. Volumes replace on region change. Postgres is a container + volume in one region. Buckets use sjc / iad / ams / sin.