Nextcloud Debian Install

This script is made for clean Debian 11 installation on AMD64 CPU architecture.
It will update OS, install neeeded packages, and preconfigure everything to run Nextcloud.
There are Apache (web server), MariaDB (database server), PHP 8.1 (programming language),
NTP (time synchronization service), and Redis (cache server) used.
Also new service for Nextcloud cron is generated that starts every 5 minutes.
A new user with administrative privileges will be added to the Nextcloud, you will find his credentials after the script runs (the password is randomly generated).

After install You may use Your web browser to access Nextcloud using local IP address.
Both HTTP and HTTPS protocols are enabled by default (localhost certificate is generated).
If you already have a domain you want to use then you can do so by adding it as an argument to the command that runs the script. Remember, however, that the domain must first be set to your server's IP address, and your network devices (routers) must already be properly configured. Otherwise, SSL certificate generation will fail.

Script link: https://github.com/nicrame/Linux-Scripts/blob/master/nextcloud-debian-ins.sh

To install use this command:

sudo sh -c "wget -q https://github.com/nicrame/Linux-Scripts/raw/master/nextcloud-debian-ins.sh && chmod +x nextcloud-debian-ins.sh && ./nextcloud-debian-ins.sh"
Or if You already got domain name configured:
sudo sh -c "wget -q https://github.com/nicrame/Linux-Scripts/raw/master/nextcloud-debian-ins.sh && chmod +x nextcloud-debian-ins.sh && ./nextcloud-debian-ins.sh mydomain.com"

It was tested with Nextcloud v24.0.3.

Changelog:
V 1.1 – 04.08.2022
– added support for adding domain name as command line argument (with let's ecnrypt support)
– added crontab job for certbot (Let's encrypt) and some more description
V 1.0 – 20.06.2022
– initial version based on private install script (for EL)

Leave a Reply

Your email address will not be published.