Before you begin
You need the following installed in your system:- Docker and docker-compose
- Git
Quick Start
Get the code
Clone the Novu repo and enter the docker directory locally:Securing your setup
While we provide you with some example secrets for getting started, you should NEVER deploy your Novu setup using the defaults provided. Update the.env
file with your own secrets.
Required Variables:
JWT_SECRET
: Used by the API to generate JWT keys.STORE_ENCRYPTION_KEY
: Used to encrypt/decrypt the provider credentials. It must be 32 charactoer long.HOST_NAME
: Host name of your installation. This will be the base URL of your installation. For example, if you are deploying to server with ip35.154.137.80
, then you should set this tohttp://35.154.137.80
.
REDIS_CACHE_SERVICE_HOST
and REDIS_HOST
can have same value for small deployments. For larger deployments, it is recommended to use separate Redis instances for caching and queue management.
Configuration
To keep the setup simple, we made some choices that may not be optimal for production:- the database is in the same machine as the servers
- the storage uses localstack instead of S3
Triggering events with custom installation
When self-hosting Novu, in order to trigger an event you must first create a newNovu
object and configure it with the proper backendUrl
.
Pointing IFrame embed to custom installation
When using the IFrame embed to attach the notification center rather than the React component, you need to specify thebackendUrl
and the socketUrl
when initializing the iframe.
Using React Component with custom installation
See Use your own backend and socket URL.Caching
We are introducing the first stage of caching in our system to improve performance and efficiency. Caching is turned off by default, but can easily be activated by setting the following environment variables:- REDIS_CACHE_SERVICE_HOST
- REDIS_CACHE_SERVICE_PORT
If you require guidance on setting up a production-scale configuration, official IaaS recommendations, please don’t hesitate to contact our team.
They can provide assistance regarding enterprise edition licenses or cloud-prem deployment to meet your specific needs.
Reverse-Proxy / Load Balancers
To implement a reverse-proxy or load balancer in front of Novu, you need to set the GLOBAL_CONTEXT_PATH for the base path of the application. This is the path that the application will be served from after the domain. For example:- company.com/novu This is used to set the base path for the application, and is used to set the base path for the API, web, and websocket connections.
- API: company.com/novu/api
- WIDGET: company.com/novu/widget
- WS: company.com/novu/ws
- WEB: company.com/novu/web
- API: company.com/novu-api
These env variables should be present on all services novu provides due to tight coupling.