[BUG] 502 Bad Gateway #512

Closed
opened 2026-02-04 20:59:56 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @bijsven on GitHub (Dec 24, 2022).

Describe the bug
When i do for the first time the setup of Immich it gives a nginx error bad gateway - 502

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://server:2283
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
afbeelding

System

  • Phone OS [iOS, Android]: nvt
  • Server Version: latest
  • Mobile App Version: nvt

.env file
https://paste.helpch.at/izedododub.makefile

docker compose
https://paste.helpch.at/iqeluwuvus.yaml

Server OS
Distro: Ubuntu Server
Version: 22.04 LTS

Installation Guide
[x] I have read the installation guide.

Originally created by @bijsven on GitHub (Dec 24, 2022). **Describe the bug** When i do for the first time the setup of Immich it gives a nginx error bad gateway - 502 **To Reproduce** Steps to reproduce the behavior: 1. Go to http://server:2283 2. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** ![afbeelding](https://user-images.githubusercontent.com/96389299/209434444-adbdef72-cc7b-404d-82f1-4c4852bb1c86.png) **System** - Phone OS [iOS, Android]: `nvt` - Server Version: `latest` - Mobile App Version: `nvt` **.env file** https://paste.helpch.at/izedododub.makefile **docker compose** https://paste.helpch.at/iqeluwuvus.yaml **Server OS** Distro: Ubuntu Server Version: 22.04 LTS **Installation Guide** [x] I have read the installation guide.
Author
Owner

@bo0tzz commented on GitHub (Dec 24, 2022):

I see you set these env vars

IMMICH_WEB_URL=http://server:4000
IMMICH_SERVER_URL=http://server:4001
IMMICH_MACHINE_LEARNING_URL=http://server:4003

They're meant to use only if you have a specific need for them. I see no indication in your docker-compose.yml that you have the services running on those ports, so please remove these env vars. If that doesn't fix the issue, please post your full server logs (docker-compose logs)

@bo0tzz commented on GitHub (Dec 24, 2022): I see you set these env vars ``` IMMICH_WEB_URL=http://server:4000 IMMICH_SERVER_URL=http://server:4001 IMMICH_MACHINE_LEARNING_URL=http://server:4003 ``` They're meant to use only if you have a specific need for them. I see no indication in your `docker-compose.yml` that you have the services running on those ports, so please remove these env vars. If that doesn't fix the issue, please post your full server logs (`docker-compose logs`)
Author
Owner

@bijsven commented on GitHub (Dec 24, 2022):

Where can i find the server logs?

@bijsven commented on GitHub (Dec 24, 2022): > Where can i find the server logs?
Author
Owner

@alextran1502 commented on GitHub (Dec 24, 2022):

@CodebySven Can you remove the three lines that @bo0tzz mentioned and restart the stack? Then let us know if it helps.

You can see the log follow this guide

https://immich.app/docs/guides/docker-help

@alextran1502 commented on GitHub (Dec 24, 2022): @CodebySven Can you remove the three lines that @bo0tzz mentioned and restart the stack? Then let us know if it helps. You can see the log follow this guide https://immich.app/docs/guides/docker-help
Author
Owner

@alextran1502 commented on GitHub (Dec 24, 2022):

the issue is resolved on Discord

@alextran1502 commented on GitHub (Dec 24, 2022): the issue is resolved on Discord
Author
Owner

@linuxtuga commented on GitHub (Nov 8, 2023):

This also shows up when you forget to boot up redis and postgres docker images before immich.

@linuxtuga commented on GitHub (Nov 8, 2023): This also shows up when you forget to boot up redis and postgres docker images before immich.
Author
Owner

@vorboyvo commented on GitHub (Apr 6, 2025):

For if anyone has the same issue: I just upgraded from an older version and had the issue. While updating, I didn't change the docker-compose.yml, thinking it would stay the same. I fixed it by downloading docker-compose.yml from the release tag and running docker compose down and docker compose up -d again

@vorboyvo commented on GitHub (Apr 6, 2025): For if anyone has the same issue: I just upgraded from an older version and had the issue. While updating, I didn't change the docker-compose.yml, thinking it would stay the same. I fixed it by downloading docker-compose.yml from the release tag and running `docker compose down` and `docker compose up -d` again
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#512