Getting Started
PostgreSQL is the world's most advanced open source relational database, trusted for reliability, feature robustness, and performance. Available as an open web service in Eyevinn Open Source Cloud, you can spin up a PostgreSQL instance in seconds and use it as the database backend for your applications, analytics tools, or OSC services that require a relational database.
Prerequisites
- If you have not already done so, sign up for an Eyevinn OSC account
Step 1: Store the password as a secret
It is good practice to store your database password as a service secret so you can reference it safely in other services. Navigate to the PostgreSQL service page, go to the Service Secrets tab, and click New Secret. Enter a name such as postgrespwd and a strong password as the value.
Step 2: Create a PostgreSQL instance
Go to the My osc-postgresqls tab and click Create osc-postgresql. Fill in:
- Name: a unique name for your instance (alphanumeric only, e.g.
mydb) - PostgresPassword:
{{secrets.postgrespwd}}(references the secret created in Step 1) - PostgresUser (optional): superuser username, defaults to
postgres - PostgresDb (optional): default database name, defaults to the username if not set
Click Create and wait for the status indicator to turn green.
Step 3: Connect to your database
Once the instance is running, click it to see the connection details including the IP address and port. Connect using any PostgreSQL client:
psql "postgres://postgres:<password>@<IP>:<PORT>/postgres"
Or use the connection URL in your application:
DATABASE_URL=postgres://postgres:<password>@<IP>:<PORT>/postgres
Using PostgreSQL with other OSC services
Many OSC services (Umami, Ghost, Formbricks, PostgREST, and others) accept a PostgreSQL connection URL. After creating your instance, store the full connection URL as a service secret on the target service and reference it with {{secrets.name}}.
CLI usage
osc create birme-osc-postgresql mydb \
-o PostgresPassword="{{secrets.postgrespwd}}" \
-o PostgresUser="postgres" \
-o PostgresDb="myapp"