Documentation

MongoDB

The Railway MongoDB plugin allows you to provision and connect to a MongoDB database with zero configuration.

Install

When you run railway run in a project with the MongoDB plugin installed, we inject several environment variables.

  • MONGOHOST
  • MONGOPORT
  • MONGOUSER
  • MONGOPASSWORD
  • MONGO_URL

Example Usage

This example requires that you run with railway run.

Examples

You can find examples that use the MongoDB plugin at github.com/railwayapp/examples.