The installer prepares a Debian or Ubuntu server in one command: the packages, the database, the private keys and the two services. You then put HTTPS in front of it and open the address in a browser.
The installer does the server side; HTTPS in front of it is yours, from the examples in the repository.
- A Debian or Ubuntu server you can reach as root.
- A host name pointed at the server, for example
accounting.example.com, and an HTTPS certificate for it. - Apache or nginx, to serve the app over HTTPS.
- Optional: an Opensolr account (its email and API key), asked for by the setup wizard. Without it all the accounting works; the documents are kept but not read or searched. See Your Opensolr account.
The installer brings the rest itself: Python and PostgreSQL. The repository asks for Python 3.12 or newer and PostgreSQL 15 or newer.
As root, replacing accounting.example.com with your host name:
git clone https://github.com/phpcip/opensolr-accounting.git /opt/opensolr-accounting cd /opt/opensolr-accounting sudo ./install/install.sh accounting.example.com
It installs Python and PostgreSQL, makes a service user and the database, writes a private settings file with freshly generated keys, prepares a private folder for the documents, creates the tables and starts two services: opensolr-accounting-web (the app) and opensolr-accounting-worker (the background work). It ends by printing the setup token. The app now runs on the server itself, on 127.0.0.1:8765, and is not reachable from outside until the next step.
With Apache
The repository carries a ready virtual host for Apache and one for nginx. Copy it, put your host name in it, and enable it. It expects the certificate at /etc/letsencrypt/live/<host>/; change the two certificate lines if yours is elsewhere.
cp /opt/opensolr-accounting/deploy/apache-vhost.conf.example /etc/apache2/sites-available/opensolr-accounting.conf sed -i 's/accounting.example.com/YOUR.HOST.NAME/g' /etc/apache2/sites-available/opensolr-accounting.conf a2enmod ssl proxy proxy_http headers rewrite a2ensite opensolr-accounting apache2ctl configtest systemctl reload apache2
Or with nginx
cp /opt/opensolr-accounting/deploy/nginx-vhost.conf.example /etc/nginx/sites-available/opensolr-accounting sed -i 's/accounting.example.com/YOUR.HOST.NAME/g' /etc/nginx/sites-available/opensolr-accounting ln -s /etc/nginx/sites-available/opensolr-accounting /etc/nginx/sites-enabled/opensolr-accounting nginx -t systemctl reload nginx
Both examples accept uploads of up to 500 MB and give a request up to 300 seconds.
Open https://YOUR.HOST.NAME/. Every page leads to the setup wizard until it is finished. It asks for the setup token; if you no longer have it on screen, read it again on the server:
cat /var/lib/opensolr-accounting/setup-token
To see that both services are running:
systemctl status opensolr-accounting-web opensolr-accounting-worker