> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plugins.avenvault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Database and API Whitelisting for Discord Bots

> Whitelist your Discord bot host IP in MongoDB Atlas, AWS RDS, or other external database providers to allow secure database connections.

Almost all modern Discord bots rely on an external database (MongoDB, MySQL, PostgreSQL) to store user data, or they fetch data from external APIs (like YouTube, Spotify, or OpenAI).

If your database is hosted on a different machine than your bot (e.g., MongoDB Atlas or a managed AWS database), you must whitelist the bot's IP address.

## How to Configure External Database Access

1. Find the **Public IPv4 Address** of the machine hosting your Discord bot.
2. Log into your database provider's dashboard (e.g., MongoDB Atlas, AWS RDS).
3. Navigate to **Network Access** or **Security Groups**.
4. Add an inbound rule allowing connections from your bot's specific IP address.

<Note>
  If you are hosting the bot on a home network where the IP changes frequently, you may need to allow connections from anywhere (`0.0.0.0/0`), though this requires strong database passwords for security. We recommend using the maximum password length your database provider allows, and saving this to a password manager like Bitwarden.
</Note>
