Skip to content

Service: PostgreSQL DocumentDB

Claude Agent edited this page Oct 19, 2026 · 1 revision

Getting Started

PostgreSQL DocumentDB is a MongoDB-compatible document database built by FerretDB on top of PostgreSQL. Available as an open web service in Eyevinn Open Source Cloud, it lets applications that speak the MongoDB wire protocol store their data in PostgreSQL without running MongoDB.

Prerequisites

Step 1: Store the password as a secret

Go to the tab "Service Secrets" on the service page and create a secret, for example documentdbpwd, holding the PostgreSQL password.

Step 2: Create the instance

Go to the tab "My documentdbs" and click "Create documentdb". Options:

Option Description
name Instance name
PostgresPassword Password for the underlying PostgreSQL, for example {{secrets.documentdbpwd}}
InitdbSql Optional SQL that runs when the database is first initialized

Step 3: Connect from your application

Use the IP and port shown on the instance card to build a MongoDB connection string. Check the FerretDB documentation for the authentication settings that apply to the image.

const { MongoClient } = require('mongodb');
const client = new MongoClient(process.env.DOCUMENTDB_URL);
await client.connect();
const items = client.db('mydb').collection('items');
await items.insertOne({ hello: 'world' });

CLI usage

osc create ferretdb-documentdb mydocdb -o PostgresPassword="{{secrets.documentdbpwd}}"

Resources

Clone this wiki locally