Skip to content

Getting Started

This page shows you how to create a Sliplane database and connect to it from your application in the fastest way.

To create a database, follow these steps:

  1. In the Sliplane dashboard, go to Databases.

  2. Click Create Database.

  3. Choose a name, region, compute size, and storage size. See Pricing for what each option costs.

  4. Click Create Database.

Your database is ready to use once it finishes provisioning which takes around 30 seconds. Open it to find its connection details.

You can connect to your database using any PostgreSQL client, including command-line tools, language drivers, and graphical clients. All connections to Sliplane databases support TLS encryption. For protection against man-in-the-middle attacks, connect with sslmode=verify-full, which validates our certificate and hostname.

The fastest way to connect to your database is to use the Connection URI, which contains all the information needed to connect.

postgres://jonas:pAsSworD123@xxxxxx.sliplane.app:1234/mydb?sslmode=verify-full&sslrootcert=system
^ ^ ^ ^ ^
user -| | |- host port -| |- database
|
|- password

Copy the Connection URI from the Sliplane dashboard where your database is located and set it as an environment variable DATABASE_URL.

Terminal window
export DATABASE_URL="postgres://USER:PASSWORD@HOST:PORT/DATABASE?sslmode=verify-full&sslrootcert=system"

With the environment variable in place, you can connect from the psql CLI, any PostgreSQL driver, or ORMs. Here are a few examples to get you started.

Terminal window
# Connect to your database
psql "$DATABASE_URL"
# Or run a single query
psql "$DATABASE_URL" -c "SELECT version();"

The following table lists the official documentation for popular PostgreSQL drivers and ORMs.

Language or frameworkLibrary
JavaScript / TypeScriptnode-postgres (pg)
JavaScript / TypeScriptpostgres.js
JavaScript / TypeScriptDrizzle ORM
JavaScript / TypeScriptPrisma ORM
Pythonpsycopg
Gopgx
JavaPostgreSQL JDBC Driver
.NETNpgsql
Rubypg gem
PHPPDO_PGSQL
Rustsqlx / tokio-postgres
LaravelEloquent PostgreSQL driver
Djangodjango.db.backends.postgresql

Prefer a graphical client? Follow one of these quickstarts to connect with your database’s connection details.