VARIABLES CHECKLIST
Documentation management API with real-time MongoDB sync
✅ Railway Variables Checklist for Docs-api Service
5 Variables You Need to Add
Looking at your Railway screenshot, you have "No Environment Variables" set. Add these 5:
1️⃣ JWT_SECRET (COPY from backend-api)
Variable: JWT_SECRET
Value: <open your backend-api Railway service and copy this value>
Where: backend-api Railway service → Variables tab → Copy JWT_SECRET value
Critical: MUST match backend-api exactly!
2️⃣ SYSTEM_TOKEN (COPY from backend-api)
Variable: SYSTEM_TOKEN
Value: <open your backend-api Railway service and copy this value>
Where: backend-api Railway service → Variables tab → Copy SYSTEM_TOKEN value
Critical: MUST match backend-api exactly!
3️⃣ MONGODB_CONNECTION_STRING_TEST_MODULES (FROM .env.local)
Variable: MONGODB_CONNECTION_STRING_TEST_MODULES
Value: <copy from your .env.local file>
Where: Your .env.local file in the project root
Looks like: mongodb+srv://username:[email protected]/
Note: This is your TEST-MODULES cluster (different from main production)
4️⃣ ALLOWED_ORIGINS (NEW)
Variable: ALLOWED_ORIGINS
Value: https://gograb.space,http://localhost:5010
Type manually: Just paste this value exactly as shown
5️⃣ NODE_ENV (NEW)
Variable: NODE_ENV
Value: production
Type manually: Just paste "production"
How to Add in Railway
In your screenshot:
- Click "+ New Variable" button (top right)
- For each variable above:
- Enter the Variable name
- Paste the Value
- Click "Add"
- After all 5 are added, click "Deploy" (top right)
Quick Check
After adding, you should see:
- Service Variables: 5 variables (the ones you just added)
- 6 variables added by Railway: These are auto-generated (PORT, etc.)
- Total: 11 variables
To Copy from backend-api
- Open new tab: https://railway.com/project/
- Click backend-api service
- Click "Variables" tab
- Find JWT_SECRET → Click to reveal → Copy
- Find SYSTEM_TOKEN → Click to reveal → Copy
- Go back to Docs-api tab and paste
Summary
COPY from backend-api Railway (2 variables):
- JWT_SECRET
- SYSTEM_TOKEN
COPY from your .env.local (1 variable):
- MONGODB_CONNECTION_STRING_TEST_MODULES
TYPE manually (2 variables):
- ALLOWED_ORIGINS=https://gograb.space,http://localhost:5010
- NODE_ENV=production
That's all you need! ✅