Docs Menu

Create a Realm App with Realm CLI

On this page

  • Prerequisites
  • Procedure
  • Authenticate a MongoDB Atlas User
  • Run the App Creation Command

You can use the MongoDB Realm CLI to create a new server-side Realm app.

1

Use your MongoDB Cloud API Key to log in:

realm-cli login --api-key="<my api key>" --private-api-key="<my private api key>"
2

The CLI can create an app and copy its configuration files to a local directory with a single command. The command asks you to specify the app name and the Atlas project that should contain the app. You can configure the command with flags or interactively.

realm-cli apps create

The command also supports additional flags that you can optionally include to customize your app. The following table lists common flags you might use:

--template

Choose a template app to start from.

Valid values:

  • triggers
  • web.mql.todo
  • web.graphql.todo
  • android.kotlin.todo
  • ios.swift.todo
  • react-native.todo
  • xamarin.todo
--deployment-model

Defines the app's deployment model.

Valid values:

  • GLOBAL
  • LOCAL
--location

Defines a local app's deployment region.

Valid values:

  • US-VA (us-east-1)
  • US-OR (us-west-2)
  • DE-FF (eu-central-1)
  • IE (eu-west-1)
  • SG (ap-southeast-1)
  • AU (ap-southeast-2)
  • IN-MB (ap-south-1)
--environment

Defines the app's environment.

Valid values:

  • development
  • testing
  • qa
  • production
Tip
See also:

For more details and additional flags, see the CLI documentation for the create command.

←  Create a Realm App with Realm UICreate a Realm App with Realm API →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.