You can install the MongoDB community edition with Homebrew. $ sudo chown -R ` id -un ` /System/Volumes/Data/data/db macOS Catalina runs in a read-only system volume, separate from other files on the system.Īpple created a secondary volume on Catalina that you need to use for storing MongoDB data folder: $ sudo mkdir -p /System/Volumes/Data/data/db If you are on macOS Catalina or Big Sur (or any future release), you can not use the root folder for this purpose. Creating Data Folderīefore you install and use MongoDB, you need to create a data/db folder on your computer for storing MongoDB data.īefore macOS Catalina, you can create this folder in the user's root directory with the following command: $ sudo mkdir -p /data/db Today, you'll learn to install the MongoDB community edition on macOS Catalina and higher. In an earlier article, I wrote about how to install the MongoDB community edition on Ubuntu operating system.