LogoLogo
Getting StartedDevelopersDeployment GuideGet Help
  • Quick Links
  • Welcome to Form.io
    • Getting Started With Form.io
    • Launch a Form
    • Overview of Form.io
  • Developer Tool Ecosystem
    • PDF Solution
    • Enterprise Form Builder
    • Form View Pro
    • The Security Module
    • Accessibility Compliance Module
    • Developer License
    • SQL Connector - Deprecated
    • Integration Libraries
    • Form.io CLI Tool
  • User Guide
    • Introduction
    • Form.io Developer Portal
    • Teams
    • Projects
      • Project UI
      • Project Settings
      • Stages
      • Multi-Tenancy
    • Resources
      • ResourceJS
    • Forms
      • Form Creation
      • Form Types
      • PDF Forms
      • Embedding a Form
      • Form Revisions
      • Form Settings
    • Form Building
      • Form Builder UI
      • Form Components
        • Component Settings
        • Basic Components
          • Resource as Select Component Data Source
        • Advanced Components
        • Layout Components
        • Data Components
        • Premium Components
          • Nested Forms
        • Custom Components
      • Logic & Conditions
      • Existing Resource Fields
      • Actions
    • Submissions
      • Accessing Submissions
      • Importing Submissions
    • Form.io eSignature - Coming Soon
    • Form.io Reporting Module
    • PDF Template Designer
    • Form View Pro
    • Form Manager
    • Enterprise Form Builder Module
      • Installation
      • User Guide
  • Developer Guide
    • Introduction
      • Application Development
      • API Documentation
    • Form Development
      • Form Renderer
      • Form Builder
      • Form Embedding
      • Form Evaluations
      • Form Templates
      • Custom Components
      • Translations
    • JavaScript Development
      • JavaScript SDK
      • JavaScript Frameworks
      • JavaScript Utilities
    • Authentication and Authorization
      • SAML
      • OAuth
      • LDAP
      • Resource Based Authentication
      • Email Authentication
      • Two-Factor Authentication
    • Roles and Permissions
      • Field Match-Based Access
      • Field-Based Resource Access
      • Group Permissions
    • Integrations
      • Email Integrations
      • File Storage
      • Google Developer Console
      • eSign Integrations
      • Relational Databases
    • Modules
    • Fetch Plugin API
    • CSS Frameworks
    • Offline Mode
    • Audit Logging
  • Deployments
    • Self-Hosted Deployment
      • Local Deployment
        • Local File Storage
      • Kubernetes
      • Cloud Deployment
        • AWS Deployment
          • AWS Lambda
          • Form.io/AWS Elastic Beanstalk End-To-End Encrypted Deployment
        • Azure Deployment
          • Azure App Service
            • Azure MSSQL Connector - Deprecated
          • Azure Virtual Machine
          • Azure Kubernetes Service
          • Set up the DB
        • GCP Deployment
          • GCP Cloud Run
      • On-Premise Deployment
      • Enterprise Server
      • PDF Server
    • Deployment Configurations
      • DNS Configuration
      • Load Balancer Configuration
    • Licenses
      • License Management
      • Library Licenses
    • Portal Base Project
      • Portal SSO
      • Portal Translations
    • Maintenance and Migration
      • Changes to Premium Libraries
  • FAQ
    • FAQ
    • Tutorials & Workflows
      • Password Reset
      • Dynamic Select Filtering
      • Approval Workflow
      • SSO Email Token
      • Embedding A Video
      • Data Source Validation
      • Select Data Source Options
      • Nested Form Workflows
        • Nested Wizard Forms
      • Save as Draft
      • Role-Based Conditions
      • Custom Component
      • Dynamic Radio and Select Box Values
      • Override CKEDITOR
    • Errors
    • Examples
    • License Utilization Checks
  • Contact Us
Powered by GitBook
On this page
  • MongoDB Atlas
  • CosmosDB
  • Version Compatibility
  • API Version 3.6 Notes
  • Cosmos Feature Support Matrix

Was this helpful?

  1. Deployments
  2. Self-Hosted Deployment
  3. Cloud Deployment
  4. Azure Deployment

Set up the DB

Form.io's data model is driven by MongoDB. Deployments to Azure may use MongoDB Atlas or the Azure-native CosmosDB.

PreviousAzure Kubernetes ServiceNextGCP Deployment

Last updated 22 days ago

Was this helpful?

Before continuing please see the section for Cosmos DB .

Form.io requires a MongoDB-compatible database to run its platform. Refer to the process that matches the anticipate deployment stack:

  • MongoDB Atlas

  • Azure CosmosDB

MongoDB Atlas

Before deployment, create an account at . Follow the steps provided by MongoDB to create the cluster while observing the guidelines described below.

Performance

When configuring the performance of the cluster, it may be necessary to review the advanced settings. The particular settings selected may depend on the planned deployment. The following baseline standard may be used when determining the application's needs:

  1. For production environments, the dedicated tier may be required.

  2. Consider enabling multi-region replication to create additional instances for greater availability.

  3. Choose a sufficient cluster tier based on the expected usage. M10 is typically sufficient for development. M20 is the recommended baseline for production.

Security

When configuring the security settings in MongoDB Atlas after clicking Create Cluster, refer to the following guidelines:

  1. Record the username and password for use in the connection string later.

  2. Ensure the IP address of the Azure VM is added to the whitelist.

If the deployment requires additional security that would mandate a private endpoint, refer to the regarding connecting cloud services to a private endpoint.

Connection String

From the MongoDB Atlas Project Overview, open the Connect Menu and generate a legacy (standard) connection string. It will appear similar to the following:

mongodb://formio:<db_password>@<node1>,<node2>,<node3>/?replicaSet=<replicaSetName>&ssl=true&authSource=admin&retryWrites=true&w=majority&appName=<appName>

Note the following placeholders:

  • <node1>... : These will correspond to the individual instances of the DB.

  • <replicaSetName>: The atlas-generated replica set name.

  • <appName>: Typically formio.

Supplying the required info creates a connection string similar to the following, using the example password badPassword:

mongodb://formio:badPassword@formio-shard-00-00.qa5hm.mongodb.net:27017,formio-shard-00-01.qa5hm.mongodb.net:27017,formio-shard-00-02.qa5hm.mongodb.net:27017/?replicaSet=atlas-6fxuzs-shard-0&ssl=true&authSource=admin&retryWrites=true&w=majority&appName=formio

Observe that?ssl=true indicates a database connection over SSL, &retryWrites=trueindicates retryWrites is supported, and uses the admindatabase rather than IAM to authenticate.

Record this connection string for later.

CosmosDB

Follow these instructions to setup a new database.

  1. In the left-hand column, click on the menu item that says Azure Cosmos DB.

  2. Click on the + Create button

  3. When asked "Which API best suits your workload?" select Azure Cosmos DB for MongoDB

  1. On the Basics enter these settings.

    • Under Project Details choose a Subscription

    • Under Project Details choose a Resource Group

    • Under Instance Details enter an Account Name.

    • Under Instance Details select a Region of you choice.

    • Under Instance Details select the Capacity Mode.

    • Under Instance Details uncheck Limit total account throughput.

  1. You can then press Review + create button, you will then wait few moments for the database to create.

  2. After the database has finished settings up on the left column you will select the Connection Strings tab.

  1. Form.io does require that you use a standard connection string, so you will need to make a small change to what Azure provides you by adding your database name to the connection string.

    • This is placed right after the formio.documents.azure.com:10255/ and before the text ?ssl=true. It should look like the following.

mongodb://formio-developer-cosmos-db:[PASSWORD]@formio-developer-cosmos-db.mongo.cosmos.azure.com:10255/formio?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000&appName=@formio-developer-cosmos-db@

Version Compatibility

This section will be dedicated to defining changes as they relate to Form.io between Cosmos DB versions. Currently Form.io supports the latest version of Cosmos DB (at the time of writing is 7.0).

API Version 3.6 Notes

In order to do a sort on a property, there must be an index set. This is different from how MongoDB works as MongoDB allows sorting on any property regardless of an index being set.

db.submissions.createIndex( {"$**": 1 } );
db.forms.createIndex( {"$**": 1 } );
db.projects.createIndex( {"$**": 1 } );
db.actions.createIndex( {"$**": 1 } );
db.roles.createIndex( {"$**": 1 } );
db.tags.createIndex( {"$**": 1 } );

Partial Support for $lookup

Cosmos DB supports basic $lookup operations for equality matches but does not support advanced features like uncorrelated subqueries. For complex join operations, consider restructuring your data model or using alternative methods.

Feature
Context
3.6
4.2
5.0
6.0
7.0

find

Query and Write Operation

Yes

Yes

Yes

Yes

Yes

insert

Query and Write Operation

Yes

Yes

Yes

Yes

Yes

update

Query and Write Operation

Yes

Yes

Yes

Yes

Yes

delete

Query and Write Operation

Yes

Yes

Yes

Yes

Yes

aggregate

Aggregation Command

Yes

Yes

Yes

Yes

Yes

count

Aggregation Command

Yes

Yes

Yes

Yes

Yes

addFields

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

count

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

group

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

limit

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

lookup

Aggregation Stage

Partial

Partial

Partial

Partial

Partial

match

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

project

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

skip

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

sort

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

unwind

Aggregation Stage

Yes

Yes

Yes

Yes

Yes

and

Boolean Expression

Yes

Yes

Yes

Yes

Yes

or

Boolean Expression

Yes

Yes

Yes

Yes

Yes

setIntersection

Set Expression

Yes

Yes

Yes

Yes

Yes

eq

Comparison Expression

Yes

Yes

Yes

Yes

Yes

gt

Comparison Expression

Yes

Yes

Yes

Yes

Yes

gte

Comparison Expression

Yes

Yes

Yes

Yes

Yes

lt

Comparison Expression

Yes

Yes

Yes

Yes

Yes

lte

Comparison Expression

Yes

Yes

Yes

Yes

Yes

ne

Comparison Expression

Yes

Yes

Yes

Yes

Yes

in

Comparison Expression

Yes

Yes

Yes

Yes

Yes

nin

Comparison Expression

Yes

Yes

Yes

Yes

Yes

concatArrays

Array Expression

Yes

Yes

Yes

Yes

Yes

filter

Array Expression

Yes

Yes

Yes

Yes

Yes

reduce

Array Expression

Yes

Yes

Yes

Yes

Yes

size

Array Expression

Yes

Yes

Yes

Yes

Yes

in

Array Expression

Yes

Yes

Yes

Yes

Yes

sum

Accumulator Expression

Yes

Yes

Yes

Yes

Yes

push

Accumulator Expression

Yes

Yes

Yes

Yes

Yes

addToSet

Accumulator Expression

Yes

Yes

Yes

Yes

Yes

String

Type

Yes

Yes

Yes

Yes

Yes

Object

Type

Yes

Yes

Yes

Yes

Yes

Array

Type

Yes

Yes

Yes

Yes

Yes

ObjectId

Type

Yes

Yes

Yes

Yes

Yes

Boolean

Type

Yes

Yes

Yes

Yes

Yes

and

Logical Operator

Yes

Yes

Yes

Yes

Yes

or

Logical Operator

Yes

Yes

Yes

Yes

Yes

exists

Element Operator

Yes

Yes

Yes

Yes

Yes

regex

Evaluation Query Operator

Yes

Yes

Yes

Yes

Yes

all

Array Operator

Yes

Yes

Yes

Yes

Yes

elemMatch

Array Operator

Yes

Yes

Yes

Yes

Yes

size

Array Operator

Yes

Yes

Yes

Yes

Yes

set

Update Operator

Yes

Yes

Yes

Yes

Yes

rename

Update Operator

Yes

Yes

Yes

Yes

Yes

unset

Update Operator

Yes

Yes

Yes

Yes

Yes

addToSet

Array Update Operator

Yes

Yes

Yes

Yes

Yes

pull

Array Update Operator

Yes

Yes

Yes

Yes

Yes

push

Array Update Operator

Yes

Yes

Yes

Yes

Yes

sort

Update Modifier

Yes

Yes

Yes

Yes

Yes

Single Field Index

Indexes

Yes

Yes

Yes

Yes

Yes

Compound Index

Indexes

Yes

Yes

Yes

Yes

Yes

Multikey Index

Indexes

Yes

Yes

Yes

Yes

Yes

Text Index

Indexes

No

No

No

No

No

2dsphere

Indexes

Yes

Yes

Yes

Yes

Yes

2d Index

Indexes

No

No

No

No

No

Hashed Index

Indexes

No

No

No

No

No

TTL

Index Properties

Yes

Yes

Yes

Yes

Yes

Unique

Index Properties

Yes

Yes

Yes

Yes

Yes

Partial

Index Properties

No

Only unique indexes

Only unique indexes

Only unique indexes

Only unique indexes

Case Insensitive

Index Properties

No

No

No

No

No

Sparse

Index Properties

No

No

No

No

No

Background

Index Properties

Yes

Yes

Yes

Yes

Yes

If you run into any issues as it relates version compatibility and is not defined below please consult the section of the Azure Documentation for .

If you an incompatibility is found, please provide details by contacting .

To resolve this, a can be added to the following collections:

The $lookup aggregation does not yet support the feature that's introduced in server version 3.6. If you attempt to use the $lookup operator with the let and pipeline fields, an error message that indicates that let is not supported appears.

Refer to the for a complete list of Database Commands.

Related Content
Upgrade the API version of your Azure Cosmos DB for MongoDB account
support@form.io
wildcard index
uncorrelated subqueries
Cosmos Feature Support Matrix
primary Microsoft documentation
MongoDB.com/atlas
MongoDB Documentation
Version Compatibility