gristlabs / grist-core

Grist is the evolution of spreadsheets.
https://www.getgrist.com
Apache License 2.0
7.3k stars 323 forks source link

Access from outside localhost? #70

Open tmikaeld opened 3 years ago

tmikaeld commented 3 years ago

Since I'm on proxmox environment I couldn't get the docker variant working, but I got the manual build working fine.

However, how can I access it from outside of localhost? Is there a command to listen on all devices when starting the server?

paulfitz commented 3 years ago

To listen on all devices, you can do:

GRIST_HOST=0.0.0.0 yarn start

That isn't quite enough though. Currently you need to tell Grist what IP address or hostname it will be accessed from. For example, on my local network, my laptop is at IP address 192.168.1.155, and to make Grist accessible to my phone etc I can do:

DEBUG=1 \
GRIST_SINGLE_ORG=docs \
APP_DOC_URL=http://192.168.1.155:8484  \
APP_HOME_URL=http://192.168.1.155:8484  \
GRIST_HOST=0.0.0.0 yarn start

We plan to simplify configuration for self-hosting, all the wrinkles created by multiple servers and multiple team sites aren't really relevant there. Would be interested to here how it goes for you @tmikaeld

tmikaeld commented 3 years ago

Hello Paul!

Thanks for the quick reply, it's very appreciated.

I got it working just fine! However, I noticed that it's single-user at the moment, we'd need at least multiple users for it to be usable in our team. Any plans on adding that?

paulfitz commented 3 years ago

Glad that worked @tmikaeld. Yes, documenting how to support multiple users is on our roadmap https://github.com/gristlabs/grist-core/projects/1#card-64937259. In our hosted service, we use a separate auth provider. We have SAML support we could polish up and release, would that be helpful? Placing Grist behind vouch-proxy https://github.com/vouch/vouch-proxy could also work well. Is there a particular login provider that your team works with?

tmikaeld commented 3 years ago

We use Cloudflare Access @paulfitz, what auth provider do you use?

tmikaeld commented 3 years ago

I noticed that I can add users, but they cannot login, so I guess this is the auth layer missing.

paulfitz commented 3 years ago

We use Amazon Cognito. Hmm looking at the diagram on https://developers.cloudflare.com/cloudflare-one/applications/configure-apps/saas-apps it looks like SAML would do the job. I'll look at expediting getting that documented and released.

paulfitz commented 3 years ago

SAML support was released in 0.7.3. I tested it against Auth0 and it worked fine. https://github.com/gristlabs/grist-core/blob/c561dad22d6f51fc21f678a37d1f6aaa72724531/app/server/lib/SamlConfig.ts#L36

asitemade4u commented 3 years ago

Works fine with docker-compose from Portainer