I’m running a local DHIS2 instance (Sierra Leone demo, Docker Compose) with Chap Core set up as a separate container, connected via a Route pointing to http://host.docker.internal:8000/\*\*, but I’m unable to access the CHAP modeling functionality through the Prediction/Modeling App. Has anyone encountered this specific connection failure, and what’s the recommended way to verify the route and Chap Core service are actually linked correctly?
Welcome to the DHIS2 Community of Practice! Thanks for your post and it’s great to see that you are testing this setup locally.
May I ask more about your setup, what OS is this? For example, is this an Ubuntu instance running on Windows/WSL2 or is this a linux OS? What is the version of the DHIS2 instance did you spin up?
Did you follow this guide: Local DHIS2 Installation - DHIS2 Modeling ?
Thanks!
My setup is on Windows/WSL2, being the Sierra Leone instance installed via Docker. Yes, i used the installation guide, but i still cant access CHAP app settings to add the URL as per guide
I’m sorry you’re facing this issue. I want to recommend that you use the docker_deployment instead please see: GitHub - dhis2/docker-deployment: Docker production deployment of the DHIS2 application · GitHub
After you install a local instance using the docker deployment, you will need to check the ip address assigned in your WSL2 by checking ip addr show and then edit your Windows hosts file to redirect the ip to the url: https://dhis2-127-0-0-1.nip.io/
You will be able to find out the exact ip address in your WSL2 by using the command: nslookup dhis2-127-0-0-1.nip.io
I will try to test the entire thing along with the CHAP as per Local DHIS2 Installation - DHIS2 Modeling but using the docker deployment and let you know if I have any additional notes. If you get it working before I do, please share the update and let us know.
Thanks a lot! ![]()
I have replicated the steps with success, BUT i am now still unable to change route, in the general tab as it says “you need super user rights”
Hi
That’s great news! I did try to replicate everything too but then I had to restart the instance after learning that I needed to add the CHAP url to the route.remote_servers_allowed in the dhis.conf (which for some reason broke my testing container and it meant I had to do it all over again).
So I recommend stopping the whole thing, make the changes then restart. You will need to add the CHAP url to the dhis.conf and I think you might also need to add permissions to the user. Please see the entire explanation here: Route - DHIS2 Documentation
BTW, which database are you using? I wanted to test using the Climate demo database which can be downloaded from here: https://databases.dhis2.org/
Thanks for the update.. please let me know how it goes. ![]()
![]()
Hi
I am using the Sierra Leone Play database online.
The Modeling app settings says it needs super user rights to be able to use it. So thats where i am stuck
You’ll need to deploy this locally, the admin/district account on play doesn’t have ALL authority so that users don’t break the entire instance.
If you do this make sure not to add a trailing slash because that was what caused my app to crash. so instead of route.remote_servers_allowed = http://192.168.0.29:8000/ use route.remote_servers_allowed = http://192.168.0.29:8000. The forward slash at the end would break it.
Point me to any literature on how to quickly do the local host installation that has tables and data
Okay, please start by setting up a local instance using
Actually, we are working on a new docker set up that will automatically set up both DHIS2 and Chap locally, and connect them. It’s not a finished product yet, but you could try it out:
The readme is pretty full of information, but a simple step-by-step would be:
- Clone the repo, then go to a terminal and
cdinto the repo - In the terminal, execute command
make start-chap(this will set up both DHIS2 and Chap) - In a browser, go to http://localhost:8080 (local DHIS2 instance) and log in with admin/district
- Go to the App Management app, and install the Modeling app.
- Open the Modeling app, and it should already be configured and ready to set up evaluations and predictions.
By default this setup uses our publicly available Laos database, which has Dengue data.
Oh! Thanks for sharing! I wish I had asked you about this one first because it’s been a bit of a challenge to have to first use the docker-deployment repo then restore the loas db from the downloads page and having to try to set the entire configuration.
I will check out this new dhis2-chap/docker-dhis2-core repo. Thank you!
Great thank you for the detailed information i will try it out
Wanted to share this in case it saves someone else time - got the full docker-dhis2-core stack (DHIS2 + bundled chap-core + EWARS) running on Windows with the Laos Dengue demo, but hit four separate issues along the way. All resolved, posting the fixes here. IF you check my initial threads, you will note that i had installed the Sierra Leone instance prior to this (so these glitches MAY not befall you when you only have this new LAOS instance as your only instance in docker)
1. curl -u admin:district ... fails in PowerShell with an “ambiguous parameter” error
This isn’t a real issue with the request - PowerShell aliases curl to its own Invoke-WebRequest, which doesn’t support the -u shorthand. Fix: call curl.exe explicitly instead of curl, which bypasses the alias and uses the real curl binary Windows ships with.
2. dhis2-db-dump fails with /opt/prepare-dump.sh: set: line 30: illegal option -
This is a shell-compatibility bug in the vendor’s own script - it appears to use a bash-only option that Alpine’s lightweight ash shell doesn’t recognize. Fix that worked: copy the script out of the container (docker cp ...), strip any non-standard characters and normalize line endings, then remount the cleaned file over the original via a docker-compose.override.yml, without needing to rebuild the image.
3. An override file that should apply silently does nothing
Since this repo’s services live in compose.chapkit.yml rather than a plain docker-compose.yml, Docker Compose’s automatic merging of docker-compose.override.yml only happens if no -f flag is used at all. Once you explicitly name a compose file with -f, you must include -f docker-compose.override.yml on every single command from then on, or your override is silently ignored with no warning.
4. The web service is dhis2-web, not web
If you’re referencing older DHIS2 Docker setup docs (the original dhis2-core repo names this service web), note that docker-dhis2-core names it dhis2-web. Targeting the wrong name in an override creates a harmless-looking, entirely orphaned service block - Compose doesn’t warn you that nothing references it. Always confirm with:
docker compose -f compose.chapkit.yml config | Select-String "^ dhis2-web:"
Thanks to @Jennifer and the team for the fast, active support on this - genuinely appreciated given how new this repo is.
Thank you @Lincoln_Chivhinge for sharing these tips..
So you ran this on PowerShell? I’d have gone for Ubuntu Docker WSL2 Integration, but if I understand correctly, you’re running it directly on Windows, right?
You are right. The Laos database is the better option as a Climate demo database.
Yes i ran this on windows
So if I understand correctly, you skipped the entire WSL2 and used Powershell. It’s quite interesting that you got it to work, and I think that those tips you mentioned above apply to those who are not going to use WSL2.