Environment Variables
This document lists all available environment variables for DataRamen:
| Variable name | Accepted values / description |
|---|---|
| APP_DB_TYPE | mysql or postgres |
| APP_DB_HOST | URL or hostname of your database |
| APP_DB_PORT | Database port |
| APP_DB_DATABASE | Database name |
| APP_DB_USERNAME | Database username |
| APP_DB_PASSWORD | Database user password |
| APP_DB_SCHEMA | Database schema (Postgres only) |
| APP_DB_LOGGING | Enables logging of internal queries (those executed by DataRamen as part of its inner workings) |
| SYMM_ENCRYPTION_KEY | Secret key used to encrypt the database password (instructions) |
| JWT_SECRET | Secret key used to generate JWT tokens (instructions) |
| JWT_REFRESH_SECRET | Secret key used to generate JWT refresh tokens (instructions) |
| ALLOWED_ORIGINS | CORS configuration. When self-hosting, specify your hostname here |
| PORT | Port 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:
dataramen set [variable_name] [variable_value]For example, to update APP_DB_TYPE:
dataramen set APP_DB_TYPE mysqlHow 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.comSYMM_ENCRYPTION_KEY=encryption_keyJWT_SECRET=jwt_secret_keyJWT_REFRESH_SECRET=jwt_refresh_key