Getting started
Database Configuration
15 min
this guide explains how to create a supabase project, retrieve credentials, and configure them so your generated application runs successfully with a connected backend prerequisites before proceeding, ensure you have a supabase account (https //supabase com) node js (latest lts) installed python installed vs code or another ide creating a supabase project (if not already created) 1\ log in to the supabase dashboard https //supabase com/dashboard if you don’t have an account, click on the ‘sign up’ option to create an account 2\ you will be automatically redirected to create an organization if not, click “new organization” to proceed 3\ enter the organization name and click “create organization” 4\ click 'new project' 5\ enter project details project name → example ecommerce db organization → example personal org database password → example mysecurepassword123! and copy it select the region example ‘ south asia – mumbai’ 6\ click 'create project' 7\ wait for supabase to provision the project (1–2 minutes) retrieving supabase credentials once the project is ready 1\ go to project settings 2\ data api and copy the supabase url \ example https //abcxyzcompany supabase co 3\ go to the project settings → click api keys and copy the anon/public key \ example eyjhbgcioijiuzi1niisinr5cci go to project settings → database click on the connect option at the top of the page copy the database connection string under the transaction pooler section example \ postgresql //postgres asymgtsvzxwiawhyqlrd \[your password]@aws 1 ap south 1 pooler supabase com 6543/postgres replace the placeholder password in the connection string with the database password you created in step 2 note when configuring database connection strings, special characters in passwords can cause parsing errors to avoid this issue, you must url encode the password part of the connection string common special characters and their encoded forms character url encoded value @ %40 %3a / %2f \# %23 project ref → example mspojlszyctqthkpycgm which is get from the above database connection string url keep these credentials safe and do not share them publicly entering credentials in database configuration (deployment step) open the generated application interface where deployment is configured navigate to the database configuration section (as shown in the screenshot) paste the credentials in their respective fields supabase url example https //abcxyzcompany supabase co supabase key example eyjhbgcioijiuzi1niisinr5cci database connection string example postgresql //postgres\ mysecurepassword123!@aws 0 apsouth1 pooler supabase com 6543/postgres project ref example abcxyzcompany database password example mysecurepassword123! if you entered the correct credentials, ensure that it shows ✅ configuration valid click ‘ generate & download’ configuring locally with env file in both frontend and backend if you want to run the project locally after deployment inside your project folder, locate (or create) a env file in both frontend and backend add the following entries (example shown) next public supabase url=https //abcxyzcompany supabase co next public supabase key=eyjhbgcioijiuzi1niisinr5cci database url=postgresql //postgres\ mysecurepassword123!@aws 0 ap south 1 pooler supabase com 6543/postgres supabase project ref=abcxyzcompany supabase db password=mysecurepassword123! running the application locally open the project folder in vs code install dependencies npm install start the app npm run dev open http //localhost 3000 in your browser example the application should display your landing page connected to supabase user guide video tutorial common issues & fixes invalid credentials example if you mistakenly enter https //wrongurl supabase co instead of your project url, the connection will fail database password forgotten step reset in supabase → project settings → database → reset password following these steps ensures that the supabase project is created, credentials are entered in database configuration, and the generated application runs successfully with a connected backend