Application Deployment
Overview
MongoDB Realm uses a deployment-based versioning scheme that allows you to group updates to your application and make them available to client applications at the same time. You can deploy a new version of your application with multiple deployment methods that each fit a particular development workflow. You can also review the historical state of your application based on the built-in deployment history log.
Concepts
Deployment Methods
You can deploy new versions of your application through the Realm UI or one of multiple code-based deployment methods that each suit a particular development workflow.
Deployment Method | Type | Details |
---|---|---|
Realm UI | Manual | Use This Method If:
Deployment Pattern For a detailed walkthrough, see Deploy from the Realm UI
|
Manual | Use This Method If:
Deployment Pattern For a detailed walkthrough, see Deploy Changes with Realm CLI
| |
Realm Admin API | Manual | Use This Method If:
Deployment Pattern For a detailed walkthrough, see Deploy Changes with Realm API
|
Automatic GitHub Deployment | Automatic | Use This Method If:
Deployment Pattern For a detailed walkthrough, see Deploy Automatically with GitHub
|
CI/CD Pipeline with the realm-cli | Automatic | Use This Method If:
Deployment Pattern For a detailed walkthrough, see Set Up a CI/CD Pipeline
|
Application Components
Realm apps are composed of components like Functions, Triggers, Auth Providers, and Values. A deployment consist of at least one new, updated, or deleted component.
Configuration Files
MongoDB Realm uses configuration files to define your application's metadata and components. Every component is defined by its own configuration file and each type of component uses a distinct configuration file schema. The Realm UI manages your application's configuration files for you, but you can also use a code-based deployment method to update your application by adding, modifying, and deleting configuration files directly.
Application Directory
Realm apps are structured in a nested directory format called
an application directory that contains configuration files for your
application components. The configuration files are grouped into
directories based on their component type. You can download a copy of
the application directory for the most recently deployed version of an
app by exporting it from the
Realm UI or realm-cli
, or by cloning the underlying Git repository.
For additional information on the structure of an application directory as well as the schema of each configuration file type, see Realm Application Configuration.
Deployment History
MongoDB Realm logs every deployment of an application and exposes a list of the 25 most recent deployments in the History tab of the Deploy in the Realm UI. Each deployment log includes data about a set of changes, such as their status, origin, and time of deployment.
If you choose to deploy through the Realm UI, any changes you make are grouped in a row at the top of the deployment history table that represents draft changes made since the previous deployment. You can use the Action buttons on this row to manually deploy all draft changes.
The Deployment History is also where you can Export your Realm app, or use the Re-Deploy button to rollback to a prior version.

Summary
- Deployment allows you to group updates to your application and make them available to client applications at the same time in a new version.
- Realm provides four ways to deploy depending on your project's workflow: Realm UI deployment, automatic GitHub deployment,
realm-cli
deployment, and Realm Admin API deployment. - A deployment consists of at least one new, updated, or deleted Realm component such as a Function, Trigger, Auth Provider, or Value.
- Realm tracks deployment history up to 25 versions, allowing you to review and rollback to prior versions.