Templates

Templates allow you to deploy a fully configured project that is automatically connected to infrastructure. Examples of templates are:

  • NextJS app with Prisma
  • Django app connected to Postgres
  • Elixir Phoenix webserver
  • Discord/Telegram bots

You can find featured templates on our dedicated templates page.

Updatable Templates

Every time you visit a project deployed from a template, we will check to see if the project it is based on has been updated by its maker.

If it has received an upstream update, we will create a branch on the GitHub repo that was created when deploying the template, allowing for you to test it out within a PR deploy. If you are happy with the changes, you can merge the pull request, and we will automatically deploy it to your production environment.

Creating a Template

The Railway button page allows you to create templates to offer a 1-click deploy on Railway experience. Services within a template can point to any public repository.

Template Editor

Configure your own button at railway.app/button where you can define the repo to deploy, plugins to install, and required env vars.

Specifying a Branch

When adding services to a template, you can enter a url to a GitHub repo's branch to have a user clone that instead of the main branch.

Additional Configuration

You can configure the following fields to enable successful deploys for template users.

  • Root Directory (Helpful for monorepos)
  • Start command
  • Healthcheck Path
  • Variables (with an optional description default value)

Convert a Project into a Template

You can also convert an existing project into a template by heading over to your project settings page. We will automatically identify and add all the required services and plugins.

Generate template from project

Within the Project Settings, you can convert your project into a ready-made Template for other users by pressing the "Create Template" button.

Publishing a Template

Once you create a template, you have the option to publish it. Publishing a template will add it to our templates page. Simply click the publish button and fill out the form to publish your template.

Template publishing form

Managing your Templates

You can see all of your templates on your Account's Templates page. Templates are separated into Personal and Published templates. You can edit, publish/unpublish and delete templates whenever you'd like!

Account templates page

Edit this file on GitHub