You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add default docker image with BASE_PATH=/stats #4064
BASE_PATH is a build-time variable in Umami, meaning it must be baked into the Docker image at build time. The official pre-built image on ghcr.io does not include any BASE_PATH, making it impossible to deploy Umami under a subpath without maintaining a custom image.
Proposal
Adapt the CI/CD pipeline to automatically publish an additional Docker image variant built with BASE_PATH=/stats, alongside the default image.
For example, the following tags could be published on each release:
This is a common self-hosting use case — many users deploy multiple apps under subpaths on a single domain (e.g. /stats, /analytics) behind a reverse proxy. Without a pre-built image variant, they are forced to maintain their own custom image and rebuild it on every Umami release, which is not sustainable.
Alternative considered
Exposing BASE_PATH as a runtime environment variable would be the ideal long-term solution, but requires changes to the Next.js build pipeline. The CI/CD approach proposed here is a lower-effort improvement that would immediately benefit self-hosted users.
Its approved, but its currently hardcoded to /umami as the default, not /stats. Of course you can update the workflow file to choose any base path needed.
If you have a CI/CD pipeline, just build your own image. We should not build extra images. Having one for /stats, /umami, /analytics, /whatever is not sustainable.
If you have a CI/CD pipeline, just build your own image. We should not build extra images. Having one for /stats, /umami, /analytics, /whatever is not sustainable.
We don't have any CI/CD pipelines, so we need an official image.
In my usecase, the /umami would work great.
I just need to be able to deploy the app on the same hostname as my website, because I'm limited by my VPS provider.
In my usecase, the /umami would work great. I just need to be able to deploy the app on the same hostname as my website, because I'm limited by my VPS provider.
However, it seems like the owners are reluctant to build official images.
While waiting for a better solution, for those with the same issue, here's how to build a new docker image and push it to your Github project :
# Download official umami repo :
git clone https://github.com/umami-software/umami.git
cd umami
# Here replace with your variables :
USERNAME="<my github username>"
REPO="<my github project>"
SUB_BASE_PATH="<my base_path (ex: stats for /stats)>"
CR_PAT="<my github deploy token>"# see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens to generate token# Login to github with docker, in order to push the new imageecho$CR_PAT| docker login ghcr.io -u ${USERNAME} --password-stdin
# Build and push the image, making sure to have compatibility with different platforms :
docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_PATH=/${SUB_BASE_PATH} -t ghcr.io/${USERNAME}/${REPO}/umami:path-${SUB_BASE_PATH} --push .
While waiting for a better solution, for those with the same issue, here's how to build a new docker image and push it to your Github project :
Could you write a tutorial on how to use GitHub Actions to check out source code from the source repo, then compile and publish it to GHCR? I remember this is possible, but I don't know how to do it.
Activity
franciscao633 commentedon Mar 4, 2026
Theres a PR out for this. I'll review it today.
Matthiosso commentedon Mar 4, 2026
That's great ! Thank you so much 👍
Merge pull request #3991 from Yashh56/fix/base_path. Closes #4064
franciscao633 commentedon Mar 5, 2026
Its approved, but its currently hardcoded to
/umamias the default, not/stats. Of course you can update the workflow file to choose any base path needed.E021ntox commentedon Mar 5, 2026
I think it should set it to a non-'umami' string; otherwise, it'll be easily blocked by AdBlock rules.
mikecao commentedon Mar 5, 2026
If you have a CI/CD pipeline, just build your own image. We should not build extra images. Having one for /stats, /umami, /analytics, /whatever is not sustainable.
E021ntox commentedon Mar 5, 2026
We don't have any CI/CD pipelines, so we need an official image.
Matthiosso commentedon Mar 5, 2026
In my usecase, the
/umamiwould work great.I just need to be able to deploy the app on the same hostname as my website, because I'm limited by my VPS provider.
E021ntox commentedon Mar 5, 2026
However, it seems like the owners are reluctant to build official images.
Matthiosso commentedon Mar 8, 2026
While waiting for a better solution, for those with the same issue, here's how to build a new docker image and push it to your Github project :
E021ntox commentedon Mar 8, 2026
Could you write a tutorial on how to use GitHub Actions to check out source code from the source repo, then compile and publish it to GHCR? I remember this is possible, but I don't know how to do it.
Matthiosso commentedon Mar 8, 2026
Here is the answer according to claude.ai.
I'll have to wait to merge my
devbranch intomainin order to check if it actually works.