Platrium Docs

Dev Environment Setup

The super-awesome guide to setup your local dev env and contribute to Platrium!

Settings The Engine Needs

The engine reads its configuration from environment variables, and it refuses to start if a required one is missing. Here are the ones you will always need:

VariableWhat it is
DB_DRIVER, DB_DSNThe database. sqlite is fine for development. See the database.
KV_BADGER_PATHWhere the embedded key-value store keeps its files.
APP_URLThe public address you open Platrium at, for example http://localhost:3000. Upload URLs and identity-provider redirect addresses are built from it.
PLATRIUM_SECRET_KEYOne secret the whole cluster shares. It signs upload receipts and seals secrets stored in the database (like an identity provider's client secret).

A throwaway key for development is one command away:

export PLATRIUM_SECRET_KEY="$(openssl rand -base64 32)"

There is deliberately no default for PLATRIUM_SECRET_KEY: a built-in key would make everything sealed under it effectively plaintext. Change it later and anything already sealed (provider client secrets) can no longer be read, so keep it somewhere safe.

On this page