[GH-ISSUE #3414] [bug]: Can not start docker Install and build #1146

Closed
opened 2026-03-16 18:50:58 +03:00 by kerem · 6 comments
Owner

Originally created by @MinhFrostNhat on GitHub (Oct 4, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3414

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I have new docker image and I try to run following the document and I found this Backend Server | Backend Server | PrismaClientInitializationError: Can't reach database server athoppscotch-db:5432Backend Server | Backend Server | Please make sure your database server is running athoppscotch-db:5432. `
https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build the default Postgres still use in new docker image? Please help me thank you!

Steps to reproduce

https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build
https://hub.docker.com/r/hoppscotch/hoppscotch

Environment

Deploy preview

Version

Self-hosted

Originally created by @MinhFrostNhat on GitHub (Oct 4, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3414 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior I have new docker image and I try to run following the document and I found this ` Backend Server | Backend Server | PrismaClientInitializationError: Can't reach database server at `hoppscotch-db`:`5432` Backend Server | Backend Server | Please make sure your database server is running at `hoppscotch-db`:`5432`. ` ` https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build the default Postgres still use in new docker image? Please help me thank you! ### Steps to reproduce https://docs.hoppscotch.io/documentation/self-host/community-edition/install-and-build https://hub.docker.com/r/hoppscotch/hoppscotch ### Environment Deploy preview ### Version Self-hosted
kerem 2026-03-16 18:50:58 +03:00
Author
Owner

@annleefores commented on GitHub (Oct 5, 2023):

If you are running the containers on their own, without docker compose, you will need to have an external postgres db as described here

I believe this line in the documentation is intended for docker compose rather than docker container.

you can also use our default database shipped within the docker container postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch

<!-- gh-comment-id:1748677187 --> @annleefores commented on GitHub (Oct 5, 2023): If you are running the containers on their own, without docker compose, you will need to have an external postgres db as described [here](https://docs.hoppscotch.io/documentation/self-host/community-edition/prerequisites#postgres-database) I believe this line in the documentation is intended for docker compose rather than docker container. > you can also use our default database shipped within the docker container postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
Author
Owner

@juanitolaguna commented on GitHub (Oct 12, 2023):

@annleefores But what are the correct db credentials for the AIO version then?

<!-- gh-comment-id:1760459695 --> @juanitolaguna commented on GitHub (Oct 12, 2023): @annleefores But what are the correct db credentials for the AIO version then?
Author
Owner

@annleefores commented on GitHub (Oct 13, 2023):

@juanitolaguna as far as I know, you need to set up your own PostgreSQL database and use its credentials. There might be some confusion regarding this in the documentation. I have raised an issue to get a clear idea https://github.com/hoppscotch/docs/issues/149#issue-1941481535

<!-- gh-comment-id:1761122695 --> @annleefores commented on GitHub (Oct 13, 2023): @juanitolaguna as far as I know, you need to set up your own PostgreSQL database and use its credentials. There might be some confusion regarding this in the documentation. I have raised an issue to get a clear idea https://github.com/hoppscotch/docs/issues/149#issue-1941481535
Author
Owner

@juanitolaguna commented on GitHub (Oct 13, 2023):

@annleefores Yes I thought the db is within the container. Then I realised that i have to add the db container.

So this approach has worked for me.

  hoppscotch:
    image: hoppscotch/hoppscotch 
    env_file:
      - .env
    depends_on:
      hoppscotch-db:
        condition: service_healthy
    ports:
      - "3000:3000"
      - "3100:3100"
      - "3170:3170"

  hoppscotch-db:
    image: postgres:15
    ports:
      - "5432:5432"
    user: postgres
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: testpass
      POSTGRES_DB: hoppscotch
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
        ]
      interval: 5s
      timeout: 5s
      retries: 10
<!-- gh-comment-id:1761234134 --> @juanitolaguna commented on GitHub (Oct 13, 2023): @annleefores Yes I thought the db is within the container. Then I realised that i have to add the db container. So this approach has worked for me. ```yml hoppscotch: image: hoppscotch/hoppscotch env_file: - .env depends_on: hoppscotch-db: condition: service_healthy ports: - "3000:3000" - "3100:3100" - "3170:3170" hoppscotch-db: image: postgres:15 ports: - "5432:5432" user: postgres environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: testpass POSTGRES_DB: hoppscotch healthcheck: test: [ "CMD-SHELL", "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'" ] interval: 5s timeout: 5s retries: 10 ```
Author
Owner

@mirarifhasan commented on GitHub (May 1, 2024):

@MinhFrostNhat Are you still facing any complications?

<!-- gh-comment-id:2088179989 --> @mirarifhasan commented on GitHub (May 1, 2024): @MinhFrostNhat Are you still facing any complications?
Author
Owner

@mirarifhasan commented on GitHub (May 7, 2024):

As there haven't been any updates in the past week, I'm assuming this issue is no longer relevant. I'm closing it now. If the issue becomes relevant again, feel free to reopen it.

<!-- gh-comment-id:2097412751 --> @mirarifhasan commented on GitHub (May 7, 2024): As there haven't been any updates in the past week, I'm assuming this issue is no longer relevant. I'm closing it now. If the issue becomes relevant again, feel free to reopen it.
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#1146
No description provided.