{"id":3680,"date":"2025-02-20T13:01:56","date_gmt":"2025-02-20T18:01:56","guid":{"rendered":"https:\/\/underhost.com\/blog\/?p=3680"},"modified":"2026-10-23T08:53:34","modified_gmt":"2026-10-23T12:53:34","slug":"install-mongodb-cpanel-server","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/install-mongodb-cpanel-server\/","title":{"rendered":"How to Install MongoDB on a cPanel Server (2026 Guide)"},"content":{"rendered":"<div class=\"uh-blog-hero\" style=\"margin:0 0 40px;text-align:center;padding:48px 24px;border-radius:20px;background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;box-shadow:0 20px 40px -15px rgba(13,31,60,0.28);position:relative;overflow:hidden;\">\n<div style=\"display:inline-flex;align-items:center;gap:8px;padding:7px 14px;margin-bottom:16px;border:1px solid rgba(0,212,255,0.32);border-radius:999px;color:#DFF8FF;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;background:rgba(0,212,255,0.10);\"><i class=\"fas fa-sliders-h\" style=\"color:#00D4FF;\"><\/i> Control Panels<\/div>\n<h1 style=\"color:#ffffff;font-size:clamp(32px,5vw,46px);line-height:1.12;margin:0 0 14px;font-weight:800;\">How to Install MongoDB on a cPanel Server (2026 Guide)<\/h1>\n<p style=\"font-size:18px;color:#EAF6FF;max-width:800px;margin:0 auto;line-height:1.7;\">Updated Guide: Learn how to install MongoDB on a cPanel server with this step-by-step guide. While cPanel does not natively support MongoDB, this updated tutorial provides the latest method to integrate it manually, ensuring compatibility with your web applications.<\/p>\n<\/div>\n<div class=\"uh-blog-excerpt\" style=\"border-left:4px solid #00D4FF;padding:18px 20px;margin:0 0 34px;background:#F8FAFC;color:#1F2937;border-radius:0 14px 14px 0;box-shadow:0 8px 28px rgba(13,31,60,0.08);line-height:1.75;\"><strong style=\"color:#0D1F3C;\">Short answer:<\/strong> cPanel does not support MongoDB, but you can install it yourself on a cPanel server with root access. Add the official MongoDB repository, install <code>mongodb-org<\/code>, start <code>mongod<\/code>, keep it bound to localhost, turn on authentication, then add the PHP <code>mongodb<\/code> extension through WHM. If the server runs JetBackup, leave JetBackup&#8217;s own MongoDB service alone.<\/div>\n<nav aria-label=\"Table of contents\" class=\"uh-toc\" style=\"background:#ffffff;border:1px solid #E5E7EB;border-radius:16px;padding:20px 22px;margin:0 0 34px;box-shadow:0 4px 12px rgba(13,31,60,0.08);\">\n<div style=\"font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#176EA5;margin-bottom:10px;\"><i class=\"fas fa-list\" style=\"color:#00D4FF;\"><\/i> In this guide<\/div>\n<ol style=\"margin:0;padding-left:20px;columns:2 260px;column-gap:28px;line-height:1.9;\">\n<li><a href=\"#know-the-limits-first\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Know the limits first<\/a><\/li>\n<li><a href=\"#before-you-start\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Before you start<\/a><\/li>\n<li><a href=\"#step-1-add-the-mongodb-repository\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 1: add the MongoDB repository<\/a><\/li>\n<li><a href=\"#step-2-install-and-start-mongodb\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 2: install and start MongoDB<\/a><\/li>\n<li><a href=\"#step-3-keep-mongodb-private\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 3: keep MongoDB private<\/a><\/li>\n<li><a href=\"#step-4-turn-on-authentication\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 4: turn on authentication<\/a><\/li>\n<li><a href=\"#step-5-add-the-php-mongodb-extension\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 5: add the PHP mongodb extension<\/a><\/li>\n<li><a href=\"#step-6-check-that-everything-works\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Step 6: check that everything works<\/a><\/li>\n<li><a href=\"#connect-from-php\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Connect from PHP<\/a><\/li>\n<li><a href=\"#if-another-server-must-connect\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">If another server must connect<\/a><\/li>\n<li><a href=\"#upgrade-mongodb-safely\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Upgrade MongoDB safely<\/a><\/li>\n<li><a href=\"#back-up-mongodb\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Back up MongoDB<\/a><\/li>\n<li><a href=\"#keep-an-eye-on-mongodb\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Keep an eye on MongoDB<\/a><\/li>\n<li><a href=\"#troubleshooting\" style=\"color:#176EA5;text-decoration:none;font-weight:600;\">Troubleshooting<\/a><\/li>\n<\/ol>\n<\/nav>\n<div class=\"uh-post-content\" style=\"color:#1F2937;font-size:16px;line-height:1.75;\">\n<h2 id=\"know-the-limits-first\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Know the limits first<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><strong>cPanel does not manage MongoDB.<\/strong> cPanel supports MySQL and MariaDB only. There is no MongoDB interface in cPanel, and cPanel support gives very limited help with it.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>JetBackup already runs MongoDB.<\/strong> On servers with JetBackup, a service called <code>jetmongod<\/code> is part of JetBackup. Do not stop, change or reuse it. Your own MongoDB install runs separately.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Updates are your job.<\/strong> MongoDB updates come from the MongoDB repository, not from cPanel updates.<\/li>\n<li style=\"margin:0 0 8px;\"><strong>Consider a separate server.<\/strong> For production databases, a dedicated VPS for MongoDB keeps it apart from the web server and makes resources easier to plan.<\/li>\n<\/ul>\n<h2 id=\"before-you-start\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-clipboard-check\" style=\"color:#00D4FF;\"><\/i> Before you start<\/h2>\n<ul style=\"list-style:none;padding-left:0;\">\n<li style=\"margin:0 0 8px;\">\u2713 Root SSH access to a cPanel server on AlmaLinux, Rocky Linux or CloudLinux 8 or 9.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 A recent backup of the server.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 The current supported MongoDB version, from the MongoDB installation documentation.<\/li>\n<li style=\"margin:0 0 8px;\">\u2713 Port 27017 closed in the firewall. MongoDB should only be reached from the server itself unless you plan otherwise.<\/li>\n<\/ul>\n<h2 id=\"step-1-add-the-mongodb-repository\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 1: add the MongoDB repository<\/h2>\n<p style=\"margin:0 0 18px;\">Create the repository file. This example uses MongoDB 8.0. Replace <code>8.0<\/code> in both lines if a newer release is current.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>cat &gt; \/etc\/yum.repos.d\/mongodb-org-8.0.repo &lt;&lt;'EOF'\n[mongodb-org-8.0]\nname=MongoDB Repository\nbaseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/$releasever\/mongodb-org\/8.0\/x86_64\/\ngpgcheck=1\nenabled=1\ngpgkey=https:\/\/pgp.mongodb.com\/server-8.0.asc\nEOF<\/code><\/pre>\n<h2 id=\"step-2-install-and-start-mongodb\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 2: install and start MongoDB<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>dnf install -y mongodb-org\nsystemctl enable --now mongod\nsystemctl status mongod --no-pager<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">The <code>mongodb-org<\/code> package installs the server (<code>mongod<\/code>), the router (<code>mongos<\/code>), the shell (<code>mongosh<\/code>) and the database tools.<\/p>\n<h2 id=\"step-3-keep-mongodb-private\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 3: keep MongoDB private<\/h2>\n<p style=\"margin:0 0 18px;\">Open <code>\/etc\/mongod.conf<\/code> and check the network section. By default MongoDB listens on localhost only, which is what you want when the database runs on the same server as the website.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>net:\n  port: 27017\n  bindIp: 127.0.0.1<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Make sure port 27017 is not open in the firewall. With CSF, check that 27017 is not listed in <code>TCP_IN<\/code> in <code>\/etc\/csf\/csf.conf<\/code>.<\/p>\n<h2 id=\"step-4-turn-on-authentication\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 4: turn on authentication<\/h2>\n<p style=\"margin:0 0 18px;\">Create an admin user first, then enable authorisation. Use your own user name and a strong password.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>mongosh\nuse admin\ndb.createUser({ user: \"dbadmin\", pwd: passwordPrompt(), roles: [ { role: \"userAdminAnyDatabase\", db: \"admin\" }, \"readWriteAnyDatabase\" ] })\nexit<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Then add this to <code>\/etc\/mongod.conf<\/code> and restart MongoDB:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>security:\n  authorization: enabled<\/code><\/pre>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>systemctl restart mongod<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Create a separate user for each application, with access only to its own database.<\/p>\n<h2 id=\"step-5-add-the-php-mongodb-extension\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 5: add the PHP mongodb extension<\/h2>\n<p style=\"margin:0 0 18px;\">PHP applications connect to MongoDB through the <code>mongodb<\/code> PECL extension. On cPanel, install it through WHM so it is tracked for each PHP version:<\/p>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">In WHM, open <strong>Software &gt; Module Installers<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">Next to <strong>PHP PECL<\/strong>, click <strong>Manage<\/strong>.<\/li>\n<li style=\"margin:0 0 8px;\">Select the PHP version your site uses.<\/li>\n<li style=\"margin:0 0 8px;\">Search for <code>mongodb<\/code>, then install it.<\/li>\n<li style=\"margin:0 0 8px;\">Repeat for each PHP version that needs it.<\/li>\n<\/ol>\n<p style=\"margin:0 0 18px;\">Most PHP projects also use the MongoDB PHP library, installed in the application with Composer: <code>composer require mongodb\/mongodb<\/code>.<\/p>\n<h2 id=\"step-6-check-that-everything-works\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-terminal\" style=\"color:#00D4FF;\"><\/i> Step 6: check that everything works<\/h2>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code># MongoDB answers on localhost\nmongosh --quiet --eval 'db.runCommand({ ping: 1 })'\n\n# The PHP extension is loaded (PHP 8.3 example)\n\/opt\/cpanel\/ea-php83\/root\/usr\/bin\/php -m | grep -i mongodb<\/code><\/pre>\n<h2 id=\"connect-from-php\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Connect from PHP<\/h2>\n<p style=\"margin:0 0 18px;\">With the extension and the Composer library installed, a minimal connection looks like this. Keep the password in an environment variable or a config file outside the web root, not in the code.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>&lt;?php\nrequire 'vendor\/autoload.php';\n\n$client = new MongoDB\\Client('mongodb:\/\/appuser:' . getenv('MONGO_PASS') . '@127.0.0.1:27017\/appdb?authSource=appdb');\n$collection = $client-&gt;appdb-&gt;orders;\n$result = $collection-&gt;insertOne(['item' =&gt; 'test', 'created' =&gt; new MongoDB\\BSON\\UTCDateTime()]);\necho 'Inserted ' . $result-&gt;getInsertedId();<\/code><\/pre>\n<h2 id=\"if-another-server-must-connect\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-server\" style=\"color:#00D4FF;\"><\/i> If another server must connect<\/h2>\n<p style=\"margin:0 0 18px;\">Sometimes an application on a second server needs the database. Open access only as far as you need:<\/p>\n<ol style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\">Add the server&#8217;s private or public IP address to <code>bindIp<\/code>, keeping <code>127.0.0.1<\/code> as well.<\/li>\n<li style=\"margin:0 0 8px;\">Allow port 27017 in the firewall for that one IP address only. With CSF, use <code>csf -a<\/code> with a port rule rather than opening the port to everyone.<\/li>\n<li style=\"margin:0 0 8px;\">Keep authentication on, and give the remote application its own user.<\/li>\n<li style=\"margin:0 0 8px;\">Turn on TLS for the connection if the traffic crosses the public internet.<\/li>\n<\/ol>\n<h2 id=\"upgrade-mongodb-safely\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Upgrade MongoDB safely<\/h2>\n<p style=\"margin:0 0 18px;\">MongoDB major versions must be upgraded one step at a time, for example 7.0 to 8.0, not across several versions at once. Before each upgrade, back up with <code>mongodump<\/code>, read the release notes, and check the feature compatibility version:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>mongosh --quiet --eval 'db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })'<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Change the version number in the repository file, run <code>dnf upgrade mongodb-org<\/code>, restart <code>mongod<\/code>, and check your application before you raise the feature compatibility version.<\/p>\n<h2 id=\"back-up-mongodb\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Back up MongoDB<\/h2>\n<p style=\"margin:0 0 18px;\">cPanel account backups do not include MongoDB data. Back it up separately with <code>mongodump<\/code>, and copy the backups off the server.<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code>mongodump --uri=\"mongodb:\/\/dbadmin@127.0.0.1:27017\/?authSource=admin\" --out=\/backup\/mongodb-$(date +%F)<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Test a restore with <code>mongorestore<\/code> on a test server before you rely on the backups. Our <a href=\"https:\/\/underhost.com\/blog\/automated-cpanel-backup-script-using-cpanel-api\/\">off-site backup guide<\/a> covers where to keep copies.<\/p>\n<h2 id=\"keep-an-eye-on-mongodb\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-angle-double-right\" style=\"color:#00D4FF;\"><\/i> Keep an eye on MongoDB<\/h2>\n<p style=\"margin:0 0 18px;\">A few quick checks tell you whether the database is healthy:<\/p>\n<pre style=\"background:#0D1F3C;color:#EAF6FF;padding:18px 20px;border-radius:14px;overflow-x:auto;line-height:1.7;font-size:15px;\"><code># Open connections and uptime\nmongosh --quiet --eval 'const s = db.serverStatus(); printjson({ uptime: s.uptime, connections: s.connections })'\n\n# Disk space used by the data folder\ndu -sh \/var\/lib\/mongo<\/code><\/pre>\n<p style=\"margin:0 0 18px;\">Watch the disk space in particular. MongoDB stops writing when the disk fills up, and the log file in <code>\/var\/log\/mongodb\/<\/code> grows over time, so rotate it.<\/p>\n<h2 id=\"troubleshooting\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-exclamation-triangle\" style=\"color:#00D4FF;\"><\/i> Troubleshooting<\/h2>\n<div style=\"overflow-x:auto;margin:26px 0;border:1px solid #E5E7EB;border-radius:14px;-webkit-overflow-scrolling:touch;\">\n<table style=\"width:100%;border-collapse:collapse;background:#ffffff;color:#1F2937;font-size:15px;line-height:1.55;margin:0;min-width:600px;\">\n<thead>\n<tr style=\"background:#0D1F3C;color:#fff;\">\n<th style=\"padding:14px;text-align:left;\">Problem<\/th>\n<th style=\"padding:14px;text-align:left;\">Likely cause<\/th>\n<th style=\"padding:14px;text-align:left;\">Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\"><code>mongod<\/code> does not start<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">A config error, or the data folder has wrong permissions<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Read <code>journalctl -u mongod<\/code> and <code>\/var\/log\/mongodb\/mongod.log<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">PHP says the MongoDB class is missing<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The extension is installed for another PHP version<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Check the site&#8217;s PHP version in MultiPHP Manager and install the extension for that version.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Authentication failed<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Wrong user, password or authSource<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Connect with <code>authSource=admin<\/code> for admin users, or the right database for application users.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">JetBackup stopped working<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">The JetBackup MongoDB service was changed<\/td>\n<td style=\"padding:14px;border-top:1px solid #E5E7EB;vertical-align:top;\">Leave <code>jetmongod<\/code> untouched and restart JetBackup. Your MongoDB uses its own service and port.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p style=\"margin:0 0 18px;\">For other software on cPanel, see our guides to <a href=\"https:\/\/underhost.com\/blog\/install-gmp-cpanel-centos-servers\/\">installing PHP extensions with EasyApache 4<\/a> and <a href=\"https:\/\/underhost.com\/blog\/install-ffmpeg-on-linux\/\">installing FFmpeg<\/a>.<\/p>\n<div aria-hidden=\"true\" class=\"uh-section-divider\" style=\"width:min(100% - 32px, 1080px);margin:44px auto;display:grid;grid-template-columns:1fr 32px 1fr;align-items:center;gap:18px;pointer-events:none;\"><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(0,212,255,0.40),rgba(23,110,165,0.24),transparent);\"><\/span><img alt=\"\" decoding=\"async\" height=\"32\" loading=\"lazy\" src=\"https:\/\/cdn.underhost.com\/android-chrome-192x192.webp\" style=\"width:32px;height:32px;display:block;border-radius:8px;filter:drop-shadow(0 0 14px rgba(0,212,255,0.30));\" width=\"32\"\/><span style=\"height:1px;background:linear-gradient(90deg,transparent,rgba(23,110,165,0.24),rgba(0,212,255,0.40),transparent);\"><\/span><\/div>\n<\/div>\n<div class=\"uh-blog-cta\" style=\"background:linear-gradient(135deg,#0D1F3C 0%,#125A8A 58%,#176EA5 100%);color:#ffffff;padding:36px 24px;border-radius:20px;text-align:center;margin:44px 0;box-shadow:0 20px 40px -15px rgba(13,31,60,0.32);\">\n<h2 style=\"margin:0 0 12px;font-size:28px;line-height:1.25;color:#ffffff;\">Need help with this?<\/h2>\n<p style=\"font-size:17px;margin:0 auto 22px;color:#EAF6FF;max-width:720px;line-height:1.7;\">Need MongoDB on its own server, or set up and secured for you? Our Cloud VPS plans and server management team can help.<\/p>\n<p><a href=\"https:\/\/underhost.com\/cloud-vps.php\" style=\"background:linear-gradient(90deg,#00D4FF,#0077FF);color:#ffffff;padding:13px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;\">See Cloud VPS plans<\/a><a href=\"https:\/\/customerpanel.ca\/client\/\" style=\"background:transparent;color:#ffffff;padding:12px 28px;border-radius:10px;text-decoration:none;font-weight:800;display:inline-block;margin:8px;border:1px solid rgba(255,255,255,0.32);\">Contact @CustomerPanel<\/a><\/div>\n<div class=\"uh-faq-section\" id=\"faq\" style=\"margin:34px 0;scroll-margin-top:90px;\">\n<h2 style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:0 0 18px;border-bottom:2px solid rgba(0,212,255,0.22);padding-bottom:10px;\">Frequently asked questions<\/h2>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Does cPanel support MongoDB?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">No. cPanel supports MySQL and MariaDB only. You can install MongoDB yourself with root access, but cPanel does not manage or update it.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Will installing MongoDB affect JetBackup?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">It should not, as long as you leave JetBackup&#8217;s own jetmongod service alone. Your MongoDB installation runs as the separate mongod service.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Should MongoDB be open to the internet?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">Usually not. Keep it bound to 127.0.0.1 and keep port 27017 closed. If another server must connect, allow only that server&#8217;s IP address and keep authentication on.<\/p>\n<\/div>\n<div style=\"margin-top:18px;background:#F8FAFC;padding:18px 20px;border-radius:14px;border:1px solid rgba(23,110,165,0.14);\">\n<h3 style=\"color:#0D1F3C;margin:0 0 8px;font-size:19px;\">Are MongoDB databases included in cPanel backups?<\/h3>\n<p style=\"margin:0;color:#1F2937;line-height:1.7;\">No. Back them up separately with mongodump and store the copies off the server.<\/p>\n<\/div>\n<\/div>\n<p><!-- uh-related-start --><\/p>\n<div style=\"background:#F4F8FC;border:1px solid #DCE7F3;border-radius:14px;padding:18px 22px;margin:32px 0 8px;\">\n<h2 style=\"margin:0 0 12px;font-size:22px;\">Related guides<\/h2>\n<ul style=\"margin:0;padding-left:20px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/install-gmp-cpanel-centos-servers\/\">How to Install GMP on a cPanel Server (EasyApache 4)<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-can-i-install-curl-on-my-cpanel-server\/\">How to Install cURL on a cPanel Server (EasyApache 4)<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-clamav-cpanel\/\">How to Install and Use ClamAV Antivirus in WHM\/cPanel<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-uninstall-cloudlinux-from-cpanel\/\">How to Install or Uninstall CloudLinux from cPanel (Updated Guide)<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/underhost.com\/blog\/how-to-install-cpanel-on-centos-without-errors\/\">How to Install cPanel Without Errors<\/a><\/li>\n<\/ul>\n<\/div>\n<p><!-- uh-related-end --><br \/>\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"Does cPanel support MongoDB?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. cPanel supports MySQL and MariaDB only. You can install MongoDB yourself with root access, but cPanel does not manage or update it.\"}}, {\"@type\": \"Question\", \"name\": \"Will installing MongoDB affect JetBackup?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"It should not, as long as you leave JetBackup's own jetmongod service alone. Your MongoDB installation runs as the separate mongod service.\"}}, {\"@type\": \"Question\", \"name\": \"Should MongoDB be open to the internet?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Usually not. Keep it bound to 127.0.0.1 and keep port 27017 closed. If another server must connect, allow only that server's IP address and keep authentication on.\"}}, {\"@type\": \"Question\", \"name\": \"Are MongoDB databases included in cPanel backups?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No. Back them up separately with mongodump and store the copies off the server.\"}}]}<\/script><\/p>\n<h2 id=\"sources\" style=\"color:#0D1F3C;font-size:28px;line-height:1.25;margin:34px 0 14px;scroll-margin-top:90px;\"><i class=\"fas fa-book\" style=\"color:#00D4FF;\"><\/i> Sources<\/h2>\n<ul style=\"margin:0 0 24px;padding-left:22px;\">\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/tutorial\/install-mongodb-on-red-hat\/\">MongoDB: install on Red Hat or AlmaLinux<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/administration\/security-checklist\/\">MongoDB: security checklist<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/support.cpanel.net\/hc\/en-us\/articles\/1500004718862\">cPanel support: Can I install MongoDB on cPanel?<\/a><\/li>\n<li style=\"margin:0 0 8px;\"><a href=\"https:\/\/www.php.net\/manual\/en\/set.mongodb.php\">PHP manual: MongoDB extension<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Updated Guide:<\/strong> Learn how to install MongoDB on a cPanel server with this step-by-step guide. While cPanel does not natively support MongoDB, this updated tutorial provides the latest method to integrate it manually, ensuring compatibility with your web applications.<\/p>\n","protected":false},"author":1,"featured_media":5005,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,202,81],"tags":[125,120,108,137,185,109],"class_list":["post-3680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-control-panels","category-cpanel-whm","category-hosting-guides","tag-tag-backups","tag-tag-cloud-vps","tag-tag-cpanel","tag-tag-firewall","tag-php","tag-tag-whm"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3680"}],"version-history":[{"count":12,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3680\/revisions"}],"predecessor-version":[{"id":6918,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3680\/revisions\/6918"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/5005"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}