Grist docker run on different url, nginx proxy

I want to run

authentik + grist behind an nginx reverse proxy.

Its an internal server, that does not have a hostname.
So what i would like todo is to host grist on:


and authentik at:


which environment variable controls the url path grist runs on?

what i tried:

how i currently start the docker:

docker run -p 8484:8484 -e GRIST_SESSION_SECRET=invent-a-secret-here  \
  -v ~/grist:/persist \
  --name grist \
  --env DEBUG=1 \
  --env APP_DOC_INTERNAL_URL="http://localhost:8484/" \
  --env APP_DOC_URL="" \
  --env APP_STATIC_URL="" \
  --env APP_HOME_URL="" \

the relevant parts of the nginx config:

location /grist{
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    # WebSocket support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;

The error i get:

Feb 24 16:07:24 grist bash[26957]: 2023-02-24 15:07:24.265 - debug: Redirecting anonymous user to:

It tries to redirect the user to a url without /grist/
So instead of:
i want it to redirect (and serve):

While writing this, i got the idea for an acceptable workaround, if the above is not possible.
I want grist to run behind nginx, because then i could cache certain items and also make a widget url.

But i do not really care where authentik runs, it could run on its default port :9000 or on another ip on the same server

Hi @enthus1ast, sorry, Grist can’t handle path prefixes yet. You’re not the first to ask though:

It wouldn’t be a particularly hard feature to add, but there’s often a work-around of some kind (like yours) so it hasn’t gotten priority.

Thank you paul, ill work around it then.