cal.diy icon indicating copy to clipboard operation
cal.diy copied to clipboard

Self hosted url stuck at localhost:3000

Open gone opened this issue 3 years ago β€’ 46 comments

Issue Summary

When self hosting the url is stuck at localhost:3000

Steps to Reproduce

  1. use "install to render" button
  2. Set any/all of the nextauth_url, NEXT_PUBLIC_* envrionment values to the correct host
  3. Host is still on localhost:3000

gone avatar Apr 24 '23 17:04 gone

Same issue! Investigating

ariel-rajmaliuk avatar May 03 '23 15:05 ariel-rajmaliuk

same here

marcoantonio123456 avatar May 06 '23 00:05 marcoantonio123456

@gone have you tried changing it to 127.0.0.1:3000 IP instead of localhost

pranjalg13 avatar May 07 '23 13:05 pranjalg13

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

ariel-rajmaliuk avatar May 07 '23 23:05 ariel-rajmaliuk

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.

vsviridov avatar Jun 08 '23 23:06 vsviridov

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> after next dev/next start in apps/web/package.json
  • Running yarn dev -- -p <PORT_NUMBER>/yarn start -- -p <PORT_NUMBER>

oksdav avatar Aug 17 '23 21:08 oksdav

same problem here image

ur3an0 avatar Aug 30 '23 07:08 ur3an0

same issue here

Sharma-Rajat avatar Sep 14 '23 18:09 Sharma-Rajat

Has anyone solved this?

webenggeo avatar Oct 09 '23 19:10 webenggeo

+1 Screenshot 2023-10-10 at 07 47 48

sudo-eugene avatar Oct 10 '23 11:10 sudo-eugene

same issue here

ddilushan avatar Oct 31 '23 18:10 ddilushan

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.

Fritofour avatar Nov 26 '23 18:11 Fritofour

Looks like I found my problem. Just added the .env in the turbo.json.

"$schema": "https://turborepo.org/schema.json", "globalDotEnv": [".env"], "pipeline": {

Fritofour avatar Nov 26 '23 20:11 Fritofour

same

BeamNawapat avatar Dec 08 '23 15:12 BeamNawapat

After updating the .env file, refreshing the browser cache worked for me.

lperrious avatar Dec 20 '23 12:12 lperrious

Same here, in some links it's still pointing to localhost:3000

gutocarvalho avatar Feb 26 '24 02:02 gutocarvalho

It's been a year, I guess this won't be fixed anymore, maybe consider fork and fix on our own.

ghost avatar Apr 28 '24 16:04 ghost

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.

ghost avatar May 04 '24 03:05 ghost

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

ghost avatar May 05 '24 21:05 ghost

@nabby27 created a $30.00 reward using Opire

How to earn this reward?

Since this project does not have Opire bot installed yet 😞 you need to go to Opire and claim the rewards through your programmer's dashboard once you have your PR ready πŸ’ͺ

opiredev avatar May 16 '24 17:05 opiredev