How to Install PostgreSQL 19 on Ubuntu
Install PostgreSQL 19 on Ubuntu from the official PostgreSQL repository with apt, then connect with psql. Every command is shown with its real output.
- Database
- Operating Systems
- PostgreSQL
Install PostgreSQL 19 on Ubuntu from the official PostgreSQL repository with apt, then connect with psql. Every command is shown with its real output.
Install PostgreSQL 19 on a Mac with the official EDB installer, add its tools to Terminal and connect with psql. Every screen and command is shown, with real output.
Take the Next.js Authentication with Better Auth and PostgreSQL source code from the zip to a running app: install it, add the settings, start PostgreSQL in Docker and sign up.
Create a Next.js app with create-next-app and its recommended defaults, then start it with npm run dev and open it at localhost:3000. Every output shown is from a real run.
Change the Better Auth password length rules with minPasswordLength and maxPasswordLength: Better Auth refuses a password that’s too short on the server, whatever the form allows.
Show the signed-in user with Better Auth useSession: read data and isPending in a client component, and the Next.js header updates by itself on sign-in and sign-out.
Sign out a user with Better Auth: one call to authClient.signOut() ends the session in this browser, and the header that reads useSession switches back by itself.
Build a sign-in form with Better Auth in Next.js: authClient.signIn.email starts a session when the password is right, and shows Invalid email or password when it isn’t.
Build a sign-up form with Better Auth in Next.js: authClient.signUp.email creates the account and signs the new user in, and the form shows a clear message when the email address is already taken.
Part 3 of the free Better Auth course: add email and password sign-up, sign-in and sign-out to a Next.js app, with a header that shows who’s signed in.