Skip to content

Commit

Permalink
Update README and config file comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepyLeslie committed Jun 10, 2024
1 parent 6659e45 commit 9824b8d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 40 deletions.
62 changes: 24 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,56 +61,42 @@ yarn run electron

## Configure

There's no configuration needed if you are just running this as a regular app
to view and edit Grist spreadsheets on your laptop.
There's no configuration needed if you are just running Grist Desktop as a
regular app to view and edit Grist spreadsheets on your laptop.
However, some aspects of Grist Desktop can be tuned with a configuration file.
The config file should be named `config.ini`, and placed in:

Some people use the app as a quick way to set up a simple Grist server
in a local network where everyone is trusted. Be sure you know what you're
doing - if you have any security concerns at all, I'd urge you to do a
proper Grist server installation - see https://support.getgrist.com/self-managed/
* `%APPDATA%\grist-desktop` on Windows
* `~/Library/Application Support` on macOS
* `~/.local/share/grist-desktop/` on Linux and all other platforms

If you are sure you are in a trusted environment, you can set some environment
variables to make Grist listen on a specific network interface and port:
A sample config file can be found [here](https://github.com/gristlabs/grist-desktop/blob/main/config.sample.ini).

```
GRIST_HOST=192.168.1.22 # IP address to serve from
GRIST_PORT=8484 # Port number to serve at
GRIST_DESKTOP_AUTH=strict # Auth strategy (strict, mixed, or none)
```
You can also use environment variables to configure Grist Desktop.
Environment variables have higher precedence over the config file.
See the comments in the sample config file for more information.

For developers: You can create a `.env` file in the root directory of the app
and set the environment variables there. If you are a Grist Desktop end user,
consider using the config file instead.

(You can create a `.env` file in the root directory of the app and set
the environment variables there). Set `GRIST_DESKTOP_AUTH` to `none`
to allow access across the network just as if you were using the app.
Set `GRIST_DESKTOP_AUTH` to `mixed` to allow anonymous access
across the network, but not logins. Set `GRIST_DESKTOP_AUTH` to `strict`
to require logins and to permit them only in the app.
### Note on using Grist Desktop as a server

It you use Grist on the network this way, be aware that data is being
If you are sure you are in a trusted environment, you can use the app as a
quick way to set up a simple Grist server, but be aware that data is being
sent using plain http and not encrypted https, so network traffic could be
readable in transit. And there is no login mechanism built in.

An experimental sandboxing mechanism is turned on by default, so that
formulas in a spreadsheet are limited in their effect. Sandboxing can be
turned off by setting:

```
GRIST_SANDBOX_FLAVOR=unsandboxed
```

It can be explicitly set by doing:

```
GRIST_SANDBOX_FLAVOR=pyodide
```
If you have security concerns, we recommend switching to a proper Grist server
installation instead - see https://support.getgrist.com/self-managed/

There are also `gvisor` and `macSandboxExec` sandbox
flavors, but they are not yet easy to use.
### Note on turning sandboxing off

If you turn off sandboxing, then the full raw power of Python will be available
to any Grist spreadsheet you open. So:
Sandboxing limits the effects of formulas in spreadsheets. If you turn it off,
the full raw power of Python will be available to any Grist spreadsheet you open. So:

* Use only with your own Grist spreadsheets, or
* Use with spreadsheets you trust, or
* Use only with spreadsheets you trust, or
* Turn sandboxing the heck back on, or
* Return to the YOLO days of opening spreadsheets and crossing your fingers.

Expand Down
35 changes: 33 additions & 2 deletions config.sample.ini
Original file line number Diff line number Diff line change
@@ -1,34 +1,65 @@
; Grist Desktop configuration file
; Extraneous config items will be ignored.
; Environment variables override settings in this file.


; Login information is currently only effective when launching for the first time.
[login]

; Your username.
; Alternatively, set GRIST_DEFAULT_USERNAME
; username =

; Your email.
; Alternatively, set GRIST_DEFAULT_EMAIL
; email =


; You can use Grist Desktop as a simple Grist server, although is not recommended.
; See the README for more more info.
[server]

; IP address to serve Grist from.
; Alternatively, set GRIST_HOST
listen = localhost

; Port number to serve at.
; Alternatively, set GRIST_PORT
port = 47478

; Auth strategy. Possible values are: strict, mixed, none
; strict: require logins and to permit them only in the app.
; mixed: allow anonymous access across the network, but not logins.
; none: allow access across the network just as if you were using the app.
; Alternatively, set GRIST_DESKTOP_AUTH
; GRIST_ELECTRON_AUTH is deprecated, but still supported.
auth = strict


[sandbox]
; Possible flavors are: pyodide, gvisor, macSandboxExec, unsandboxed

; Possible flavors are: pyodide(recommended), gvisor, macSandboxExec, unsandboxed
; It is not recommended to set "unsandboxed", which turns sandboxing off. See README for more info.
; Alternatively, set GRIST_SANDBOX_FLAVOR
flavor = pyodide


[storage]

; Where .grist files will be stored. Defaults to your "Documents" folder.
; Alternatively, set GRIST_DATA_DIR
; documents =

; Grist instance files. Not really important for Grist Desktop. Defaults to %APPDATA%\grist-desktop on Windows, or ~/.local/share/grist-desktop.
; Grist instance files. Not really important for Grist Desktop.
; Defaults to %APPDATA%\grist-desktop on Windows, ~/Library/Application Support on macOS,
; or ~/.local/share/grist-desktop on Linux (and other non-officially-supported platforms).
; Alternatively, set GRIST_INST_DIR
; instance =

; Grist home sqlite3 database location. Should be kept safe. Defaults to "home.sqlite3" in the instance files folder.
; Alternatively, set TYPEORM_DATABASE
; homedb =

; Where Grist should search for plugins. Defaults to ".grist" under your home folder.
; Alternatively, set GRIST_USER_ROOT
; plugins =

0 comments on commit 9824b8d

Please sign in to comment.