[GH-ISSUE #3471] [bug]: Docker deploy Hoppscotch Community Edition error #1172

Open
opened 2026-03-16 18:58:41 +03:00 by kerem · 9 comments
Owner

Originally created by @254579676 on GitHub (Oct 25, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3471

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Using individual containers for the services

According to your document, I followed the steps to start the Docker log, but the ports were not opened and the service did not start.I don't understand why there are these strange problems in the actual deployment process when the operation steps are so simple on the deployment document. I hope the document can be updated to ensure the correct deployment.

docker run -p 3000:3000 --env-file .env hoppscotch-frontend

image
docker run -p 3170:3170 --env-file .env hoppscotch-backend
docker run -p 3100:3100 --env-file .env hoppscotch-admin
image

.env

image

Steps to reproduce

then,i changed deploy
Using the AIO container

docker run -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env hoppscotch/hoppscotch

hoppscotch-frontend using 3000,opened ,is OK.but admin dashboard open is error ,logs like this:
image

Environment

Release

Version

Self-hosted

Originally created by @254579676 on GitHub (Oct 25, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3471 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior [Using individual containers for the services](https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#using-individual-containers-for-the-services) According to your document, I followed the steps to start the Docker log, but the ports were not opened and the service did not start.I don't understand why there are these strange problems in the actual deployment process when the operation steps are so simple on the deployment document. I hope the document can be updated to ensure the correct deployment. **docker run -p 3000:3000 --env-file .env hoppscotch-frontend** ![image](https://github.com/hoppscotch/hoppscotch/assets/67950987/ef5763ba-1272-43ec-9460-7c5fab314391) docker run -p 3170:3170 --env-file .env hoppscotch-backend **docker run -p 3100:3100 --env-file .env hoppscotch-admin** ![image](https://github.com/hoppscotch/hoppscotch/assets/67950987/e9e812c3-7424-4030-ad30-9657fa1ebc17) .env ![image](https://github.com/hoppscotch/hoppscotch/assets/67950987/1d7670bb-e07e-4b5b-8a50-b70205f03133) ### Steps to reproduce then,i changed deploy [Using the AIO container](https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build#using-the-aio-container) docker run -p 3000:3000 -p 3100:3100 -p 3170:3170 --env-file .env hoppscotch/hoppscotch hoppscotch-frontend using 3000,opened ,is OK.but [admin dashboard](http://localhost:3100/) open is error ,logs like this: ![image](https://github.com/hoppscotch/hoppscotch/assets/67950987/fbb8f472-8357-4a46-8a42-99943564be20) ### Environment Release ### Version Self-hosted
Author
Owner

@liyasthomas commented on GitHub (Oct 25, 2023):

Hi @254579676, can you try securing your deployments by issuing TLS certificates and using HTTPS since we use secure HTTP cookies for authenticating users?

Mentioned in the documentation: https://docs.hoppscotch.io/documentation/self-host/enterprise-edition/prerequisites

It is recommended that you secure your deployments by issuing TLS certificates and using HTTPS since we use secure HTTP cookies for authenticating users.

<!-- gh-comment-id:1778551746 --> @liyasthomas commented on GitHub (Oct 25, 2023): Hi @254579676, can you try securing your deployments by issuing TLS certificates and using `HTTPS` since we use secure HTTP cookies for authenticating users? Mentioned in the documentation: https://docs.hoppscotch.io/documentation/self-host/enterprise-edition/prerequisites > It is recommended that you secure your deployments by issuing TLS certificates and using HTTPS since we use secure HTTP cookies for authenticating users.
Author
Owner

@balub commented on GitHub (Oct 25, 2023):

@254579676 may I see your .env file, have you added the URL to the WHITELISTED_ORIGINS env variable?

<!-- gh-comment-id:1778673574 --> @balub commented on GitHub (Oct 25, 2023): @254579676 may I see your `.env` file, have you added the URL to the `WHITELISTED_ORIGINS` env variable?
Author
Owner

@andrei-micuda commented on GitHub (Oct 27, 2023):

I am having the exact same issue.

<!-- gh-comment-id:1783228001 --> @andrei-micuda commented on GitHub (Oct 27, 2023): I am having the exact same issue.
Author
Owner

@Tzdy commented on GitHub (Oct 30, 2023):

You should use docker run -p 8080:8080 hoppscotch-frontend
屏幕快照 2023-10-30 下午9 44 28

<!-- gh-comment-id:1785234718 --> @Tzdy commented on GitHub (Oct 30, 2023): You should use docker run -p 8080:8080 hoppscotch-frontend ![屏幕快照 2023-10-30 下午9 44 28](https://github.com/hoppscotch/hoppscotch/assets/49274160/befc1262-f47d-4b5b-8522-2c4ff121543d)
Author
Owner

@balub commented on GitHub (Nov 2, 2023):

@254579676 Can you remove all quotes in your env file and also remove all comments? something like this

# Auth Tokens Config
JWT_SECRET=secret1233
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY=3
REFRESH_TOKEN_VALIDITY=604800000
ACCESS_TOKEN_VALIDITY=86400000
SESSION_SECRET=add some secret here

# Hoppscotch App Domain Config
REDIRECT_URL=http://localhost:3170/graphql
WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100
VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL

# Google Auth Config
GOOGLE_CLIENT_ID=**********************************************
GOOGLE_CLIENT_SECRET=**********************************************
GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback
GOOGLE_SCOPE=email,profile

.......
<!-- gh-comment-id:1790734985 --> @balub commented on GitHub (Nov 2, 2023): @254579676 Can you remove all quotes in your env file and also remove all comments? something like this ``` # Auth Tokens Config JWT_SECRET=secret1233 TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY=3 REFRESH_TOKEN_VALIDITY=604800000 ACCESS_TOKEN_VALIDITY=86400000 SESSION_SECRET=add some secret here # Hoppscotch App Domain Config REDIRECT_URL=http://localhost:3170/graphql WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100 VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL # Google Auth Config GOOGLE_CLIENT_ID=********************************************** GOOGLE_CLIENT_SECRET=********************************************** GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback GOOGLE_SCOPE=email,profile ....... ```
Author
Owner

@254579676 commented on GitHub (Nov 3, 2023):

@balub my .env update ,views,Can you please double-check the content and format of the .env file in the open-source project, including the double quotes and comments mentioned?

#-----------------------Backend Config------------------------------#
# Prisma Config
DATABASE_URL=postgresql://test_hoppscotch:hoppscotch@localhost:5432/test_hoppscotch

# Auth Tokens Config
JWT_SECRET=secret1233
TOKEN_SALT_COMPLEXITY=10
MAGIC_LINK_TOKEN_VALIDITY= 3
REFRESH_TOKEN_VALIDITY=604800000
ACCESS_TOKEN_VALIDITY=86400000
SESSION_SECRET=add some secret here

# Hoppscotch App Domain Config
REDIRECT_URL=http://localhost:3000
WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100
VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL

# Google Auth Config
GOOGLE_CLIENT_ID=************************************************
GOOGLE_CLIENT_SECRET=************************************************
GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback
GOOGLE_SCOPE=email,profile

# Github Auth Config
GITHUB_CLIENT_ID=************************************************
GITHUB_CLIENT_SECRET=************************************************
GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback
GITHUB_SCOPE=user:email

# Microsoft Auth Config
MICROSOFT_CLIENT_ID=************************************************
MICROSOFT_CLIENT_SECRET=************************************************
MICROSOFT_CALLBACK_URL=http://localhost:3170/v1/auth/microsoft/callback
MICROSOFT_SCOPE=user.read
MICROSOFT_TENANT=common

# Mailer config
MAILER_SMTP_URL=smtps://ccc@icbuc.net:Fs9np3wfSWebeVqE@smtp.exmail.qq.com
MAILER_ADDRESS_FROM=postwoman<ccc@icbuc.net>

# Rate Limit Config
RATE_LIMIT_TTL=60
# In seconds
RATE_LIMIT_MAX=100
#-----------------------Frontend Config------------------------------#


# Base URLs
VITE_BASE_URL=http://localhost:3000
VITE_SHORTCODE_BASE_URL=http://localhost:3000
VITE_ADMIN_URL=http://localhost:3100

# Backend URLs
VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
VITE_BACKEND_WS_URL=ws://localhost:3170/graphql
VITE_BACKEND_API_URL=http://localhost:3170/v1

# Terms Of Service And Privacy Policy Links (Optional)
VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy


but dokcer isnot run up,logs like this

[root@vm100g test]# docker run -p 3000:3000 --env-file .env hoppscotch/hoppscotch-frontend
{"level":"info","ts":1698976923.970303,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"warn","ts":1698976923.9713116,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
{"level":"info","ts":1698976923.9757588,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1698976923.9761646,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000491e00"}
{"level":"info","ts":1698976923.9762704,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"info","ts":1698976923.9764433,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1698976923.9764512,"msg":"serving initial configuration"}
{"level":"info","ts":1698976923.976626,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
{"level":"info","ts":1698976923.9766738,"logger":"tls","msg":"finished cleaning storage units"}

<!-- gh-comment-id:1791813333 --> @254579676 commented on GitHub (Nov 3, 2023): @balub my .env update ,views,Can you please double-check the content and format of the .env file in the open-source project, including the double quotes and comments mentioned? ``` #-----------------------Backend Config------------------------------# # Prisma Config DATABASE_URL=postgresql://test_hoppscotch:hoppscotch@localhost:5432/test_hoppscotch # Auth Tokens Config JWT_SECRET=secret1233 TOKEN_SALT_COMPLEXITY=10 MAGIC_LINK_TOKEN_VALIDITY= 3 REFRESH_TOKEN_VALIDITY=604800000 ACCESS_TOKEN_VALIDITY=86400000 SESSION_SECRET=add some secret here # Hoppscotch App Domain Config REDIRECT_URL=http://localhost:3000 WHITELISTED_ORIGINS=http://localhost:3170,http://localhost:3000,http://localhost:3100 VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL # Google Auth Config GOOGLE_CLIENT_ID=************************************************ GOOGLE_CLIENT_SECRET=************************************************ GOOGLE_CALLBACK_URL=http://localhost:3170/v1/auth/google/callback GOOGLE_SCOPE=email,profile # Github Auth Config GITHUB_CLIENT_ID=************************************************ GITHUB_CLIENT_SECRET=************************************************ GITHUB_CALLBACK_URL=http://localhost:3170/v1/auth/github/callback GITHUB_SCOPE=user:email # Microsoft Auth Config MICROSOFT_CLIENT_ID=************************************************ MICROSOFT_CLIENT_SECRET=************************************************ MICROSOFT_CALLBACK_URL=http://localhost:3170/v1/auth/microsoft/callback MICROSOFT_SCOPE=user.read MICROSOFT_TENANT=common # Mailer config MAILER_SMTP_URL=smtps://ccc@icbuc.net:Fs9np3wfSWebeVqE@smtp.exmail.qq.com MAILER_ADDRESS_FROM=postwoman<ccc@icbuc.net> # Rate Limit Config RATE_LIMIT_TTL=60 # In seconds RATE_LIMIT_MAX=100 #-----------------------Frontend Config------------------------------# # Base URLs VITE_BASE_URL=http://localhost:3000 VITE_SHORTCODE_BASE_URL=http://localhost:3000 VITE_ADMIN_URL=http://localhost:3100 # Backend URLs VITE_BACKEND_GQL_URL=http://localhost:3170/graphql VITE_BACKEND_WS_URL=ws://localhost:3170/graphql VITE_BACKEND_API_URL=http://localhost:3170/v1 # Terms Of Service And Privacy Policy Links (Optional) VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy ``` ------------------------------------------------------------- but dokcer isnot run up,logs like this [root@vm100g test]# docker run -p 3000:3000 --env-file .env hoppscotch/hoppscotch-frontend {"level":"info","ts":1698976923.970303,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"} {"level":"warn","ts":1698976923.9713116,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2} {"level":"info","ts":1698976923.9757588,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]} {"level":"info","ts":1698976923.9761646,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000491e00"} {"level":"info","ts":1698976923.9762704,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]} {"level":"info","ts":1698976923.9764433,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"} {"level":"info","ts":1698976923.9764512,"msg":"serving initial configuration"} {"level":"info","ts":1698976923.976626,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"} {"level":"info","ts":1698976923.9766738,"logger":"tls","msg":"finished cleaning storage units"}
Author
Owner

@Ev3rdown commented on GitHub (Nov 7, 2023):

From your screenshot, you use an IP address instead of localhost.
Make sure you have your config set accordingly :
WHITELISTED_ORIGINS=http://10.101.50.88:3170,http://10.101.50.88:3000,http://10.101.50.88:3100

Also, as liyasthomas suggested, you would be better using a proper environnement with a DNS name and TLS cert to avoid some weird issues.

<!-- gh-comment-id:1799108053 --> @Ev3rdown commented on GitHub (Nov 7, 2023): From your screenshot, you use an IP address instead of localhost. Make sure you have your config set accordingly : WHITELISTED_ORIGINS=http://10.101.50.88:3170,http://10.101.50.88:3000,http://10.101.50.88:3100 Also, as liyasthomas suggested, you would be better using a proper environnement with a DNS name and TLS cert to avoid some weird issues.
Author
Owner

@icsy7867 commented on GitHub (Nov 7, 2023):

Pinging here as this got me too...

So if you use the three separate containers, their internal listening port is:
8080, no 3000 and 3100.

But the backend, 3170 is 3170. So you should have for the front end, admin and backend respectively:

-p 3000:8080
-p 3100:8080
-p 3170:3170

<!-- gh-comment-id:1799374649 --> @icsy7867 commented on GitHub (Nov 7, 2023): Pinging here as this got me too... So if you use the three separate containers, their internal listening port is: 8080, no 3000 and 3100. But the backend, 3170 is 3170. So you should have for the front end, admin and backend respectively: -p 3000:8080 -p 3100:8080 -p 3170:3170
Author
Owner

@RezaBabapour commented on GitHub (Nov 13, 2023):

Screenshot 2023-11-13 095652
Same issue here, Admin and frontend listen on wrong ports.

<!-- gh-comment-id:1807543847 --> @RezaBabapour commented on GitHub (Nov 13, 2023): ![Screenshot 2023-11-13 095652](https://github.com/hoppscotch/hoppscotch/assets/30316545/6016e374-2dda-448f-b02e-a2c9229e9fc3) Same issue here, Admin and frontend listen on wrong ports.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1172
No description provided.