FreedomBox for Communities/Digital Library

A community digital library might host files of various types like documents, books, audio, video, software etc. Hence a generic cloud solution must be used instead of specialized library software like Calibre which only manages ebooks.

A NextCloud server on the FreedomBox can be used to host the files for a community digital library. NextCloud does not have an official Debian package and must be installed manually.

Installation instructions

edit

Installing dependencies

edit

Install the necessary Debian packages required for NextCloud. The following installation instructions are for NextCloud 16.

  sudo apt-get install libapache2-mod-php
  sudo apt-get install postgresql
  sudo apt-get install php-gd php-json php-pgsql php-curl php-mbstring php-intl php-imagick php-xml php-zip

Check whether all the required dependencies are installed against this checklist

Database setup

edit

Setup PostgreSQL database. The following instructions are for PostgreSQL 11.

Open the psql console as user postgres

sudo -u postgres psql

Create a new user and database for nextcloud. Please use a strong password.

CREATE USER nextcloud WITH PASSWORD 'some$trongPW';
CREATE DATABASE nextcloud TEMPLATE template0 ENCODING 'UNICODE';
ALTER DATABASE nextcloud OWNER TO nextcloud;
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;

Exit the console by pressing Ctrl+D or by typing \q and enter.

Web installer

edit

The easiest way to install NextCloud is using its web installer.

Add the web installer script to your Apache server root and set the permissions as follows:

wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
sudo mv setup-nextcloud.php /var/www/html/
chown -R www-data:www-data /var/www/html/
sudo systemctl restart apache2

Access the web installer at the path https://<freedombox-url>/setup-nextcloud.php from a web browser. If the installer says that any dependencies are missing, install the corresponding Debian packages.

After the nextcloud files are setup, you will be prompted with a screen to enter admin credentials and database credentials.

Database Credentials
property value
username nextcloud
password some$trongPW
database name nextcloud
database url localhost:5432


After submitting the above details, the NextCloud installer will finish installation and log you in as the administrator user.