Prerequisites and steps to run Novu in local machine. Learn how to set up Novu on your local environment for testing and development.
shell git clone https://github.com/novuhq/novu.git
npm run start
will start the Jarvis CLI tool which allows you to run the whole project with ease. If you only want to run parts of the platform, you can use the following run commands from the root project:
npm run start
@novu/node
package in watch modenpm run setup:project
creates default environment variables that are required to run Novu in a development environment. However, if you want to test certain parts of Novu or run it in production mode, you need to change some of them. These are all the available environment variables:
API Backend
NODE_ENV
(default: local)The environment of the app. Possible values are: dev, test, production, ci, localS3_LOCAL_STACK
The AWS endpoint for the S3 Bucket required for storing various mediaS3_BUCKET_NAME
The name of the S3 BucketS3_REGION
The AWS region of the S3 BucketPORT
The port on which the API backend should listen onFRONT_BASE_URL
The base url on which your frontend is accessible for the user. (e.g. dashboard.novu.co)DISABLE_USER_REGISTRATION
(default: false)If users should not be able to create new accounts. Possible values are: true, falseREDIS_HOST
The domain / IP of your redis instanceREDIS_PORT
The port of your redis instanceREDIS_PASSWORD
Optional password of your redis instanceREDIS_DB_INDEX
The Redis database indexREDIS_CACHE_SERVICE_HOST
The domain / IP of your redis instance for cachingREDIS_CACHE_SERVICE_PORT
The port of your redis instance for cachingREDIS_CACHE_DB_INDEX
The Redis cache database indexREDIS_CACHE_TTL
The Redis cache ttlREDIS_CACHE_PASSWORD
The Redis cache passwordREDIS_CACHE_CONNECTION_TIMEOUT
The Redis cache connection timeoutREDIS_CACHE_KEEP_ALIVE
The Redis cache TCP keep alive on the socket timeoutREDIS_CACHE_FAMILY
The Redis cache IP stack versionREDIS_CACHE_KEY_PREFIX
The Redis cache prefix prepend to all keysREDIS_CACHE_SERVICE_TLS
The Redis cache TLS connection supportIN_MEMORY_CLUSTER_MODE_ENABLED
The flag that enables the cluster mode. It might be Redis or ElastiCache cluster, depending on the env variables set for either service.ELASTICACHE_CLUSTER_SERVICE_HOST
ElastiCache cluster hostELASTICACHE_CLUSTER_SERVICE_PORT
ElastiCache cluster portREDIS_CLUSTER_SERVICE_HOST
Redis cluster hostREDIS_CLUSTER_SERVICE_PORTS
Redis cluster portsREDIS_CLUSTER_DB_INDEX
Redis cluster database indexREDIS_CLUSTER_TTL
Redis cluster ttlREDIS_CLUSTER_PASSWORD
Redis cluster passwordREDIS_CLUSTER_CONNECTION_TIMEOUT
Redis cluster connection timeoutREDIS_CLUSTER_KEEP_ALIVE
Redis cluster TCP keep alive on the socket timeoutREDIS_CLUSTER_FAMILY
Redis cluster IP stack versionREDIS_CLUSTER_KEY_PREFIX
Redis cluster prefix prepend to all keysJWT_SECRET
The secret keybase which is used to encrypt / verify the tokens issued for authenticationSENDGRID_API_KEY
The api key of the Sendgrid account used to send various emailsMONGO_URL
The URL of your MongoDB instanceMONGO_MAX_POOL_SIZE
The max pool size of the MongoDB connectionNOVU_SECRET_KEY
The api key of dashboard.novu.co used to send various emailsSENTRY_DSN
The DSN of sentry.io used to report errors happening in productionWorker
NODE_ENV
(default: local)The environment of the app. Possible values are:
dev, test, production, ci, local - PORT
The port on which the Worker app
should listen on - STORE_ENCRYPTION_KEY
The encryption key used to
encrypt/decrypt provider credentials - MAX_NOVU_INTEGRATION_MAIL_REQUESTS
The
number of free emails that can be sent with the Novu email provider -
NOVU_EMAIL_INTEGRATION_API_KEY
The Novu email provider Sentry API key -
STORAGE_SERVICE
The storage service name: AWS, GCS, or AZURE -
S3_LOCAL_STACK
The LocalStack service URL - S3_BUCKET_NAME
The name of the
S3 Bucket - S3_REGION
The AWS region of the S3 Bucket - GCS_BUCKET_NAME
The
name of the GCS Bucket - AZURE_ACCOUNT_NAME
The name of the Azure account -
AZURE_ACCOUNT_KEY
The Azure account key - AZURE_HOST_NAME
The Azure host
name - AZURE_CONTAINER_NAME
The Azure container name - AWS_ACCESS_KEY_ID
The
AWS access key - AWS_SECRET_ACCESS_KEY
The AWS secret access key -
REDIS_HOST
The domain / IP of your redis instance - REDIS_PORT
The port of
your redis instance - REDIS_PASSWORD
Optional password of your redis instanceREDIS_DB_INDEX
The Redis database index - REDIS_CACHE_SERVICE_HOST
The
domain / IP of your redis instance for caching - REDIS_CACHE_SERVICE_PORT
The
port of your redis instance for caching - REDIS_DB_INDEX
The Redis cache
database index - REDIS_CACHE_TTL
The Redis cache ttl -
REDIS_CACHE_PASSWORD
The Redis cache password -
REDIS_CACHE_CONNECTION_TIMEOUT
The Redis cache connection timeout -
REDIS_CACHE_KEEP_ALIVE
The Redis cache TCP keep alive on the socket timeout -
REDIS_CACHE_FAMILY
The Redis cache IP stack version -
REDIS_CACHE_KEY_PREFIX
The Redis cache prefix prepend to all keys -
REDIS_CACHE_SERVICE_TLS
The Redis cache TLS connection support -
IN_MEMORY_CLUSTER_MODE_ENABLED
The flag that enables the cluster mode. It
might be Redis or ElastiCache cluster, depending on the env variables set for
either service. - ELASTICACHE_CLUSTER_SERVICE_HOST
ElastiCache cluster host -
ELASTICACHE_CLUSTER_SERVICE_PORT
ElastiCache cluster port -
REDIS_CLUSTER_SERVICE_HOST
Redis cluster host -
REDIS_CLUSTER_SERVICE_PORTS
Redis cluster ports -
REDIS_CLUSTER_DB_INDEX
Redis cluster database index -
REDIS_CLUSTER_TTL
Redis cluster ttl - REDIS_CLUSTER_PASSWORD
Redis cluster
password - REDIS_CLUSTER_CONNECTION_TIMEOUT
Redis cluster connection timeoutREDIS_CLUSTER_KEEP_ALIVE
Redis cluster TCP keep alive on the socket timeoutREDIS_CLUSTER_FAMILY
Redis cluster IP stack version -
REDIS_CLUSTER_KEY_PREFIX
Redis cluster prefix prepend to all keys -
MONGO_URL
The URL of your MongoDB instance - MONGO_MAX_POOL_SIZE
The max
pool size of the MongoDB connection - NEW_RELIC_APP_NAME
The New Relic app
name - NEW_RELIC_LICENSE_KEY
The New Relic license key - SEGMENT_TOKEN
The
Segment Analytics tokenWeb Client
REACT_APP_ENVIRONMENT
The environment of the app. Possible values are:
dev, test, production, ci, local - REACT_APP_API_URL
The base url on which
your API backend would be accessible - REACT_APP_WS_URL
The base url on
which your WebSocket service would be accessible -
SKIP_PREFLIGHT_CHECK
(default: true)Solves a problem with React App
dependency tree../env
file, it is needed to run the script pnpm envsetup
. This will
generate a file called env-config.js
that will be copied inside of
the public
folder of the application. Its purpose is to inject in
the window._env_
object the chosen environment variables that manage the
URLs the Web client will call to access to the API backend and the WebSocket
service.Web Socket
NODE_ENV
(default: local)The environment of the app. Possible values are: dev, test, production, ci, localSENTRY_DSN
The DSN of sentry.io used to report errors happening in productionREDIS_HOST
The domain / IP of your redis instanceREDIS_PORT
The port of your redis instanceREDIS_DB_INDEX
The database index of your redis instanceREDIS_PASSWORD
Optional password of your redis instanceJWT_SECRET
The secret keybase which is used to encrypt / verify the tokens issued for authenticationMONGO_URL
The URL of your MongoDB instanceMONGO_MAX_POOL_SIZE
The max pool size of the MongoDB connectionPORT
The port on which the WebSocket service should listen onnpm run test:providers
command.
Jarvis
we have made available an option to run this script that will automatically try to install all the dependencies needed to be able to run Novu locally, as the previous step of installing the project dependencies through pnpm install
. When executing it inside Jarvis
, you will need to have previously installed by yourself git
and node
, as we mentioned earlier on this page.
The script can be run on its own without any previous dependency installed, as it is prepared to execute the following tasks:
[git](https://git-scm.com/)
that is a required dependency for later) --- Will install Rosetta for Apple CPUs --- Will set up some opinionated OS settings[git](https://git-scm.com/)
is installed and if not will abort the operationlocal.novu.co
in your local machine$HOME/Dev