#Run Novu in Ubuntu cloud + ApiKey
1 messages Β· Page 1 of 1 (latest)
sign up using the UI you also need to run locally
Got it, i have some troubles setting up the .env variables
i have mongo and redis
and i already updated API_ROOT_URL and FRONT_BASE_URL
but the web app still calls localhost:3000
im updating the wrong .env
are you running it locally in docker or with pnpm in terminal?
pnpm
have you restarted frontend and backend
@icy wind, you just advanced to level 1!
otherwise web will not know where you have your api service running and will go with default that is localhost:3000
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=dev
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
i add there API_ROOT_URL?
you need to change REACT_APP_API_URL
and you have restarted both?
yes
/home/novu/apps/web# sudo nano .env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://watcher.feralbyte.com:4200
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=dev
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
and what is FRONT_BASE_URL?
on api/src/.env
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=http://watcher.feralbyte.com:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
Connected!
Waiting for localhost:4200.
Connected!
Everything is running π
Web: http://localhost:4200
API: http://localhost:3000
```
@icy wind, you just advanced to level 2!
its restarting
π
why do you use http://watcher.feralbyte.com
lets try to use localhost instead and see if it works...
The client side need to call the api right?
yes
i dont need to point it?
REACT_APP_API_URL should do that
ok and in the api urls i stick to localhost
let me try
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://localhost:3000
FRONT_BASE_URL=http://localhost:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
in api .env
its restarting
nop, its calling localhost:3000
feels like im changing the wrong .env file
try remove build folder in web and restarting
i need to go now, but in a couple of hours i will try
Ok might not be online at that point
Thank you for your help π
no problem
After removing build I canβt open the web app anymore
Waiting for localhost:4200.
Connected!
Everything is running π
Web: http://localhost:4200
API: http://localhost:3000
not even with the links provided in terminal?
Im running on a cloud server
ah that explains watcher.feralbyte.com π
so lets change it back to it and remove build in web and see if it works
i removed the build and put the watcher.feralbyte.com in apps/api/src/.env
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=http://watcher.feralbyte.com:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
But the web app continues to call localhost
yeah it is the .env in web you need to modify as well
Hey David good morning!
These are my .env
/apps/web/.env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://watcher.feralbyte.com:3000
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=dev
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
/apps/api/src
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=http://watcher.feralbyte.com:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
@icy wind, you just advanced to level 3!
and i run npm run start
Run the project
WEB & API
hm and it is not working?
yes :/
@fleet viper or @cyan terrace could I get your help here π
I can reinstall everything and try
I do not think that is the problem
in jarvis when i select Development environment setup i get this:
./scripts/dev-environment-setup.sh: 66: Syntax error: redirection unexpected
im using ubuntu 22 and node 16
Oh, this is a problem with the script. Probably is not completely POSIX compliant. Would you mind to open a GitHub issue so we can look into it?
Anyway, this is not related to your configuration problem.
Regarding your problem if right now you are trying running the apps individually in your local machine you need to remove the value REACT_APP_API_URL=http://watcher.feralbyte.com:3000 from /apps/web/.env and leave it like REACT_APP_API_URL=
And your /apps/web/.env to:
API_ROOT_URL=http://localhost:3000
FRONT_BASE_URL=http://localhost:4200
If you are still trying to run it in your cloud server, let me know so we can try to debug and find the problem helping you.
I cant try this in my local machine im trying to run in on a cloud server
What changes do i need to on the web and api .env?
i have reverted the .envs
i have this:
root@vmi1174668:~# tail -100 /home/novu/apps/web/.env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=dev
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
and this
root@vmi1174668:~# head /home/novu/apps/api/src/.env
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://localhost:3000
FRONT_BASE_URL=http://localhost:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
MONGO_URL=mongodb://localhost:27017/novu-db
REDIS_PORT=6379
REDIS_PREFIX=
with that i got:
this should work in your local machine and you should be able to run it
What's the response that /register call returns?
But the Novu is on a cloud server, i cant run it there and access it from outside?
Do you mean if you can use our cloud solution and have the Web app deployed in a different server requesting the calls against our cloud solution (api.novu.co)? Sorry, need to clarify this in order to be able to suggest solutions.
Im trying to deploy Novu on my cloud ubuntu machine
everything needs to sit there: api + web app
Ok, thanks. From your previous messages I understand than in your cloud machine you have assigned the URLs:
http://watcher.feralbyte.com:3000 -> for the API app
http://watcher.feralbyte.com:4200 -> for the Web app
Right?
Novu Manage Platform
yes
@icy wind, you just advanced to level 4!
I need to change the .env from web app?
to point to http://watcher.feralbyte.com:3000/ right?
You need to do the following changes.
In /apps/api/.env (please note the right location of the API)
NODE_ENV=prod
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=http://watcher.feralbyte.com:4200
Also you would need to set the proper URL where your MongoDB and Redis service are deployed:
MONGO_URL=mongodb://localhost:27017/novu-db // This won't work, unless you have deployed a MongoDB instance in your Cloud server
REDIS_HOST=<URL to the Redis host you will use>
REDIS_PORT=6379
In /apps/web/.env:
REACT_APP_API_URL=http://watcher.feralbyte.com:3000
REACT_APP_ENVIRONMENT=prod
Also the scripts to run are the ones start:prod.
I made the changes and run:
npm run start:web
npm run start:api
the web app still calls localhost
"Also the scripts to run are the ones start:prod. "
Can you explain me this please?
im running it incorrectly with npm run start:web?
i have mongo and redis installed in the machine
No, sorry for confusing you. Basically the scripts in the root of the monorepo point to the scripts in both apps.
When doing:
pnpm run start:api
you are actually executing
pnpm run start in the folder /apps/api.
That script executes /apps/api/pnpm start:dev script that should be picking the .env file.
Could you please run Web app and API app with these scripts:
cd /apps/api
pnpm run start:prod
and
cd /apps/web
pnpm run start
So we can dismiss it is a problem with the scripts structure and the documentation?
Run Novu in Ubuntu cloud + ApiKey
Mind you share again your .env files for API and Web, please? Redact all the secrets, please.
NODE_ENV=local
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=http://watcher.feralbyte.com:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
MONGO_URL=mongodb://localhost:27017/novu-db
REDIS_PORT=6379
REDIS_PREFIX=
REDIS_HOST=localhost
REDIS_DB_INDEX=2
REDIS_CACHE_SERVICE_HOST=
REDIS_CACHE_SERVICE_PORT=6379
REDIS_CACHE_DB_INDEX=
REDIS_CACHE_TTL=
REDIS_CACHE_PASSWORD=
REDIS_CACHE_CONNECTION_TIMEOUT=
REDIS_CACHE_KEEP_ALIVE=
REDIS_CACHE_FAMILY=
REDIS_CACHE_KEY_PREFIX=
JWT_SECRET=***********
S3_LOCAL_STACK=http://localhost:4566
S3_BUCKET_NAME=novu-local
S3_REGION=us-east-1
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
NEW_RELIC_ENABLED=false
CDN_URL=
MAIL_SERVER_DOMAIN=
GLOBAL_CONTEXT_PATH=
API_CONTEXT_PATH=
VERCEL_CLIENT_ID=
VERCEL_CLIENT_SECRET=
VERCEL_REDIRECT_URI=http://localhost:4200/auth/login
VERCEL_BASE_URL=https://api.vercel.com
FF_IS_TOPIC_NOTIFICATION_ENABLED=true
STORE_NOTIFICATION_CONTENT=true
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://watcher.feralbyte.com:3000
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=prod
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
Besides that, can you show the error message and status code received when you that call /auth/reset/request is executed?
I am sorry but that is not helpful enough. It totally looks like that you are deploying in the wrong URL the API because it doesn't even get the preflight requests.
Besides suggesting to change, as I did earlier, that the NODE_ENV must be set to prod (you missed to change it in the API app) I can't think of more things. Also remind you MongoDB url and Redis url are pointing to a local environment, so highly unlikely it will work all the set up.
Just a last question. That /request call is being executed just right the Web app is loaded? Or do you try any action?
Ok, I am assuming you are trying to execute the Forgot the password action, right?
yes
only to test the request
"d (you missed to change it in the API app) " yes i will change that
Also, can you double check the location of the .env file for the API app?
I am trying to simulate in my local what it might be happening to you but I can't replicate it.
root@vmi1174668:/home/novu/apps/api# dig +short myip.opendns.com @resolver1.opendns.com
84.46.246.26
root@vmi1174668:/home/novu/apps/api# head src/.env
NODE_ENV=prod
PORT=3000
API_ROOT_URL=http://84.46.246.26:3000
FRONT_BASE_URL=http://84.46.246.26:4200
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
MONGO_URL=mongodb://localhost:27017/novu-db
REDIS_PORT=6379
REDIS_PREFIX=
root@vmi1174668:/home/novu/apps/web# head .env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://84.46.246.26:3000
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=prod
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
Move the .env file to /apps/api. As you have it one folder deeper.
ok
Another check you should do is:
In /apps/web/src/config/index.ts , to put a console.log to see if the Web app is picking the environment variables properly.
Such:
console.log(process.env.REACT_APP_API_URL);
console.log(window._env_.REACT_APP_API_URL);
put it in line 9 for example. Both should have as value http://84.46.246.26:3000, based on your Web app environment variables file.
Then in the console of the Browser you should be able to see the values logged.
moved .env from api/src to api
i added the console logs
im restarting the web app
<--- Last few GCs --->
[43581:0x5537120] 63820 ms: Mark-sweep (reduce) 2043.3 (2082.7) -> 2042.7 (2083.2) MB, 1174.2 / 0.1 ms (average mu = 0.154, current mu = 0.044) allocation failure scavenge might not succeed
[43581:0x5537120] 65232 ms: Mark-sweep (reduce) 2043.8 (2083.2) -> 2043.1 (2083.7) MB, 1402.0 / 0.1 ms (average mu = 0.084, current mu = 0.008) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xb08e80 node::Abort() [node]
2: 0xa1b70e [node]
3: 0xce1890 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xce1c37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xe992a5 [node]
6: 0xea8f6d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xeabc6e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xe6d1aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
9: 0x11e5f96 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15d9c19 [node]
cant start now
8gb ram and 4swap
rebooting
cloned the last repo
Installed using node 16
cant start web app
<--- Last few GCs --->
[2244:0x6518120] 151971 ms: Scavenge 2018.3 (2075.2) -> 2015.2 (2076.9) MB, 13.5 / 0.0 ms (average mu = 0.829, current mu = 0.531) allocation failure
[2244:0x6518120] 152019 ms: Scavenge 2019.9 (2076.9) -> 2016.7 (2080.7) MB, 22.8 / 0.0 ms (average mu = 0.829, current mu = 0.531) allocation failure
[2244:0x6518120] 152085 ms: Scavenge 2023.6 (2080.7) -> 2019.6 (2097.9) MB, 21.7 / 0.0 ms (average mu = 0.829, current mu = 0.531) allocation failure
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xb08e80 node::Abort() [node]
2: 0xa1b70e [node]
3: 0xce1890 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xce1c37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xe992a5 [node]
6: 0xea8f6d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xeabc6e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xe6d1aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
9: 0x11e5f96 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15d9c19 [node]
npm ERR! Lifecycle script `start` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @novu/[email protected]
npm ERR! at location: /home/novu/apps/web
after running npm run setup:project im back at the same problem regarding the request failure
I need to know which values are showing up here. I can't help you forward in your personal set up without more info. I am sorry.
i manage to get it working with hardcoding the value:
export const API_ROOT =
window._env_.REACT_APP_API_URL || (isBrowser() && (window as any).Cypress)
? window._env_.REACT_APP_API_URL || 'http://localhost:1336'
: window._env_.REACT_APP_API_URL || 'http://watcher.feralbyte.com:3000';
and building the app
but i cant manage to use the apps/web/.env
You can or you can't?
i cant*
@icy wind, you just advanced to level 5!
sorry
it's not a problem just needed to understand you clearly π
the copy buttons do not work on localhost because chrome and other browsers requires https for it to work
got it i will try to build the apps and implement https
One question, are you running the /apps/web script envsetup after modyfing the .env values for the Web app? That is needed to generate a file to load the proper env variables in window._env_ object and make the client pointing to the right API.
I think we have no clearly explained that in the docs but because the self hosted option is something we are not maintaining (and not providing deep support).
No, i didn't know that :/ i will try it in the next days, thank you π
It was useful for us to go and update the documents to mention it explicitly. We did a PR regarding that.
even when i execute ./env.sh i still points to localhost
- changed
web/.env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://watcher.feralbyte.com:3000
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=prod
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
novu/apps/web# ./env.sh
npm run build
Got it, I needed to run npm run envsetup
Now its pointing correctly but i have problems registering
i was able to register previously without https
if i run the post with curl it runs ok
curl 'http://watcher.feralbyte.com:3000/v1/auth/register' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Referer;' \
-H 'Content-Type: application/json' \
--data-raw $'{"firstName":"hugo","lastName":"freire","email":"[email protected]","password":"************"}' \
--compressed
{"statusCode":400,"message":"User already exists","error":"Bad Request"}
its related to strict-origin-when-cross-origin
based on this the user already seems to exists have you tried to sign in?
yes its true
but i only works when i used the curl post
inside de web app the request fails
with the same payload
i copy the same request
fails in the app
passes on curl
Hey I can chime in on this. I have some fixes too.
Novu appears to work best with the context path is set to the default value. When you change it, there are issues on the api and also web side of things.
For instance the function call getContextPath will return the correct env variable with the URL / context path depending on who is calling the function.
How this function works is that is looks at the different env variables using the NodeJS call like process.env.GLOBAL_CONTEXT_PATH
However, this will not work in novu-web which is client side
case NovuComponentEnum.WEB:
if (process.env.FRONT_BASE_CONTEXT_PATH) {
contextPath += process.env.FRONT_BASE_CONTEXT_PATH + '/';
}
As the client side does not have access to the env variables.
I fixed this locally with
sed -i "s|CONTEXT_PATH =.*|CONTEXT_PATH = '$CONTEXT_PATH';|g" $WEB_APP/src/config/index.ts
There are also a number of static images that do not work
# Prepend CONTEXT_PATH to references to the public/static folder
SED_COMMAND='s|\([\`"'\'']\)\/static|\1'${CONTEXT_PATH}'/static|g'
find "${WEB_APP}/src" -type f -name "*.tsx" -exec sed -i ${SED_COMMAND} {} +
I'll try to put together a PR with these updates
Thank @burnt sierra i used yout command but replacing the wep path like this:
sed -i "s|CONTEXT_PATH =.*|CONTEXT_PATH = '$CONTEXT_PATH';|g" /home/novu/apps/web/src/config/index.ts
and rebuilt the web app but I keep receiving errors on the request :/
My bad, I only shared a small part of my script, there are other changes too.
The problem is that the context path for frontend is not implemented yet. It is part of the Docker project that is community driven. And the implementation wasn't fully done.
WEB_APP=/usr/src/app/apps/web
CONTEXT_PATH=/notifications/novu
# Update env files with the correct CONTEXT_PATH.
sed -i "s|GLOBAL_CONTEXT_PATH=.*|GLOBAL_CONTEXT_PATH=$CONTEXT_PATH|g" $WEB_APP/.env
# PUBLIC_URL is used during the react build process `pnpm build:web`
echo "PUBLIC_URL=$CONTEXT_PATH" >> $WEB_APP/.env
# Update TypeScript files with the correct CONTEXT_PATH.
sed -i "s|CONTEXT_PATH =.*|CONTEXT_PATH = '$CONTEXT_PATH';|g" $WEB_APP/src/config/index.ts
# Prepend CONTEXT_PATH to references to the public/static folder
SED_COMMAND='s|\([\`"'\'']\)\/static|\1'${CONTEXT_PATH}'/static|g'
find "${WEB_APP}/src" -type f -name "*.tsx" -exec sed -i ${SED_COMMAND} {} +
# The above command may result in increased line-length with some files, this may causes the build
# to fail due to linting errors. For this reason, disable linter errors when rebuilding.
echo '*' > $WEB_APP/.prettierignore
# Rebuild the project to incorporate the above changes.
pnpm build:web
(cd $WEB_APP || exit ; ./env.sh ; mv env-config.js ./build/)
Are you using a different context path for the web / api container or both?
i don't fully grasp the context path
i installed everything on /home/novu
Does your script work if i replace /usr/src/app/apps/web to /home/novu/app/apps/web ?
Context path is for the public URLs where API and Web are accessed.
Let's say you want to host your API and expose it in:
https://api.my-domain.com/api
And your Web in:
https://my-domain.com/app
The context path in those cases would be: /api for the API and /app for the Web app.
humm its a path after the domain?
oohh make sense π
i dont have any
i can use this?
#!/bin/sh
WEB_APP=/home/novu/apps/web
CONTEXT_PATH=/
# Update env files with the correct CONTEXT_PATH.
sed -i "s|GLOBAL_CONTEXT_PATH=.*|GLOBAL_CONTEXT_PATH=$CONTEXT_PATH|g" $WEB_APP/.env
# PUBLIC_URL is used during the react build process `pnpm build:web`
echo "PUBLIC_URL=$CONTEXT_PATH" >> $WEB_APP/.env
# Update TypeScript files with the correct CONTEXT_PATH.
sed -i "s|CONTEXT_PATH =.*|CONTEXT_PATH = '$CONTEXT_PATH';|g" $WEB_APP/src/config/index.ts
# Prepend CONTEXT_PATH to references to the public/static folder
SED_COMMAND='s|\([\`"'\'']\)\/static|\1'${CONTEXT_PATH}'/static|g'
find "${WEB_APP}/src" -type f -name "*.tsx" -exec sed -i ${SED_COMMAND} {} +
# The above command may result in increased line-length with some files, this may causes the build
# to fail due to linting errors. For this reason, disable linter errors when rebuilding.
echo '*' > $WEB_APP/.prettierignore
# Rebuild the project to incorporate the above changes.
pnpm build:web
(cd $WEB_APP || exit ; ./env.sh ; mv env-config.js ./build/)
didn't work :/
like you said the images are broken but its fine
but the request its failing :/
i will try a black context_path
seems more logical xD
Can you detail out the different env variables you are setting up?
sure
If you don't have a context path, and you are just using / like in your screenshot, ignore everything I have said so far.
ok ok
## /home/novu/apps/api/src/.env
NODE_ENV=prod
PORT=3000
API_ROOT_URL=http://watcher.feralbyte.com:3000
FRONT_BASE_URL=https://watcher.feralbyte.com
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
@icy wind, you just advanced to level 6!
# /home/novu/apps/web/.env
REACT_APP_API_URL=http://watcher.feralbyte.com:3000
REACT_APP_WIDGET_SDK_PATH=
REACT_APP_ENVIRONMENT=prod
GLOBAL_CONTEXT_PATH=
WEB_CONTEXT_PATH=
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=/
PUBLIC_URL=
i need to do some clean up xD
and on the api side of things?
is this one right?
do you want the entire file?
What is the URL that you use to first navigate to your website?
http://watcher.feralbyte.com
I agree that you need to complete some clean up as there are a number of things that appear to be going wrong from what I can see.
I believe there maybe some missing values from the file https://watcher.feralbyte.com/env-config.js
when fetching an image, the application appears to be doing scheme: https host: static filename: /images/logo-formerly-dark-bg.png
You should also be able to check the API heath check on http://watcher.feralbyte.com:3000/v1/healthcheck
{"statusCode":404,"message":"Cannot GET /v1/healthcheck","error":"Not Found"}
i dont know what is missing π¦
i will reinstall everything in post only the modifications and result
git clone https://github.com/novuhq/novu.git
cd /home/novu
npm run setup:project
sudo nano /home/novu/apps/web/.env
head /home/novu/apps/web/.env
SKIP_PREFLIGHT_CHECK=true
REACT_APP_API_URL=http://watch.feralbyte.com:3000
REACT_APP_ENVIRONMENT=prod
REACT_APP_INTERCOM_APP_ID=
REACT_APP_SEGMENT_KEY=
sudo nano /home/novu/apps/api/src/.env
head /home/novu/apps/api/src/.env
NODE_ENV=prod
PORT=3000
API_ROOT_URL=http://localhost:3000
FRONT_BASE_URL=https://watcher.feralbyte.com
STORE_ENCRYPTION_KEY="<ENCRYPTION_KEY_MUST_BE_32_LONG>"
DISABLE_USER_REGISTRATION=false
cd /home/novu/apps/web
npm run envsetup
npm run build
On the cloud server:
curl http://localhost:3000/v1/healthcheck
{"statusCode":404,"message":"Cannot GET /v1/healthcheck","error":"Not Found"}
Externally: ```
http://watcher.feralbyte.com:3000/v1/healthcheck
{"statusCode":404,"message":"Cannot GET /v1/healthcheck","error":"Not Found"}
That looks a lot better, but I am guessing that your problem is with your nginx mappings.
Your API server was running on port 3000 earlier, nothing is running there now.
I use nginx only to serve the web app
The port is open.
I need to do something on apps/api/src/.env?
Hey guys, for local installation do you have more info to set this up?
Or I need to go for a docker solution
There is some config issues with your nginx setup. When you first navigate to the root URL, you are redirected to the login. Refreshing that page will result in an error. Could you post your nginx config
yes sure π thanks for helping
server {
server_name watcher.feralbyte.com;
location / {
root /home/novu/apps/web/build;
index index.html;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/watcher.feralbyte.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/watcher.feralbyte.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = watcher.feralbyte.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name watcher.feralbyte.com;
return 404; # managed by Certbot
}
i didn't do anything related to api service
i need to redirect port 3000 to pass trough nginx with https?

## NGINX CONFIG
server_name watcher.feralbyte.com;
location / {
root /home/novu/apps/web/build;
index index.html;
}
location /api {
rewrite ^/api/?(.*)$ /$1 break;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
it's all good now π thank you a lot @stable fulcrum @cyan terrace @burnt sierra 
const novu = new Novu(process.env.NOVU_API_KEY)
how can i set my host server?
I think the second param is a config or host param
const novu = new Novu("b0ed975b7c42438de88c72f1a169c4b1",{backendUrl: 'https://watcher.feralbyte.com/api'});
correct π um super happy
Nice
discord message working π
Great have a great day or evening