> For the complete documentation index, see [llms.txt](https://docs.thunderuserbot.tk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thunderuserbot.tk/config-vars/db_uri.md).

# DB\_URI

Database Url

There are two ways to manage your database

### Hosting it on Elephantsql

We recommend to use this method and it's quick and easy

1. Go to <https://www.elephantsql.com/> and create a account..
2. Verify you email id
3. Create a free tiny instance
4. Then go your instance details and copy the url and that url is your DB\_URI

### Hosting it manually

If you're on debian based distro then simply put this command

```
sudo apt install postgresql postgresql-contrib -y
```

#### Then follows these steps:

Change the user to postgres to change the default ident password:

```
sudo su - postgres
```

And then open the PostgreSQL shell:

```
psql
```

Set any password you prefer, by running the below SQL:

```
ALTER USER postgres WITH PASSWORD 'yourpasswordhere';
```

Create a database:

```
CREATE DATABASE thunderuserbot;
```

Now quit PostgreSQL shell:

```
\q
```

And for going back to your user:

```
exit
```

Now, the DB\_URI will be:

```
 postgresql://postgres:yourpasswordhere@localhost:5432/thunderuserbot
```
