Leonardo Borges Ramos

Railway stopped, and the lesson was not about downtime

On Wednesday, Railway paused every deploy and warned that environment variables may have been read by third parties. My ERP's API lives there.

News · · 4 min read

In 3 lines
  1. Railway detected unauthorized access to the systems that store customers' environment variables. Some of them may have been read already decrypted.
  2. The official guidance is to rotate every variable and key stored there. Deploys were still paused at 11:19 p.m. on Wednesday (Brasília time).
  3. The lesson that stays: deleting a secret does not invalidate the stolen copy. What protects you is rotating the key at its source.
The Railway repository card on GitHub
railwayapp no GitHub

A platform that runs servers in the cloud: you push the code and it handles machines, networking and deploys. is where Develop's ERP API lives: the server behind the browser, the Windows app and the iPhone. On Wednesday, October 21, it stopped accepting deploys and published a security notice. Servers that were already running stayed up. The problem was something else.

What Railway said

In a notice signed by founder Jake Cooper, Railway says it detected "anomalous activity" on the systems that store customers' The values a server reads at startup that are not in the code: database password, API keys, tokens. It is where the secrets live.. A third party may have accessed encrypted variables and, for some of them, the decrypted contents: API keys, database and registry credentials. The company believes it is part of a wave of attacks on platforms aimed at reaching AI providers' keys.

We strongly recommend that you revoke all environment variables stored in Railway.

The request is direct: revoke every variable stored on Railway, rotate private registry credentials and check the logs for unusual activity.

Railway's security disclosure, signed by Jake Cooper, published on the morning of 10/21.
Railway's security disclosure, signed by Jake Cooper, published on the morning of 10/21.

The day, hour by hour

Brasília time (UTC−3), from Railway's status page.

  1. 4:24 a.m.InvestigatingThe incident opens as a platform outage.
  2. 6:28 a.m.Dashboard downRailway's dashboard, API and CLI go down. New builds paused in every region.
  3. 8:33 a.m.Partial returnRailway's API partly comes back.
  4. 4:15 p.m.Return planBuilds would come back in stages: Enterprise, Pro, Hobby and Free last.
  5. 5:19 p.m.Sessions killedEvery login is invalidated; each user has to sign in again.
  6. 6:59 p.m.The notice"We strongly recommend that you revoke all environment variables." Deploys still paused, Enterprise included.
  7. 7:37 p.m.BucketsRailway rotates every customer's storage credentials on its own.
  8. 10:22 p.m.Still paused"We are continuing to work to make builds available again."
  9. 11:19 p.m.The guidesRailway publishes guides: check for unexpected OpenRouter, Grok and Anthropic usage and rotate PostgreSQL credentials. Builds still down.
Railway's status page on Wednesday night: major outage, builds stopped in all four regions and the list of security guides.
Railway's status page on Wednesday night: major outage, builds stopped in all four regions and the list of security guides.

What I did

I copied the variables to a file outside the cloud and deleted all of them from Railway, on every service. But deleting does not solve it on its own. If someone read the password yesterday, it still works today, whether or not it is on the dashboard. What invalidates the copy is rotating the key where it is born: at the AI provider, on GitHub, in the database, at the payment gateway.

  1. Revoke at the source

    Each key is rotated where it was issued. I started with the AI keys, which were the target of the attack, and tested each one: the old one has to return 401.

  2. Do not restart blind

    A server that was already running keeps the old variables in memory and keeps answering. If it restarts before the values are back, it comes up with nothing.

  3. Restore in one go

    When deploys return, every variable goes in together, already with the new values, and a single deploy brings everything up.

  4. Delete the backup

    The file with the old values leaves the machine as soon as the new ones are live.

What stays

The incident was not about downtime: the ERP kept serving. It was about where secrets live. When every key is in one place, that place becomes the target. Next week I will write about what changed here: a list of every secret, where it is born and how long it takes to rotate.

Deploys had not come back when this text was published, at 11:19 p.m. on Wednesday (Brasília time).

What I take from it

A secret is only worth something while nobody else has a copy. The key rotation plan has to exist before the incident, not during it.

Where to see itRailway's disclosureThe status page

More from the journal · Open sourceThe three repositories that gained the most stars this week

All issues →

Quer conversar sobre isso?