Flower Docs
  • OpenFlower overview
    • The "Hello World" tutorial
  • Videos
    • OpenFlower in 100 seconds
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Access local database or API
      • Google Cloud Platform
      • Heroku
      • Migration from Openblocks
      • Update MongoDB Versions
      • OpenFlower Version Update
      • Traefik loadbalancer
      • SMTP Server
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • OpenFlower Marketplace
  • ✨Build Applications
    • Create a new App
      • Modules
      • Version and Release Management
    • App Editor
      • Visual Components
        • Common Component Settings
        • File upload
        • Charts and graphs
        • Image
        • Option lists
        • List View
        • Drawer
        • Google Maps
        • Table
        • Messages / Toast
        • Calendar
      • Date handling
      • Bulk Editing
      • Layers
      • Data selection & Javascript
      • Use Markdown
      • Keyboard shortcuts
    • App Navigation
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
  • 🚀Connect your Data
    • Data source basics
    • Data sources in OpenFlower
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embedd an App
      • Embed Apps in React
      • Native embed SDK
        • Build the SDK from Source
  • 🔥OpenFlower Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • OpenFlower Open REST API
Powered by GitBook
On this page
  • Version Update of MongoDB
  • 1) Stop OpenFlower
  • 2) Create a Backup Copy of the lowcoder-stacks folder
  • 3) Run upgrade-mongo-4x-to-5x docker compose file
  • 4) Set MongoDB Compatibility-Version to 5
  • 5) Stop and remove MongoDB 5 Update-Container
  • 6) Run upgrade-mongo-5x-to-6x docker compose file
  • 7) Set MongoDB Compatibility-Version to 6
  • 8) Stop and remove MongoDB 6 Update-Container
  • 9) Run upgrade-mongo-6x-to-7x docker compose file
  • 10) Stop and remove MongoDB 7 Update-Container
  1. Setup and run
  2. Self-hosting

Update MongoDB Versions

PreviousMigration from OpenblocksNextOpenFlower Version Update

Last updated 3 months ago

Version Update of MongoDB

MongoDB stopped the support for versions < 5 already and will stop the support for version < 6 soon. It is suggested to update the MongoDB Server / Infrastructure.

The lowcoder application continues to operate smoothly on MongoDB version 4.4. However, to ensure compatibility with official MongoDB releases, an update is necessary. This update is specifically required for the all-in-one deployment of lowcoder, which includes MongoDB.

It is important to note that MongoDB version 5.0 and above requires the AVX (Advanced Vector Extensions) feature of the processor. While this feature is standard in all newer processors, it may not be supported by older hardware. Therefore, users with older systems might encounter issues running MongoDB 5.0+.

An incremental update procedure is possible without losing data. However, the major versions of MongoDB cannot be overjumped. You cannot jump to v 6 from v 4; you would first need to adapt to v 5.

Suppose you currently run v4 and want to update to v7- these are the necessary steps for the all-in-one docker image. If you operate a multi-image installation, adap the paths to your data location for your MongoDB and the database must be stopped before the process is started.

1) Stop OpenFlower

Stop your OpenFlower instance and wait for it to completely stop the service.

docker compose down

2) Create a Backup Copy of the lowcoder-stacks folder

cp -rp lowcoder-stacks lowcoder-stacks.backup

3) Run upgrade-mongo-4x-to-5x docker compose file

docker compose -f upgrade-mongo-4x-to-5x.yaml up -d && sleep 30

4) Set MongoDB Compatibility-Version to 5

docker exec mongodb-5 /usr/bin/mongosh --eval 'use admin' --eval 'db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } )'

5) Stop and remove MongoDB 5 Update-Container

docker compose -f upgrade-mongo-4x-to-5x.yaml down

6) Run upgrade-mongo-5x-to-6x docker compose file

docker compose -f upgrade-mongo-5x-to-6x.yaml up -d && sleep 30

7) Set MongoDB Compatibility-Version to 6

docker exec mongodb-6 /usr/bin/mongosh --eval 'use admin' --eval 'db.adminCommand( { setFeatureCompatibilityVersion: "6.0" } )'

8) Stop and remove MongoDB 6 Update-Container

docker compose -f upgrade-mongo-5x-to-6x.yaml down

9) Run upgrade-mongo-6x-to-7x docker compose file

docker compose -f upgrade-mongo-6x-to-7x.yaml up -d && sleep 30

10) Stop and remove MongoDB 7 Update-Container

docker compose -f upgrade-mongo-6x-to-7x.yaml down

As result your MongoDB is now updated to Version 7 without Data loss.

🆕
219B
upgrade-mongo-4x-to-5x.yaml
Update MongoDB from v4 to v5
219B
upgrade-mongo-5x-to-6x.yaml
Update MongoDB from v5 to v6
227B
upgrade-mongo-6x-to-7x.yaml
Update MongoDB from v6 to v7