Logo       PBase-Foundation

Nextcloud

Installation - Summary

Substitute your server's subdomain and admin email with the echo commands below. If your server is registered in DNS as your domain's root provide an empty string instead of "nextcloud" shown in the example. After providing these defaults run the yum commands as detailed below.

echo "nextcloud" > /root/DEFAULT_SUB_DOMAIN.txt
echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt
yum -y install https://pbase-foundation.com/pbase-repo.rpm
yum -y install pbase-preconfig-postgres-nextcloud
yum -y install pbase-postgres
yum -y install pbase-nextcloud
yum -y install pbase-lets-encrypt

Installation - Step by Step

Here is how to install the Nextcloud application. This example assumes your host is registered in DNS on a "nextcloud" subdomain like nextcloud.myexample.com and the installer will use Let's Encrypt to setup HTTPS.

Step 1: Provide your subdomain and admin email address by using the echo commands below to create a text file under the /root directory for each value. For example:
echo "nextcloud" > /root/DEFAULT_SUB_DOMAIN.txt
echo "myaddress@myemailprovider.com" > /root/DEFAULT_EMAIL_ADDRESS.txt

Step 2: Install the pbase-repo package with the command:
yum -y install https://pbase-foundation.com/pbase-repo.rpm

... when it runs, its output will point out the file pbase_repo.json that now holds copies of the defaults.

Step 3: Install the Nextcloud dependencies and pre-configuration package with the command:
yum -y install pbase-preconfig-postgres-nextcloud

... it's output will tell you to review the files in the module-config.d directory.

Step 4: Install a local database with the pbase-postgres package:
yum -y install pbase-postgres

...or to configure a non-local Postgres instance you must edit pbase_postgres.json in the module-config.d directory instead to provide its connection information.

Step 5: Install the pbase-nextcloud package with the command:
yum -y install pbase-nextcloud

Step 6: If your host is registered in DNS, installing the pbase-lets-encrypt package will generate a certificate for HTTPS connections:
yum -y install pbase-lets-encrypt

When the pbase-nextcloud and pbase-lets-encrypt packages complete you should have a full working instance of Nextcloud ready to be administered at https://nextcloud.myexample.com depending on your domain name.

Extras

You should secure your server ports with pbase-firewall-enable and lock down SSH access with the pbase-ssh-fail2ban package.

yum -y install pbase-ssh-fail2ban
yum -y install pbase-firewall-enable

Nextcloud with MySQL

To install Nextcloud with a MySQL 8.0 community database for storage
on EL8
Use these steps:

yum -y install https://pbase-foundation.com/pbase-repo.rpm
yum -y install pbase-preconfig-mysql-nextcloud
yum -y --disablerepo=appstream install mysql-community-server
yum -y install pbase-mysql80community
yum -y install pbase-nextcloud

on EL 6 and 7
Use these steps:

yum -y install https://pbase-foundation.com/pbase-repo.rpm
yum -y install pbase-preconfig-mysql-nextcloud
yum -y install pbase-mysql80community
yum -y install pbase-nextcloud

Configuration Options - Postgres

The pbase-preconfig-postgres-nextcloud rpm creates a default configuration file:

{
"pbase_postgres": [
{
"default": {
"hostName": "localhost",
"port": "5432",
"startService": true,
"enableRemoteAccess": true,
"install": true,
"database": [
{
"name": "nextcloud",
"user": "admin",
"password": "shomeddata"
}
]
}
}
]
}

Configuration Options - MySQL 8.0 Community

The pbase-preconfig-mysql-nextcloud rpm creates a default configuration file:

{
"pbase_mysql80community": [
{
"default": {
"hostName": "localhost",
"rootPassword": "SHOmeddata",
"port": "3306",
"characterSet": "utf8mb4",
"startService": true,
"install": true,
"database": [
{
"name": "nextcloud",
"user": "admin",
"password": "shomeddata"
}
]
}
}
]
}

Source code of this RPM

This is the RPM .spec file containing the code that is executed by the pbase-nextcloud installer. https://github.com/marklangbehn/pbase-rpm-installer/blob/master/applications/pbase-nextcloud/rpmbuild/SPECS/pbase-nextcloud.spec

More about Nextcloud

Visit the Nextcloud project at:
https://nextcloud.com/
"The self-hosted productivity platform that keeps you in control"

The scripts and dependencies of the pbase-nextcloud rpm are based on the steps described in the Installation on Linux page:
https://docs.nextcloud.com/server/20/admin_manual/installation/source_installation.html