Unable to setup Odk Central over a reverse proxy

Hi community,

1. What is the issue? Please be detailed.

I have tried many ways but for some reason I am unable to run odk central behind a reverse proxy, i have tried to setup everything exactly as suggested in documents but it still only works when setting up as main server with letsencrypt, but whenever i try to set it up to run on reverse proxy i get 502 error.

2. What steps can we take to reproduce this issue?

All my other projects work fine on this reverse proxy so i know I am missing something in setting up odk central correctly. if anyone has tried it and can share some insight, it will be very helpful

3. What have you tried to fix the issue?

I have tried using only port 80 and i have tried modifying the default compose file and added custom docker network, but nothing seems to work

4. Upload any forms or screenshots you can share publicly below.

Hi @kshitijbhatt,

Welcome to ODK Forum, if you have a moment, feel free to introduce yourself here.

Can you please share more details about your configuration like which proxy server are you using, its configuration file, Central configuration file i.e. .env (without any credentials). Do you know which piece of the system is throwing 502 error, it could be the proxy server or Central's nginx or Central backend?

Here are the few useful commands:

# To see the nginx logs:
$ docker compose logs -f nginx

# To see Central backend service logs:
$ docker compose logs -f service

# Reload Central nginx service, if you see any errors then it means the something is wrong in nginx configuration:
$ docker compose exec -it nginx service nginx reload

Here is an excellent demo of how to run Central behind a reverse proxy, it may provide you some hints and directions to solve your problem: