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
Go to https://www.elephantsql.com/ and create a account..
Verify you email id
Create a free tiny instance
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 -yThen follows these steps:
Change the user to postgres to change the default ident password:
sudo su - postgresAnd then open the PostgreSQL shell:
psqlSet 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:
\qAnd for going back to your user:
exitNow, the DB_URI will be:
postgresql://postgres:yourpasswordhere@localhost:5432/thunderuserbotLast updated
Was this helpful?