{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "MongoDB hosting on Edge | Self-hosted replica sets",
  "headline": "MongoDB hosting on Edge | Self-hosted replica sets",
  "description": "Run MongoDB on Edge: a three-node replica set on dedicated NVMe, joined by a free private network, with mongodump archives in S3-compatible storage.",
  "url": "https://edge.network/solutions/mongodb",
  "image": "https://edge.network/og/solutions__mongodb.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Solutions",
        "item": "https://edge.network/solutions"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Mongodb",
        "item": "https://edge.network/solutions/mongodb"
      }
    ]
  },
  "section": "solutions",
  "articleBody": "For MongoDB\n\n A MongoDB replica set, priced like three VMs\n\n MongoDB Community on dedicated vCPUs and local NVMe: a three-node replica set on a free private network, with compressed archives in S3-compatible storage. Your drivers and connection strings stay as they are. Deploy a VM Have our engineers run MongoDB The setup on this page costs $118.56 a month, with no egress line.\n\n Why MongoDB on Edge\n\n Replica-set members on local NVMe \n\n WiredTiger gets fast local disk. Members talk over a free private network, and backups are priced as storage. NVMe for hot working sets\n\n WiredTiger thrives on fast disk. Local NVMe on every member keeps the working set hot and p99 latency sane. \n Replica sets across VMs\n\n Three members on separate VMs, joined by a private network. Automatic elections and failover, with no premium for them. \n mongodump to S3\n\n Stream compressed archives to Edge Storage from a secondary, restore with mongorestore. No per-snapshot fees. \n Search your way\n\n Text indexes for simple cases, or Meilisearch or OpenSearch on another VM when you need real full-text search. \n Community or Enterprise\n\n MongoDB Community Server runs cleanly. If you hold an Enterprise licence, the same install pattern applies. \n Official drivers, unchanged\n\n Same wire protocol and connection strings. Point your driver at the replica set and carry on. \n Reference architecture\n\n rs0: three members on one private network \n\n A three-node replica set with NVMe on every member, apps connecting over the private network and archives in a bucket. Edge Compute app VMs\n\n official drivers, replicaSet=rs0\n\n private network Edge Compute mongod :27017\n\n mongo-1 as PRIMARY, MongoDB 8.0\n\n rs0 WiredTiger oplog Edge Compute mongo-2 SECONDARY\n\n local NVMe, votes in elections\n\n Edge Compute mongo-3 SECONDARY\n\n local NVMe, runs the nightly dump\n\n mongodump to S3 Edge Storage mongo-backups\n\n gzip archives with oplog, 14 days\n\n 2026-09-30.gz Compute Three VMs forming the replica set, each with its data directory on local NVMe.\n\n Compute Optional Meilisearch or OpenSearch VM when you need full-text search.\n\n Storage Holds mongodump archives, or Percona Backup for MongoDB snapshots and oplog chunks.\n\n DNS Records for each member&#x27;s private address, used in the replica-set connection string.\n\n Deploy\n\n Initiate rs0 from one bootstrap script \n\n Save one bootstrap, create three members from it, and initiate the set from the first. ~/infra $ for n in 1 2 3; do \n\n edge compute create --name mongo-$n \\\n\n --size s-4vcpu-8gb --image ubuntu-24 \\\n\n --region london --script mongodb-8\n\n done\n\n ✓ mongo-1, mongo-2, mongo-3 running\n\n $ mongosh --eval &#x27;rs.initiate(cfg)&#x27; \n\n $ mongosh --eval &#x27;rs.status().members&#x27; \\ \n\n --quiet | grep stateStr\n\n ✓ PRIMARY, SECONDARY, SECONDARY\n\n Inter-node transfer $0 rs0 in London Healthy Primary mongo-1, 10.185.0.5 Secondaries mongo-2, mongo-3 01 Save a MongoDB bootstrap\n\n Installs MongoDB 8.0 from MongoDB&#x27;s own apt repository for Ubuntu 24.04.\n\n mongodb.sh Copy #!/bin/bash\nset -e\nexport DEBIAN_FRONTEND=noninteractive\ncurl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \\\n gpg --dearmor -o /usr/share/keyrings/mongodb-8.0.gpg\necho \"deb [signed-by=/usr/share/keyrings/mongodb-8.0.gpg] \\\nhttps://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse\" \\\n > /etc/apt/sources.list.d/mongodb-org-8.0.list\napt-get update && apt-get install -y mongodb-org\nsystemctl enable --now mongod \n 02 Create three members\n\n Attach all three to one private network, allow 27017 from that range only, and add each member&#x27;s private IP to /etc/hosts.\n\n shell Copy $ edge compute scripts create --name mongodb-8 --file mongodb.sh\n\n$ for n in 1 2 3; do\n edge compute create --name mongo-$n --size s-4vcpu-8gb \\\n --image ubuntu-24 --region london --script mongodb-8\n done \n 03 Configure the replica set\n\n Same file on every member, each with its own private IP and a shared keyfile. The keyfile also switches on authentication.\n\n /etc/mongod.conf Copy net:\n port: 27017\n bindIp: 127.0.0.1,10.185.0.5\nreplication:\n replSetName: rs0\nsecurity:\n keyFile: /etc/mongo-keyfile \n 04 Initiate the set and schedule backups\n\n Run rs.initiate on mongo-1 itself, then create your admin user. Dump nightly from a secondary so the primary keeps its cache.\n\n shell Copy # on mongo-1\n$ mongosh --eval &#x27;rs.initiate({ _id: \"rs0\", members: [\n { _id: 0, host: \"mongo-1:27017\" },\n { _id: 1, host: \"mongo-2:27017\" },\n { _id: 2, host: \"mongo-3:27017\" } ] })&#x27;\n\n$ mongodump --uri \"$MONGO_URI\" --readPreference=secondary \\\n --oplog --archive --gzip | \\\n aws s3 cp - s3://mongo-backups/$(date +%F).gz \\\n --endpoint-url https://storage.edge.network \n Prefer to hand it off? Give the job to your AI agent or have our engineers do it .\n\n What it costs\n\n What rs0 costs each month \n\n Three VMs and a bucket. No per-IOPS provisioning, no per-snapshot fees and no charge for traffic between members. No per-IOPS or per-snapshot lines \n Traffic between members on the private network is free \n Community Server carries no licence fee \n See compute pricing Estimated monthly bill on Edge\n\n 3-node replica set, ~100 GB of data, nightly dumps kept 14 days\n\n USD Compute $115.41 3 × Performance VM (4 vCPU, 8 GiB, 160 GB NVMe) at $38.47 each \n Storage $3.15 215 GB of compressed archives: first 5 GB free, then 210 GB × $0.015 \n DNS $0.00 Private records for each member \n Egress $0.00 \n Total $118.56 FAQ\n\n Leaving Atlas, keeping your drivers \n\n Something else? Ask an engineer . How does this compare to Atlas? Cheaper, with no IOPS provisioning, snapshot fees or inter-zone transfer charges, and you keep root. The trade-off: you own backups, upgrades and member provisioning, or our Expert Services team does. Can I use the official drivers unchanged? Yes. Point the driver at the member hostnames with replicaSet=rs0 in the connection string. Same wire protocol, same client libraries. What about point-in-time recovery? mongodump with --oplog gives consistent nightly archives. For true point-in-time recovery, Percona Backup for MongoDB writes snapshots and continuous oplog chunks to an S3-compatible bucket such as Edge Storage. Can members live in different regions? Private networks are per region, so keep the voting members together in one region. A member elsewhere has to connect over public IPs, with TLS and a security group limiting 27017 to the other members. Can I shard? Yes. Config servers, mongos routers and shards are all just more VMs, each running the same bootstrap with a different role. Related stacks\n\n Other databases, plus Payload on MongoDB \n\n All 38 stacks PostgreSQL Self-hosted Postgres on dedicated NVMe \n Redis In-memory cache and queue, your way \n MySQL MySQL or MariaDB on real VMs \n P Payload TypeScript-first headless CMS, Next.js-ready \n Move your replica set off Atlas\n\n Start free. Migrate from Atlas or stand up a fresh replica set; Expert Services can plan the cutover.\n\n Deploy a VM Plan an Atlas migration with us Billed hourly from a prepaid balance. Egress is free on every product.",
  "headings": [
    {
      "level": 1,
      "text": "A MongoDB replica set, priced like three VMs"
    },
    {
      "level": 3,
      "text": "NVMe for hot working sets"
    },
    {
      "level": 3,
      "text": "Replica sets across VMs"
    },
    {
      "level": 3,
      "text": "mongodump to S3"
    },
    {
      "level": 3,
      "text": "Search your way"
    },
    {
      "level": 3,
      "text": "Community or Enterprise"
    },
    {
      "level": 3,
      "text": "Official drivers, unchanged"
    },
    {
      "level": 3,
      "text": "Save a MongoDB bootstrap"
    },
    {
      "level": 3,
      "text": "Create three members"
    },
    {
      "level": 3,
      "text": "Configure the replica set"
    },
    {
      "level": 3,
      "text": "Initiate the set and schedule backups"
    },
    {
      "level": 2,
      "text": "Move your replica set off Atlas"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Solutions",
      "url": "https://edge.network/solutions"
    },
    {
      "@type": "WebPage",
      "name": "Stacks",
      "url": "https://edge.network/solutions/stacks"
    },
    {
      "@type": "WebPage",
      "name": "Have our engineers run MongoDB",
      "url": "https://edge.network/solutions/expert-services"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/compute"
    },
    {
      "@type": "WebPage",
      "name": "Storage",
      "url": "https://edge.network/storage"
    },
    {
      "@type": "WebPage",
      "name": "DNS",
      "url": "https://edge.network/dns"
    },
    {
      "@type": "WebPage",
      "name": "Give the job to your AI agent",
      "url": "https://edge.network/solutions/agentic-development"
    },
    {
      "@type": "WebPage",
      "name": "See compute pricing",
      "url": "https://edge.network/compute/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Ask an engineer",
      "url": "https://edge.network/contact"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/cdn"
    },
    {
      "@type": "WebPage",
      "name": "Shield",
      "url": "https://edge.network/shield"
    },
    {
      "@type": "WebPage",
      "name": "Assist",
      "url": "https://edge.network/assist"
    },
    {
      "@type": "WebPage",
      "name": "Pulse",
      "url": "https://edge.network/pulse"
    },
    {
      "@type": "WebPage",
      "name": "Agent API &amp; MCP",
      "url": "https://edge.network/docs/agent"
    },
    {
      "@type": "WebPage",
      "name": "Academy",
      "url": "https://edge.network/academy"
    },
    {
      "@type": "WebPage",
      "name": "Case Studies",
      "url": "https://edge.network/case-studies"
    },
    {
      "@type": "WebPage",
      "name": "Releases",
      "url": "https://edge.network/releases"
    },
    {
      "@type": "WebPage",
      "name": "Roadmap",
      "url": "https://edge.network/roadmap"
    },
    {
      "@type": "WebPage",
      "name": "Status",
      "url": "https://edge.network/status"
    },
    {
      "@type": "WebPage",
      "name": "About",
      "url": "https://edge.network/about"
    },
    {
      "@type": "WebPage",
      "name": "Environment",
      "url": "https://edge.network/environment"
    },
    {
      "@type": "WebPage",
      "name": "Latest",
      "url": "https://edge.network/latest"
    },
    {
      "@type": "WebPage",
      "name": "Blog",
      "url": "https://edge.network/blog"
    },
    {
      "@type": "WebPage",
      "name": "Careers",
      "url": "https://edge.network/careers"
    },
    {
      "@type": "WebPage",
      "name": "Terms of Service",
      "url": "https://edge.network/terms"
    },
    {
      "@type": "WebPage",
      "name": "Privacy Policy",
      "url": "https://edge.network/privacy"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/solutions/mongodb",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-23T08:56:45.657Z"
}