Skip to content

Environment Variables

This document lists all available environment variables for DataRamen:

Variable nameAccepted values / description
APP_DB_TYPEmysql or postgres
APP_DB_HOSTURL or hostname of your database
APP_DB_PORTDatabase port
APP_DB_DATABASEDatabase name
APP_DB_USERNAMEDatabase username
APP_DB_PASSWORDDatabase user password
APP_DB_SCHEMADatabase schema (Postgres only)
APP_DB_LOGGINGEnables logging of internal queries (those executed by DataRamen as part of its inner workings)
SYMM_ENCRYPTION_KEYSecret key used to encrypt the database password (instructions)
JWT_SECRETSecret key used to generate JWT tokens (instructions)
JWT_REFRESH_SECRETSecret key used to generate JWT refresh tokens (instructions)
ALLOWED_ORIGINSCORS configuration. When self-hosting, specify your hostname here
PORTPort on which the DataRamen server will listen

Updating environment variables with the DataRamen CLI

Section titled “Updating environment variables with the DataRamen CLI”

After installing DataRamen, you can update an environment variable using:

Terminal window
dataramen set [variable_name] [variable_value]

For example, to update APP_DB_TYPE:

Terminal window
dataramen set APP_DB_TYPE mysql

How to update env variables when using self-hosted DataRamen

Section titled “How to update env variables when using self-hosted DataRamen”

You can configure the service with a .env file in the project root (alongside package.json).

The following environment variables are required:

  • SYMM_ENCRYPTION_KEY: key used to encrypt database passwords
  • JWT_SECRET: key used to generate JWT tokens
  • JWT_REFRESH_SECRET: key used to generate JWT refresh tokens
  • ALLOWED_ORIGINS: comma-separated list of origins allowed to access the service

See here on how to generate secret keys.

Here is an example of minimal .env file:

ALLOWED_ORIGINS=https://yourdomain.com
SYMM_ENCRYPTION_KEY=encryption_key
JWT_SECRET=jwt_secret_key
JWT_REFRESH_SECRET=jwt_refresh_key