Self hosted url stuck at localhost:3000
Issue Summary
When self hosting the url is stuck at localhost:3000
Steps to Reproduce
- use "install to render" button
- Set any/all of the nextauth_url, NEXT_PUBLIC_* envrionment values to the correct host
- Host is still on localhost:3000
Same issue! Investigating
same here
@gone have you tried changing it to 127.0.0.1:3000 IP instead of localhost
I believe it is related to the .yaml that docker uses. I forked https://github.com/calcom/docker, adjusted the .yaml file and pushed to the server again. It fixed SOME occurrences, but I there are still some issues
Installed locally, modified the .env file with the full https:// url for NEXT_PUBLIC_WEBAPP_URL etc, and after login I still get bounced back to http://localhost:3000.
I believe it's because Next.js uses port 3000 by default. Try one of these, in addition to changing the NEXT_PUBLIC_* environment variables:
- Adding
-p <PORT_NUMBER>afternext dev/next startin apps/web/package.json - Running
yarn dev -- -p <PORT_NUMBER>/yarn start -- -p <PORT_NUMBER>
same problem here
same issue here
Has anyone solved this?
+1
same issue here
Same problem. Can anyone look into it? :'(
As far as my investigation goes, it seems that nothing is set in the process.env during the deployment so everything stays as default values.
Looks like I found my problem. Just added the .env in the turbo.json.
"$schema": "https://turborepo.org/schema.json",
"globalDotEnv": [".env"],
"pipeline": {
same
After updating the .env file, refreshing the browser cache worked for me.
Same here, in some links it's still pointing to localhost:3000
It's been a year, I guess this won't be fixed anymore, maybe consider fork and fix on our own.
It turns out calcom is using next.js 13 and still using pages router, a quick search revealed how these environment variable is used.
The next.js doc suggest one should try to use getServerSideProps so environment variables can be read at runtime dynamically, I'll do a proof of concept shortly.
I'm gradually fixing this by replacing most client side environment variables to incorporate getServerSideProps instead so they will be rendered at request time.
I was a able to get it working in 2 places as of today.
https://github.com/calcom/cal.com/compare/main...persuasive0pest:cal.com:main