<!-- canonical: https://hostdc.xyz/host/databases · last updated 2026-10-24 · HostDC, Hosting for Discord, Stoat and Telegram bots and other always-on apps. -->

# Hosted databases

On a paid plan you can add a Postgres, Redis or FerretDB database that runs next to your bots. Only the bots you attach to it can reach it.

## What you can add

- **Postgres** for tables and SQL. Your bot gets `DATABASE_URL`.
- **Redis** for caches, cooldowns and queues. Your bot gets `REDIS_URL`.
- **FerretDB** for documents. It works with MongoDB drivers and Mongoose. Your bot gets `MONGODB_URL`.

## How many

| Plan | Hosted databases |
|---|---|
| Free | none |
| Mini | 1 |
| Lite | 3 |
| Pro | 5 |
| Max | 8 |

Free, with its 256 MB RAM pool, has no hosted database, but you can connect your own. A database's RAM comes out of your account's pool while it runs, however many bots use it. Its data counts toward your storage.

## How to add one

**1. Add it.** Use the bot's Database tab for a database that only this bot uses, or the Databases page in your dashboard for one that several bots share.

**2. Restart the bot.** The connection string arrives as an environment variable at the next start. We generate the password, store it encrypted and hide it from the console.

**3. Use it.** Read `DATABASE_URL`, `REDIS_URL` or `MONGODB_URL` in your code. You can download a dump at any time.

A database and the bots attached to it have to be on the same server.

## Your own database

Already run a database somewhere else? Paste its connection string instead, on any plan. We store it encrypted and set the same variable. You can also keep SQLite files in your bot's `/app` folder.

Mini is $0.89 a month, Lite is $1.69 a month and Pro is $2.79 a month. The [pricing page](/pricing) has every limit.

## Related

- [Scripts and always-on apps](/host/apps)
- [Web apps](/host/web-apps)
- [Host a Python bot](/host/python)
- [Environment variables and tokens](/guides/environment-variables-and-tokens)

## FAQ

### Can other people's bots reach my database?
No. It sits on a private network with only the bots you attach to it.

### What happens when I delete a database?
It stops at once. We keep its data for a short time in case you change your mind, then it is gone.

### What if I move to a smaller plan?
Your databases keep running. You just can't add a new one while you are over the new plan's number.
