Choosing your setup
There are 2 independent choices to make, and all 4 combinations are supported, including username and password over PrivateLink.
AWS IAM removes the shared secret entirely and is preferred where available. It requires an AWS-hosted cluster.
AWS PrivateLink is the stronger network posture. It requires a MongoDB Atlas dedicated cluster hosted on AWS, in any supported region, and involves 2 coordination steps with Base44, so allow extra lead time.
Meeting the requirements
Check your cluster against these before you start. Base44 validates most of them when you save your connection, so a mismatch here shows up as a failure later.Before you create your cluster:
- Free and Flex clusters cannot use private endpoints, and dedicated tiers currently start at M10. Talk to your Base44 contact first if you run Amazon DocumentDB or self-managed MongoDB.
- Set your region now rather than later. Moving a cluster to another region rebuilds all 3 nodes, and a private endpoint cannot be used until nodes are running in its own region again.
Step 1: Create the database
Create the cluster to match the requirements above, then create the database Base44 gives you. For production this is currentlyapp_prod.
Step 2: Create the indexes
Base44 does not create or modify indexes on your cluster. All indexing is yours to manage, including the ones below. Run these againstapp_prod.
Step 3: Set up network access
Choose the option that matches your decision above.Using an IP allowlist
Add these Base44 ranges to your MongoDB IP access list:Using AWS PrivateLink
Base44 runs in AWS us-west-2 (Oregon), so Base44’s side of the connection is always there. Your cluster does not have to be:- A cluster in us-west-2: The simplest and fastest path, with nothing extra to do.
- A cluster in another AWS region: Supported, with one extra step and extra lead time while Base44 provisions the connectivity. Expect some added latency on database calls, and cross-region data transfer charges on your side. Tell your Base44 contact which region you are in before you start, so they can confirm they can reach it.
- In Atlas, go to Network Access > Private Endpoint > Dedicated Cluster, then click Add Private Endpoint. Choose AWS and the region your cluster is in.
- If your cluster is not in us-west-2, click Edit next to Accepted Endpoint Regions on the endpoint service Atlas just created, then add us-west-2. Do this before you send anything to Base44. Without it, Base44 cannot create the connection at all, and you never receive the ID in step 4.
- Wait for Atlas to create a VPC endpoint service, which takes 3 to 5 minutes, then send the service name it shows to your Base44 contact. It looks like
com.amazonaws.vpce.<your-region>.vpce-svc-xxxxxxxxxxxx. Do not fill in the Create New Endpoint form, because it asks for a VPC and subnets that belong to Base44 rather than you. - Wait for Base44 to create the matching interface endpoint and send you back a 22-character endpoint ID, which looks like
vpce-01d2…. - Back in Atlas, click Add Endpoint and choose Connect Existing Endpoint rather than Create New Endpoint, because the endpoint already exists on Base44’s side. Paste the ID you were sent, then wait for the status to show Available.
The 2 IDs are different things and easy to mix up. What you send Base44 is a long dotted service name containing
vpce-svc-. What you receive is a short vpce-… with no -svc-.Step 4: Set up database access
Choose the option that matches your authentication decision.Using a username and password
Create a database user scoped toapp_prod, and give it read and write access across the whole database.
To add a database user:
- In Atlas, go to Security > Database Access, then click Add New Database User.
- Under Authentication Method, select Password, then set a username and password.
- Under Database User Privileges > Specific Privileges, add one privilege: the role readWrite, the database app_prod, and the collection left blank.
- Click Add User.
Using AWS IAM
Register Base44’s IAM role as a database user on your cluster. No password is created or stored, because Base44 mints short-lived credentials at connection time. To add Base44’s IAM role as a database user:- In Atlas, go to Security > Database Access, then click Add New Database User.
- Under Authentication Method, select AWS IAM.
- Under AWS IAM Type, select IAM Role.
- Enter the ARN
arn:aws:iam::789051085499:role/Base44-Access. - Under Database User Privileges > Specific Privileges, add one privilege: the role readWrite, the database app_prod, and the collection left blank.
- Click Add User.
Step 5: Build your connection string
Atlas gives you a string that is not quite the shape Base44 needs, so you copy it from Atlas and then adjust it. Atlas asks 2 things in order, and the first is where the PrivateLink path usually goes wrong. Both paths end at Drivers, but the connection type you pick first is what decides whether you get the private host or the public one. To get your connection string from Atlas:- In Atlas, go to Clusters, then click Connect.
- For Connection type, pick Private Endpoint if you set up PrivateLink, or the standard connection otherwise.
- For Connection method, pick Drivers, then copy the string it shows.
Adjust your copied string to match the line for your combination.
Username and password with an IP allowlist:
Rules your connection string must satisfy
Base44 rejects a string that breaks any of these outright, rather than warning you.Step 6: Complete setup in Base44
Once your cluster, indexes, network access, and database access are ready, connect it to your workspace. To complete your setup:- Click your workspace name at the bottom left of your account.
- Click Settings.
- Click Overview.
- Under Data hosting > Workspace MongoDB connection, select your Authentication method, either Username & password or AWS IAM (passwordless), to match your database access.
- Paste your connection string. The database name is fixed to
app_prodand cannot be edited. - Click Validate and save. Base44 connects to your cluster, runs a ping, then writes, reads back, and deletes one temporary document per validated collection. Nothing is saved if any check fails.
- Once the status shows Validated, click Enable.
- Create your apps only after the status shows Enabled.
After setup
A few things change once your connection is live, and 2 of them cannot be undone without help.- Apps created after you enable the connection route their runtime entity and app-user data to your cluster. Base44 platform metadata, such as accounts, workspaces, billing, and app definitions, always remains on Base44-managed infrastructure.
- You cannot change the connection from your workspace settings once it is enabled. Rotating a password or moving clusters is a managed migration handled with Customer Care.
- You can disable the connection only before the workspace’s first app is created. After that, changes need a managed migration.
Troubleshooting
Base44 rejects a connection rather than accepting a broken one, so each failure comes with a specific message. Find yours below.
If your error is not listed here, contact your Base44 contact and we will help you get connected.