Docs Menu

Docs HomeAtlas App Services

Export an App with Realm CLI

On this page

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

You can use the Atlas App Services CLI to export your App's configuration.


Secrets Not Exported

When you export your App, the export does not include the secrets. To add your secrets to a different app, refer to the documentation on migrating configuration, including secrets, to a new App.


Export is the v1 Realm CLI command, and is an alias for pull in the v2 Realm CLI.

  • A properly installed copy of realm-cli that has been added to your system PATH.

  • A MongoDB Atlas programmatic API key. You must be a Project Owner to export an App.


Use your MongoDB Cloud API Key to log in:

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

You can export an application's configuration directory by specifying its remote App ID and an optional local path. If you do not specify a local path, the command outputs the configuration directory in the current working directory.

realm-cli pull --remote=<App ID> --local=<Output Directory Path> [options]


The directory specified by --local must not already exist, otherwise realm-cli throws an error and does not pull the configuration files.

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

If specified, exports any external dependencies included in a node_modules archive in the /functions directory of your App.
If specified, exports all hosted static assets in the hosting/files directory of your App.

Your application will be exported to a local application directory. If you did not specify a path for the directory with --local, it will be exported with the same name as the application into the current working directory.

←  Export an App (App Services UI)Export an App with Atlas App Services API →
Give Feedback
© 2022 MongoDB, Inc.


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