INTEGRATE

Railway

You can use Phase to sync secrets with your Railway environments.

Prerequisites

Step 1: Authentication

  1. Log in to your Railway Dashboard.

  2. Click on your user icon to see the user account options and click on Account Settings.

Railway dashboard

  1. Click on Tokens in the sidebar menu on the left.

Railway dashboard

  1. Create a New Token with a descriptive name and select No team. Note: If you do not have a Railway Team, you will not see the Team dropdown as shown in the screenshot below.

Railway dashboard

Alternatively, if you do have a Railway Team you want to sync secrets to, please make sure you select your Team from the dropdown.

Railway dashboard

  1. Copy the API Token.

Railway dashboard

Store authentication credentials in Phase

  1. Go to Integrations from the sidebar and click on Third-party credentials in the integrations tab.

Go to integrations

  1. Click on Railway.

railway-create-creds

  1. Enter your Railway API Token from the previous step. Enter a descriptive name and click Save.

railway-input-creds

Your credentials will be encrypted and saved. You can view and manage these credentials under Service Credentials in the Integrations screen.

Step 2: Set up a secret sync

  1. Go to your App in the Phase Console and go to the Syncing tab. Select Railway under the 'Create a new Sync' menu.

create railway sync

  1. Choose the credentials you added in the previous step as the authentication mode, and click Next.

select railway creds

  1. Next, configure the source and destination for your secrets. Pick an Environment from your App as the source. To configure the destination for the sync, choose a Railway Project from the list of available Projects, as well as an Environment. You can also optionally select a specific Service to sync secrets to. Leave this field blank to sync secrets as Shared Variables in the selected Railway environment.

configure railway sync

  1. Once set up, your secrets will automatically be synced to the chosen destination in Railway. You can manage your sync from the Syncing tab of your App, or from the Integrations screen.

railway syncs