Home

Awesome

Grist as standalone electron app

Python and sqlite are embedded. It just starts Grist server and loads provided url in Electron app. So far only for Windows.

Distribution: https://github.com/stan-donarise/grist-core-electron/releases/tag/0.0.0

For win7 you must have: SP1, Microsoft Visual C++ 2015 Redistributable, kb2533623 update

For build from source you should download Winpython https://sourceforge.net/projects/winpython/files/WinPython_3.9/3.9.5.0/, extract it, and put all content from "WPy32-3950/python-3.9.5" to "/winpython" (and for win7 support: put "api-ms-win-core-path-l1-1-0.dll" in "/winpython").

Grist

Grist is a modern relational spreadsheet. It combines the flexibility of a spreadsheet with the robustness of a database to organize your data and make you more productive.

https://user-images.githubusercontent.com/118367/151245587-892e50a6-41f5-4b74-9786-fe3566f6b1fb.mp4

Features

(By popular request: we have a specific write-up of Grist vs Airtable that may be helpful). Grist is a hybrid database/spreadsheet, meaning that:

Here are some specific feature highlights of Grist:

If you are curious about where Grist is going heading, see our roadmap, drop a question in our forum, or browse our extensive documentation.

Using Grist

There are docker images set up for individual use, or (with some configuration) for self-hosting. Grist Labs offers a hosted service at docs.getgrist.com.

To get Grist running on your computer with Docker, do:

docker pull gristlabs/grist
docker run -p 8484:8484 -it gristlabs/grist

Then visit http://localhost:8484 in your browser. You'll be able to create, edit, import, and export documents. To preserve your work across docker runs, share a directory as /persist:

docker run -p 8484:8484 -v $PWD/persist:/persist -it gristlabs/grist

Get templates at templates.getgrist.com for payroll, inventory management, invoicing, D&D encounter tracking, and a lot more, or use any document you've created on docs.getgrist.com.

If you need to change the port Grist runs on, set a PORT variable, don't just change the port mapping:

docker run --env PORT=9999 -p 9999:9999 -v $PWD/persist:/persist -it gristlabs/grist

To enable gVisor sandboxing, set --env GRIST_SANDBOX_FLAVOR=gvisor. This should work with default docker settings, but may not work in all environments.

Building from source

To build Grist from source, follow these steps:

yarn install
yarn run build:prod
yarn run install:python
yarn start
# Grist will be available at http://localhost:8484/

Grist formulas in documents will be run using Python executed directly on your machine. You can configure sandboxing using a GRIST_SANDBOX_FLAVOR environment variable.

These sandboxing methods have been written for our own use at Grist Labs and may need tweaking to work in your own environment - pull requests very welcome here!

Logins

Like git, Grist has features to track document revision history. So for full operation, Grist expects to know who the user modifying a document is. Until it does, it operates in a limited anonymous mode. To get you going, the docker image is configured so that when you click on the "sign in" button Grist will attribute your work to you@example.com. Change this by setting GRIST_DEFAULT_EMAIL:

docker run --env GRIST_DEFAULT_EMAIL=my@email -p 8484:8484 -v $PWD/persist:/persist -it gristlabs/grist

You can change your name in Profile Settings in the User Menu.

For multi-user operation, or if you wish to access Grist across the public internet, you'll want to connect it to your own single sign-in service. There's a docker-compose template at https://community.getgrist.com/t/a-template-for-self-hosting-grist-with-traefik-and-docker-compose/856 covering using Let's Encrypt for certificates and Google for sign-ins. You can also use SAML. Grist has been tested with Authentik and Auth0.

Why free and open source software

This repository, grist-core, is maintained by Grist Labs. Our flagship product available at getgrist.com is built from the code you see here, combined with business-specific software designed to scale it to many users, handle billing, etc.

Grist Labs is an open-core company. We offer Grist hosting as a service, with free and paid plans. We intend to also develop and sell features related to Grist using a proprietary license, targeted at the needs of enterprises with large self-managed installations. We see data portability and autonomy as a key value Grist can bring to our users, and grist-core as an essential means to deliver that. We are committed to maintaining and improving the grist-core codebase, and to be thoughtful about how proprietary offerings impact data portability and autonomy.

By opening its source code and offering an OSI-approved free license, Grist benefits its users:

Reviews

Environment variables

Grist can be configured in many ways. Here are the main environment variables it is sensitive to:

VariablePurpose
ALLOWED_WEBHOOK_DOMAINScomma-separated list of permitted domains to use in webhooks (e.g. webhook.site,zapier.com)
APP_DOC_URLdoc worker url, set when starting an individual doc worker (other servers will find doc worker urls via redis)
APP_HOME_URLurl prefix for home api (home and doc servers need this)
APP_STATIC_URLurl prefix for static resources
APP_STATIC_INCLUDE_CUSTOM_CSSset to "true" to include custom.css (from APP_STATIC_URL) in static pages
APP_UNTRUSTED_URLURL at which to serve/expect plugin content.
GRIST_ADAPT_DOMAINset to "true" to support multiple base domains (careful, host header should be trustworthy)
GRIST_APP_ROOTdirectory containing Grist sandbox and assets (specifically the sandbox and static subdirectories).
GRIST_BACKUP_DELAY_SECSwait this long after a doc change before making a backup
GRIST_DATA_DIRdirectory in which to store document caches.
GRIST_DEFAULT_EMAILif set, login as this user if no other credentials presented
GRIST_DEFAULT_PRODUCTif set, this controls enabled features and limits of new sites. See names of PRODUCTS in Product.ts.
GRIST_DOMAINin hosted Grist, Grist is served from subdomains of this domain. Defaults to "getgrist.com".
GRIST_EXPERIMENTAL_PLUGINSenables experimental plugins
GRIST_HIDE_UI_ELEMENTScomma-separated list of parts of the UI to hide. Allowed names of parts: helpCenter,billing,templates,multiSite,multiAccounts
GRIST_HOME_INCLUDE_STATICif set, home server also serves static resources
GRIST_HOSThostname to use when listening on a port.
GRIST_ID_PREFIXfor subdomains of form o-, expect or produce o-${GRIST_ID_PREFIX}.
GRIST_IGNORE_SESSIONif set, Grist will not use a session for authentication.
GRIST_INST_DIRpath to Grist instance configuration files, for Grist server.
GRIST_MANAGED_WORKERSif set, Grist can assume that if a url targeted at a doc worker returns a 404, that worker is gone
GRIST_MAX_UPLOAD_ATTACHMENT_MBmax allowed size for attachments (0 or empty for unlimited).
GRIST_MAX_UPLOAD_IMPORT_MBmax allowed size for imports (except .grist files) (0 or empty for unlimited).
GRIST_ORG_IN_PATHif true, encode org in path rather than domain
GRIST_PAGE_TITLE_SUFFIXa string to append to the end of the <title> in HTML documents. Defaults to " - Grist". Set to _blank for no suffix at all.
GRIST_PROXY_AUTH_HEADERheader which will be set by a (reverse) proxy webserver with an authorized users' email. This can be used as an alternative to a SAML service. See also GRIST_FORWARD_AUTH_HEADER.
GRIST_ROUTER_URLoptional url for an api that allows servers to be (un)registered with a load balancer
GRIST_SERVE_SAME_ORIGINset to "true" to access home server and doc workers on the same protocol-host-port as the top-level page, same as for custom domains (careful, host header should be trustworthy)
GRIST_SESSION_COOKIEif set, overrides the name of Grist's cookie
GRIST_SESSION_DOMAINif set, associates the cookie with the given domain - otherwise defaults to GRIST_DOMAIN
GRIST_SESSION_SECRETa key used to encode sessions
GRIST_FORCE_LOGINwhen set to 'true' disables anonymous access
GRIST_SINGLE_ORGset to an org "domain" to pin client to that org
GRIST_SUPPORT_ANONif set to 'true', show UI for anonymous access (not shown by default)
GRIST_THROTTLE_CPUif set, CPU throttling is enabled
GRIST_USER_ROOTan extra path to look for plugins in.
COOKIE_MAX_AGEsession cookie max age, defaults to 90 days; can be set to "none" to make it a session cookie
HOME_PORTport number to listen on for REST API server; if set to "share", add API endpoints to regular grist port.
PORTport number to listen on for Grist server
REDIS_URLoptional redis server for browser sessions and db query caching

Sandbox related variables:

VariablePurpose
GRIST_SANDBOX_FLAVORcan be pynbox, unsandboxed, docker, or macSandboxExec. If set, forces Grist to use the specified kind of sandbox.
GRIST_SANDBOXa program or image name to run as the sandbox. See NSandbox.ts for nerdy details.
PYTHON_VERSIONcan be 2 or 3. If set, documents without an engine setting are assumed to use the specified version of python. Not all sandboxes support all versions.
PYTHON_VERSION_ON_CREATIONcan be 2 or 3. If set, newly created documents have an engine setting set to python2 or python3. Not all sandboxes support all versions.

Forward authentication variables:

VariablePurpose
GRIST_FORWARD_AUTH_HEADERif set, trust the specified header (e.g. "x-forwarded-user") to contain authorized user emails, and enable "forward auth" logins.
GRIST_FORWARD_AUTH_LOGIN_PATHif GRIST_FORWARD_AUTH_HEADER is set, Grist will listen at this path for logins. Defaults to /auth/login.
GRIST_FORWARD_AUTH_LOGOUT_PATHif GRIST_FORWARD_AUTH_HEADER is set, Grist will forward to this path when user logs out.

When using forward authentication, you may wish to also set the following variables:

GRIST_FORWARD_AUTH_HEADER is similar to GRIST_PROXY_AUTH_HEADER, but enables a login system (assuming you have some forward authentication set up).

Google Drive integrations:

VariablePurpose
GOOGLE_CLIENT_IDset to the Google Client Id to be used with Google API client
GOOGLE_CLIENT_SECRETset to the Google Client Secret to be used with Google API client
GOOGLE_API_KEYset to the Google API Key to be used with Google API client (accessing public files)
GOOGLE_DRIVE_SCOPEset to the scope requested for Google Drive integration (defaults to drive.file)

Database variables:

VariablePurpose
TYPEORM_DATABASEdatabase filename for sqlite or database name for other db types
TYPEORM_HOSThost for db
TYPEORM_LOGGINGset to 'true' to see all sql queries
TYPEORM_PASSWORDpassword to use
TYPEORM_PORTport number for db if not the default for that db type
TYPEORM_TYPEset to 'sqlite' or 'postgres'
TYPEORM_USERNAMEusername to connect as

Testing:

VariablePurpose
GRIST_TESTING_SOCKETa socket used for out-of-channel communication during tests only.
GRIST_TEST_HTTPS_OFFSETif set, adds https ports at the specified offset. This is useful in testing.
GRIST_TEST_SSL_CERTif set, contains filename of SSL certificate.
GRIST_TEST_SSL_KEYif set, contains filename of SSL private key.
GRIST_TEST_LOGINallow fake unauthenticated test logins (suitable for dev environment only).
GRIST_TEST_ROUTERif set, then the home server will serve a mock version of router api at /test/router

License

This repository, grist-core, is released under the Apache License, Version 2.0, which is an OSI-approved free software license. See LICENSE.txt and NOTICE.txt for more information. If you have received a version of Grist with an ext directory, the material within it is separately licensed.