---
title: "Discussion on \"Simple .env management with NestJS (with Railway)\" | Hashnode"
description: "Discussion on \"Simple .env management with NestJS (with Railway)\". I usually deploy my backend in railway.So I usually have only 2 env: local and prod.\n\nCreate 2 env files:\n\n\n\n\nCopy file to .env file in deploy step in package.json\n\n\n\n\nMake sure in the PROD deployment we run the correct command (in this case is Railw..."
url: "https://hashnode.com/posts/simple-env-management-with-nestjs-with-railway/687ca91d928e86b2057f9ea0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Simple .env management with NestJS (with Railway)](https://thebrownbox.hashnode.dev/simple-env-management-with-nestjs-with-railway?utm_source=hashnode&utm_medium=feed)

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 Railw...

Jul 20, 2025 · 1 min read · thebrownbox.hashnode.dev  
Updated Aug 2, 2025  
Read the article

-   [#dotenv](https://hashnode.com/tag/dotenv)
-   [#nestjs](https://hashnode.com/tag/nestjs)
-   [#railway](https://hashnode.com/tag/railway)
-   [#env](https://hashnode.com/tag/env)

## Written by

[The Brown Box](https://hashnode.com/@hoangvancong)

@hoangvancong

  
[View profile](https://hashnode.com/@hoangvancong)

Software Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
