SELF_HYPERLINK kwargs: use "localhost" instead of 0.0.0.0?

Apologies in advance for the noob question, but search in Grist docs, community forum and Docker questions on StackOverflow didn’t yield an answer to a simple issue. I’m experimenting with Grist on self-hosted docker container (macOS). Specific problem leads to a general question.

I’m using the SELF_HYPERLINK formula to link to a record details page from a table view following this helpful advice. The resulting link, however, uses http://0.0.0.0:8484/… which results in a Grist Access Denied error. When I manually replace the “0.0.0.0” with “localhost” it works as expected (displays the correct details page).

So I’m wondering if SELF_HYPERLINK can take a keyword argument that changes the domain (from 0.0.0.0 to localhost in my case, but there might be other use cases)? Or is there a setting I can use to force “localhost” instead of “0.0.0.0”? Obviously, I have some redirect options I can use outside of Grist, just wanting to avoid those if possible.

Or is there just a docker command I’m missing, because I’m unfamiliar with docker?

Thanks!

Hi @m_wallin, thanks for bringing this up, I see that SELF_HYPERLINK isn’t working quite right in the default docker setup.

You can override its behavior by setting APP_HOME_URL to whatever base URL you want, which I think is http://localhost:8484 in your case. There are some notes on setting this environment variable here:

So for you that might be something like:

docker run -p 8484:8484 -e APP_HOME_URL=http://localhost:8484 -v /tmp/persist:/persist -it gristlabs/grist

(replacing /tmp/persist of course)

Perfect. Thanks @paul-grist. Issue resolved!