= Maintaining ethercalc = We are running [http://ethercalc.net/ ethercalc] (a spreadsheet/wiki web software) at https://calc.mayfirst.org/. It depends on [wiki:nodejs node.js]. It was installed by running, as the calc user on mchesney (and in the /home/calc): {{{ npm install ethercalc }}} That created a directory structure in /home/calc/node_modules. The init script is handled by systemd (`systemctl status ethercalc`). We running apache which passed through traffic to ethercalc. The apache file (in site-enabled) has the following content: {{{ # web config for calc.mayfirst.org ServerName calc.mayfirst.org # ServerAlias www.calc.mayfirst.org Order deny,allow Allow from all #SSL Stuff SSLEngine On SSLProxyEngine On SSLCertificateFile /etc/letsencrypt/live/calc.mayfirst.org/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/calc.mayfirst.org/privkey.pem ProxyPreserveHost On ProxyRequests off ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ # Set up websockets to work through the proxy RewriteEngine On RewriteCond %{REQUEST_URI} ^/socket.io [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:8000/$1 [P,L] # Set up an alias for static files. Saves having to serve them from node.js Alias /static /home/calc/node_modules/ethercalc/static Alias /l10n /home/calc/node_modules/ethercalc/l10n Alias /images /hoe/calc/node_modules/ethercalc/images ErrorLog /var/log/apache2/calc.error.log CustomLog /var/log/apache2/calc.log combined }}} To update to the latest version of ethercalc, run the following command in /home/calc as the ethercalc user: {{{ npm update }}} Then, restart ethercalc (as root): {{{ systemctl restart ethercalc && systemctl restart apache2 }}} Note: the current version of ethercalc only works because of a patch [https://github.com/audreyt/ethercalc/issues/46 described here]. If updated, you may need to edit the specified file by hand.