Railway
Learn how to sync your Doppler secrets to your Railway projects.
This guide is designed to get you set up with syncing your secrets to Railway. We assume you already have a project created on Railway.
Prerequisites
- You have an account setup at Railway and have a project created.
Railway API Token
Railway project-specific tokens will not work! Those tokens are primarily for their CLI, use their legacy API and don't yet work with their new API. As such, they also won't work with our integration! Please make sure you create tokens as described below.
Go to your Railway token creation page. If you haven't already, join their Priority Boarding beta program by clicking the link on that page (their API is still in beta!).

Next, name your token "Doppler" (or whatever else you like), choose your team from the dropdown (if applicable) and click the Create button:

You'll need this API token in the next step. You can get more information about these API tokens in Railway's API Authentication documentation.
Authorization
In your Doppler project, navigate to Integrations and select Railway:

Set the Name to anything you like (this will be used to help you identify this sync when viewing the integrations for this config) and paste the API key you created in the previous step into the API Token field. Then click Connect.

You have now successfully connected your Railway account with Doppler!
Configuration
Next, you can select which Railway project and environment you would like to sync. If the environment has services, you'll be able to choose a specific service to sync to or choose Shared across all services (which will sync your secrets to the project's shared variables). Finally, you can select which Doppler config you want to sync over and whether or not you want your services to redeploy when any secret changes happen. You can also choose the import behavior for any variables already existing for your Railway project when the first sync is performed.
If you use the Shared across all services option, note that you'll need to take an additional step in Railway to select which services on the project to share each secret with and then perform a manual deploy (after which, redeploys will be performed automatically if you had that option selected). If you don't take this step, then your services won't get automatically redeployed because we only do that for either the selected service or services you've shared the secrets with. You can follow the link on the sync list page once setup is complete to get to the Railway shared variables page to do this.

Click Set Up Integration and you're all set!
The secrets from your selected config will be immediately and continuously synced with your Railway project.
Amazing Work!
Now you are all set up on Railway. The next time you deploy your secrets will be fetched from Doppler.
Updated 5 days ago