[Railway] Railway CLI

Ref: https://docs.railway.com/guides/cli # installation brew install railway # login to your account via browser railway login # Link to our project to execute command railway link How to run migration / ssh Copy below command and pasted to current shell, then you will able to execute command. This post is imported from: https://thebrownbox.hashnode.dev/railway-railway-cli

December 6, 2025 · 1 min

Simple .env management with NestJS (with Railway)

I usually deploy my backend in railway. So I usually have only 2 env: local and prod. Create 2 env files: Copy file to .env file in deploy step in package.json Make sure in the PROD deployment we run the correct command (in this case is Railway) Make sure .env file is in .gitignore Note: Variables only load if you install @nestjs/config and import it from AppModule @Module({ imports: [ConfigModule.forRoot()], controllers: [AppController], providers: [AppService], }) export class AppModule {} This post is imported from: https://thebrownbox....

July 20, 2025 · 1 min

How to install packages for service in Railway (NixPacks)

NixPacks is like docker file for setup your service. I have 2 packages need to be installed to able to use a library convert pdf to images: 'graphicsmagick', 'ghostscript' In Railway, to modify nixpacks, just need to create nixpacks.toml file in the root folder. Below is a simple nixpacks file just to install above packages into my service: # https://nixpacks.com/docs/configuration/file [dependencies] # List any additional dependencies if needed nodejs = "18....

October 30, 2024 · 1 min