Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/universeclouddev/Universe/llms.txt

Use this file to discover all available pages before exploring further.

Universe ships with H2 (embedded, zero setup) and MySQL as built-in database providers. The three database extension JARs extend this set by registering additional DatabaseProvider implementations at runtime. Each extension activates only when its provider key is set in ./database.json — installing the JAR alone does nothing. All three extensions follow the same pattern: on onLoad() they inject DatabaseRegistry and call register() with a new provider instance. The core selects the active provider by matching the provider field in database.json against all registered keys at startup.
See the Database Configuration reference for the full database.json schema and built-in provider options.

Provider Summary

ProviderKeyExtension JARBuilt-in?
H2 (embedded)h2Yes
MySQLmysqlYes
PostgreSQLpostgresextension-db-postgresNo
MongoDBmongodbextension-db-mongodbNo
Redisredisextension-db-redisNo
PostgreSQL is a production-grade relational database well-suited for multi-node Universe clusters that require concurrent writes and advanced querying.Installation: Place extension-db-postgres.jar in ./extensions/ and set "provider": "postgres" in ./database.json../database.json:
{
  "provider": "postgres",
  "host": "localhost",
  "port": 5432,
  "database": "universe",
  "username": "universe",
  "password": "secret"
}
FieldDescription
providerMust be "postgres" to activate this extension
hostPostgreSQL server hostname or IP
portPostgreSQL port (default: 5432)
databaseDatabase name
usernameDatabase user
passwordDatabase password
Docker Compose example:
services:
  universe:
    image: git.lunarlabs.dev/scala/universe:latest
    volumes:
      - ./data:/data
    depends_on:
      - postgres

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: universe
      POSTGRES_USER: universe
      POSTGRES_PASSWORD: secret
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  postgres-data:
The extension uses jOOQ with the PostgreSQL dialect for all SQL operations, giving you the full range of PostgreSQL-specific features when implementing custom DatabaseProvider subclasses.

Switching Providers

To switch from one database provider to another:
  1. Stop Universe.
  2. Place the new extension JAR in ./extensions/ (if not already present).
  3. Update the "provider" field in ./database.json to the new provider key.
  4. Start Universe. The new provider’s connect() method is called during startup; the old provider is never loaded.
Switching database backends does not migrate existing data. Universe will start with an empty database under the new provider. Back up your data before switching.

Build docs developers (and LLMs) love