MongoDB Setup Guide
Step-by-step guide to set up your own MongoDB database for Taskflow AI
MongoDB Setup Guide
This guide will walk you through setting up your own MongoDB database for self-hosting your Taskflow AI organization data.
Why Self-Host?
Self-hosting your organization data gives you:
- Full Control: Complete ownership of your data
- Customization: Configure database settings to your needs
- Privacy: Keep sensitive data on your own infrastructure
- Compliance: Meet specific regulatory requirements
Note: With self-hosting enabled, your organization membership is still maintained in our system for discoverability, but all organization, project, and task data is stored in your custom database.
MongoDB Atlas Setup (Recommended)
MongoDB Atlas is the easiest way to get started with a cloud MongoDB database.
Step 1: Create an Account
- Go to MongoDB Atlas
- Click "Try Free" or "Sign Up"
- Create your account with email or Google/GitHub
Step 2: Create a Cluster
- After logging in, click "Create a New Cluster"
- Choose "Free" for the free tier (perfect for getting started)
- Select your preferred cloud provider and region
- Give your cluster a name (e.g., "taskflow")
- Click "Create Cluster"
Tip: The free tier (M0) provides 512 MB of storage, which is sufficient for small to medium organizations.
Step 3: Configure Network Access
- Click "Network Access" in the left sidebar.
- Click "Add IP Address".
- Click "Allow Access from Anywhere" (0.0.0.0/0). (Or add only specific IP addresses for a more secure connection. Get your IP Here).
- Click "Confirm".
Security Note: For secure use, always restrict network access to specific IP addresses rather than allowing access from anywhere.
Step 4: Create a Database User
- Go back to "Clusters" in the left sidebar.
- Click the "Connect" button for your cluster.
- It will ask you to create a new database user (if you haven't already).
- Choose a username and a secure password (Remember or copy these).
- Click "Create Database User", then click "Choose a connection method".
Step 5: Get Your Connection String
- In the connection method page, choose "Drivers".
- Scroll down and find the "Add your connection string into your application code" section.
- Copy the string. It should look like:
mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority - Replace
<password>with the password of the user you made earlier. (Do not keep the<>symbols). The username should be auto-filled. - Paste the completed string into Taskflow.
Step 6: Set the Database Name
- Once you paste the URL, if the database name is in the URL it should be auto-detected. If it is not, or you want to create a new one, put the name into the second input field.
- You're Done!
Self-Hosted MongoDB Setup
I will not provide instructions on how to host MongoDB on your own machine or using another service.
You can follow the official MongoDB installation guide for your operating system:
Testing Your Connection
Once you have your connection string:
- Go to Taskflow AI Settings → Database tab (Or click the checkbox when creating an organization).
- Paste your connection string in the "MongoDB Connection URL" field.
- The database name should auto-populate. (Put it in manually if it doesn't auto-detect or if you want to make a new one).
- Click "Test Connection" to verify everything works.
- If successful, click "Save Configuration".
For MongoDB Atlas:
- Use Strong Passwords: Create complex passwords for database users.
- Restrict IP Access: Only allow connections from trusted IP addresses.
- Enable Encryption: Atlas enables encryption at rest by default.
- Regular Backups: Atlas provides automated backups.
- Monitor Access: Review database access logs regularly.
Database Schema
Taskflow AI will automatically create the following collections in your database:
- organizations: Organization metadata and settings
- projects: Project information and configurations
- tasks: Task data and history
- columns: Kanban board column definitions
All collections include proper indexes for optimal performance.
Common Connection Issues:
- Network Access: Ensure your IP address is whitelisted (or allow all by adding 0.0.0.0/0).
- Credentials: Verify username and password are correct.
- Database Name: Make sure the database name in the URL is correct.
- SSL Requirements: Some providers require SSL connections.
Performance Optimization:
- Indexing: Taskflow AI creates necessary indexes automatically.
- Connection Pooling: Use connection pooling for better performance.
- Monitoring: Monitor database performance and usage.
Migration
If you need to migrate from the official database to your self-hosted setup:
Warning: Currently, data migration between databases is not automated. Contact support if you need assistance migrating existing data.
Support
Need help with your MongoDB setup?
- Contact our Support Team