Grai uses Django and Postgres as part of it's core stack. It supports scheduled worker management with celery and cacheing through redis. It also offers both a REST API and GraphQL API.


Most aspects of the server are fully configurable. If there are any attributes you need greater control over PR's are welcome.


The default settings for ALLOWED_HOSTS, CORS_ALLOWED_ORIGINS, CSRF_TRUSTED_ORIGINS, and CORS_ALLOW_ALL_ORIGINS are all modified by DEBUG to be maximally permissive. It will allow all hosts, all origins, and all combinations of frontend host, backend host and scheme.

environment variablerequireddefault valuedescription
DEBUGNoFalseRun in debug mode
TEMPLATE_DEBUGNoFalseRun templating in debug mode
SERVER_HOSTNolocalhosthost for the current deployment
SERVER_PORTNo8000port for the current deployment
FRONTEND_HOSTNolocalhosthost for the deployed frontend
FRONTEND_PORTNo3000port for the deployed frontend
DISABLE_HTTPNoFalsedisables access through http
ALLOWED_HOSTSNoSERVER_HOST,, [::1]disables access through http
CORS_ALLOWED_ORIGINSNohttp://{SERVER_HOST}, https://{SERVER_HOST}, http://{FRONTEND_HOST}, https://{FRONTEND_HOST}host for the current deployment
CSRF_TRUSTED_ORIGINSNoSERVER_HOST,, [::1]host for the current deployment
CORS_ALLOW_ALL_ORIGINSNoFalseDjango CORS allow all setting

Email Configuration

environment variablerequireddefault valuedescription
EMAIL_BACKENDNodjango.core.mail.backends.console.EmailBackendYour preferred email backend (opens in a new tab)
EMAIL_FROMNoNoneThe email address your emails should be sent from
AWS_ACCESS_KEY_IDNoNoneAWS access key id required for amazon SES
AWS_SECRET_ACCESS_KEYNoNoneAWS secret access key required for amazon SES
AWS_SES_REGION_NAMENoNoneAWS region required for amazon SES email address your emails should be sent from

Celery Configuration

environment variablerequireddefault valuedescription
CELERY_BROKER_URLNoredis:// backend url for celery


environment variablerequireddefault valuedescription
SENTRY_DSNNoConfigure error reporting with Sentry
POSTHOG_PROJECT_API_KEYNoConfigure logging through posthog
DISABLE_TELEMETRYNoFalseDisables all telemetry default file storage backend used by Django