EtherCalc

EtherCalc is a web spreadsheet based on node-js and redis. People can edit the same document at the same time. Everybody’s changes are instantly reflected on all screens. Work together on inventories, survey forms, list management, brainstorming sessions and more!


Note

For this guide you should be familiar with the basic concepts of

License

EtherCalc is distributed under different licenses, including Common Public Attribution License (Socialtext Inc.), Apache License 2.0 (SheetJS) and MIT License.

Prerequisites

We’re using Node.js in the stable version 12:

[isabell@stardust ~]$ uberspace tools version show node
Using 'Node.js' version: '12'
[isabell@stardust ~]$

Your URL needs to be setup:

[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$

We’ll also need Redis, so follow the Redis guide and come back when it’s running.

Installation

Install node module

Create a directory, cd into it and install the node module using the provided node packet manager npm:

[isabell@stardust ~]$ mkdir ethercalc
[isabell@stardust ~]$ cd ethercalc
[isabell@stardust ethercalc]$ npm install ethercalc
[isabell@stardust ethercalc]$

Warning

Make sure that you installed and configured Redis as described in the guide before, otherwise EtherCalc will crash immediately.

Fixing Path Issue

Note

At the time of creating this guide there is an issue of EtherCalc trying to access the Nodemule Socialcalc in an outdated directory. You can skip this step, but if you ran into issues, set the following symlink to fix it:

[isabell@stardust ~]$ ln -s ~/ethercalc/node_modules/ ~/ethercalc/node_modules/ethercalc/node_modules
[isabell@stardust ~]$

Configuration

Setup web backend

Note

EtherCalc is running on port 8000.

To make the application accessible from the outside, configure a web backend:

[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Setup daemon

Use your favourite editor to create ~/etc/services.d/ethercalc.ini with the following content:

Note

EtherCalc tries to connect to Redis via TCP/IP, which will accepts connections on both TCP/IP and UNIX socket. If you configured redis by following the guide it is currently configured for UNIX socket only as this is also the more stylish, secure and faster version. So by now the connection between EtherCalc and Redis won’t be established.

Adding the environment variable REDIS_SOCKPATH pointing to our the unix-socket to the supervisord-config forces EtherCalc to connect to Redis through the UNIX socket.

[program:ethercalc]
command=%(ENV_HOME)s/ethercalc/node_modules/ethercalc/bin/ethercalc
environment=NODE_ENV="production",REDIS_SOCKPATH="%(ENV_HOME)s/.redis/sock"
autorestart=true

After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

If it’s not in state RUNNING, check your configuration.

Finishing installation

You’re done. Point your Browser to your installation URL https://isabell.uber.space and start collaborating in your shiny new EtherCalc!

To get started, create a new Spreadsheet by visiting the URL https://isabell.uber.space/_new.

Update

Note

Check the update feed regularly to stay informed about the newest version.

To get the latest version of EtherCalc you can use the npm package manager:

[isabell@stardust ~]$ cd ethercalc
[isabell@stardust ethercalc]$ npm update ethercalc
[isabell@stardust ethercalc]$

After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

Restart your supervisorctl afterwards. If it’s not in state RUNNING, check your configuration.

It might take a few minutes before your EtherCalc comes back online because npm re-checks and installs dependencies. You can check the service’s log file using supervisorctl tail -f ethercalc.


Tested with EtherCalc 0.20200306.0, Uberspace 7.5.0.0

Written by: Achim | pxlfrk <hallo@pxlfrk.de>