Hey folks.
I'd like to give feedback on the onboarding experience for a self-managed instance. Specifically, I think the documentation needs significant improvement for anyone to have a reasonable chance at onboarding.
I just got to a point where logging in doesn't give any error messages. I have not interacted with any of grist yet, nor set up sandboxing. I have instead set up requiring login and disabling anon flows to have a public instance.
It took me 4 hours to get to this point, judging by stat.
As of right now, the guide results in generating the following environment variables:
- APP_HOME_URL=https://grist.<DOMAIN>
- GRIST_SESSION_SECRET=<SECRET>
- GRIST_SINGLE_ORG=<any-org-name>
# a bunch of SAML auth, which works for now
As well as to mount the /persist directory in the docker container and to forward some ports.
This results in a non-functioning instance if you have a reverse proxy that does not set the Host header to the correct domain. Specifically, this results in #228, where the frontend seems to ignore APP_HOME_URL.
Feedback: It's not sufficient to just say
You will need to place a “reverse proxy” in front of Grist to handle “ssl termination” (decrypting encypted traffic) using a certificate that establishes ownership of the site. If you don’t know what this means, you could try using the Grist Omnibus which packages Grist with a reverse proxy that will use Let’s Encrypt to get a certificate for you automatically.
on the initialization guide when your business logic extracts and utilizes specific headers that a reverse proxy (e.g. nginx) is not guaranteed to provide, especially when it's heavily implied that just setting APP_HOME_URL is all you need to do.
(And if you're wondering which header is omitted, see #228; I've commented there with more details.)
I assume there's also some websocket configuration I was able to avoid because I just copied my nginx config from another virtual server's location block that uses websockets.
This led me to trying out a bunch of environment variables, reading source code, and trying to figure out why APP_HOME_URL wasn't being respected. Turns out, ignoring APP_HOME_URL is intentional as there's a function that overwrites it if GRIST_SERVE_SAME_ORIGIN is set, which is set to true for the Dockerfile.
Feedback: Log more. DEBUG=1 gives near-zero meaningful information when we're trying to debug how things are constructed. I often felt it was probably easier for me to just pull source and run it locally with locally added log statements.
Feedback: Log a LOT more. I really would have loved a trace level to figure out where the client-side urls were being overwritten.
Feedback: Tell us what env variables are set during initialization. This lets the user verify that the env vars have been properly set.
But once this was fixed, I still ran into problems -- going to https://grist.<DOMAIN> and logging in lead me to an auth error where "I don't have access to this organization's documents" and I'll need to contact an administrator:

Feedback: What organization? What administrator? I am the administrator!? Where am I suppose to set up a organization? Is there an administrator account?
Click on the Grist icon then leads you to a blank page. No, really:

The server side reveals no error message, so it must have served everything fine. It's only in the console logs that reveals the actual issue:
Error: Cannot figure out what organization the URL is for.
Feedback: There needs to be some error handling here. There's no way for a user to figure out what the issue is here, especially if they were just given a bad link.
Figuring why this was broken required me to look at #212. It looks like the default organization is actually docs, and not some random org I could set. It also looks like I needed to set GIRST_ORG_IN_PATH to have the client figure out what I could set:
- GRIST_SINGLE_ORG=docs
- GRIST_ORG_IN_PATH=true
I'm pretty sure this is unintentional but this was the first thing that worked for me.
Feedback: More docs on figuring out how to set a single org instance up is incredibly helpful.
Unsetting GRIST_SINGLE_ORG and just keeping GIRST_ORG_IN_PATH enabled the "Create a new Team site" button, but just redirected me to the pricing page instead. I'm not sure if this is intentional or not, since I feel like grist-core should support team pages.
Finally, once that got working, I nuked the instance and set these variables, as this is a publicly accessible instance and I want it to be gated on my SAML provider:
- GRIST_FORCE_LOGIN=true
- GRIST_ANON_PLAYGROUND=false
I started things up again and I'm finally able to get to a starter page. I take one last look at the logs and I see that my user account is Id 5:
ie.sh/
grist_1 | 2023-11-09 08:27:09.083 grist.<DOMAIN> POST /saml/assert 302 27.195 ms - 90
grist_1 | 2023-11-09 08:27:09.184 - debug: Auth[GET]: grist.<DOMAIN> / customHostSession=, method=GET, host=grist.<DOMAIN>, path=/, org=docs, email=<USER>@<DOMAIN>, userId=5, altSessionId=<SNIP>
Wait, shouldn't I be 1? Looking at the logs, I see this line:
grist_1 | 2023-11-09 08:27:05.051 - debug: Auth[GET]: grist.<DOMAIN> / customHostSession=, method=GET, host=grist.<DOMAIN> path=/, org=docs, email=anon@getgrist.com, userId=1, altSessionId=<SNIP>
Why is the first user anon@getgrist.com, even when I explicitly disabled anon login? Does that mean there's still an anon account that could still perform actions? Who are userIds 2-4?
There's not much constructive feedback regarding this, though I really do wish that there was a way to guarantee that the anon user doesn't exist.
At this point in time, I'm still trying to figure out a couple of things:
- The extracted name is just the local-part of my email, so I need to figure out why my Authentik isn't providing the name_id correctly.
- I have no idea how to administer and create a team space -- I only have access to the personal space (prefixed with
@)
But hopefully this is valuable feedback!
Hey folks.
I'd like to give feedback on the onboarding experience for a self-managed instance. Specifically, I think the documentation needs significant improvement for anyone to have a reasonable chance at onboarding.
I just got to a point where logging in doesn't give any error messages. I have not interacted with any of grist yet, nor set up sandboxing. I have instead set up requiring login and disabling anon flows to have a public instance.
It took me 4 hours to get to this point, judging by
stat.As of right now, the guide results in generating the following environment variables:
As well as to mount the
/persistdirectory in the docker container and to forward some ports.This results in a non-functioning instance if you have a reverse proxy that does not set the
Hostheader to the correct domain. Specifically, this results in #228, where the frontend seems to ignoreAPP_HOME_URL.Feedback: It's not sufficient to just say
on the initialization guide when your business logic extracts and utilizes specific headers that a reverse proxy (e.g. nginx) is not guaranteed to provide, especially when it's heavily implied that just setting
APP_HOME_URLis all you need to do.(And if you're wondering which header is omitted, see #228; I've commented there with more details.)
I assume there's also some websocket configuration I was able to avoid because I just copied my nginx config from another virtual server's location block that uses websockets.
This led me to trying out a bunch of environment variables, reading source code, and trying to figure out why
APP_HOME_URLwasn't being respected. Turns out, ignoringAPP_HOME_URLis intentional as there's a function that overwrites it ifGRIST_SERVE_SAME_ORIGINis set, which is set to true for the Dockerfile.Feedback: Log more.
DEBUG=1gives near-zero meaningful information when we're trying to debug how things are constructed. I often felt it was probably easier for me to just pull source and run it locally with locally added log statements.Feedback: Log a LOT more. I really would have loved a trace level to figure out where the client-side urls were being overwritten.
Feedback: Tell us what env variables are set during initialization. This lets the user verify that the env vars have been properly set.
But once this was fixed, I still ran into problems -- going to
https://grist.<DOMAIN>and logging in lead me to an auth error where "I don't have access to this organization's documents" and I'll need to contact an administrator:Feedback: What organization? What administrator? I am the administrator!? Where am I suppose to set up a organization? Is there an administrator account?
Click on the Grist icon then leads you to a blank page. No, really:
The server side reveals no error message, so it must have served everything fine. It's only in the console logs that reveals the actual issue:
Feedback: There needs to be some error handling here. There's no way for a user to figure out what the issue is here, especially if they were just given a bad link.
Figuring why this was broken required me to look at #212. It looks like the default organization is actually
docs, and not some random org I could set. It also looks like I needed to setGIRST_ORG_IN_PATHto have the client figure out what I could set:I'm pretty sure this is unintentional but this was the first thing that worked for me.
Feedback: More docs on figuring out how to set a single org instance up is incredibly helpful.
Unsetting
GRIST_SINGLE_ORGand just keepingGIRST_ORG_IN_PATHenabled the "Create a new Team site" button, but just redirected me to the pricing page instead. I'm not sure if this is intentional or not, since I feel like grist-core should support team pages.Finally, once that got working, I nuked the instance and set these variables, as this is a publicly accessible instance and I want it to be gated on my SAML provider:
I started things up again and I'm finally able to get to a starter page. I take one last look at the logs and I see that my user account is Id 5:
Wait, shouldn't I be 1? Looking at the logs, I see this line:
Why is the first user
anon@getgrist.com, even when I explicitly disabled anon login? Does that mean there's still an anon account that could still perform actions? Who areuserIds 2-4?There's not much constructive feedback regarding this, though I really do wish that there was a way to guarantee that the anon user doesn't exist.
At this point in time, I'm still trying to figure out a couple of things:
@)But hopefully this is valuable feedback!