# Railway didn't accept the sign-in

> If Settings → Hosting says "Railway didn't accept the sign-in (invalid_client)", press Log in with Railway again, or connect with a project token instead.

Crewtavo reads your Railway costs, sets up your web address and makes a bucket for your files through its connection to Railway. If **Settings → Hosting** says **Railway isn't connected** with:

> Railway didn't accept the sign-in (invalid_client). Try logging in with Railway again.

then Railway has stopped taking the sign-in Crewtavo registered with it. Railway may have removed it, or it may no longer match.

## Log in with Railway again

Since Crewtavo 0.4.2, a sign-in Railway turns down is forgotten. The next try registers a new one.

1. Open **Settings → Hosting**. It shows **Connect Railway again**.
2. Choose **Log in with Railway**, and choose **Authorize** on Railway's screen.

If it shows the same message once more, press **Log in with Railway** one more time. A sign-in that failed before your Crewtavo updated to 0.4.2 is forgotten on the next try, and the try after that works. See [How Crewtavo updates](https://crewtavo.com/docs/hosting/updates/).

## Use a project token instead

If logging in still doesn't work, connect with a project token:

1. On **Settings → Hosting**, open **Can't log in with Railway?**.
2. In your Railway project, open **Settings**, then **Tokens** (**Open Tokens** takes you there).
3. Make a new token. Any name works, like Crewtavo. Pick the environment Crewtavo runs in, usually **production**.
4. Copy the token, paste it under **Project token**, and choose **Connect**.

A project token shows your costs and warnings, and sets up your web address, just like logging in. But Railway doesn't let a project token make or read a storage bucket, so [moving files to a bucket](https://crewtavo.com/docs/hosting/storage/#move-files-to-a-bucket) or [installing Drive](https://crewtavo.com/docs/connections/drive/#on-railway-install-makes-a-bucket-first) stops with **Railway said: Bad Access**. Switch to logging in for those: choose **Remove access** at the bottom of **Settings → Hosting**, then **Log in with Railway**, and try again.

Source: https://crewtavo.com/docs/troubleshooting/railway-sign-in/ (last updated 2026-11-02)
