Jack Wallen takes a slightly easier route for the installation of the latest version of the Nextcloud cloud platform.
For those that aren’t in the know, Nextcloud is a cloud-based suite of tools that includes things like document and file management, calendar, chat (video and audio), email, forms and contacts. In fact, for those interested, Nextcloud could easily become a drop-in replacement for the likes of either Google Workspace or Microsoft 365. I’ve been using Nextcloud since its early days and I am confident that just about anyone can benefit from this platform.
I want to show you how to install the latest version of Nextcloud (v24) on Ubuntu Server 22.04. This time around, however, I’m going to make use of their installer script. Although this script doesn’t strip away some of the manual installation steps, it does make it slightly easier.
With that said, let’s get to the installation.
SEE: Hiring Kit: Cloud Engineer (TechRepublic Premium)
What you’ll need
You’ll only need two things to make this work: A running instance of Ubuntu Server 22.04 and a user with sudo privileges. That’s it – let’s make like Kate Bush and do some cloudbusting.
How to install the necessary dependencies
The installer script doesn’t handle the installation of the dependencies, so we have to take care of that first. To begin, let’s install the full LAMP stack. Log into your Ubuntu Server and issue the command:
sudo apt-get install lamp-server^ -y
When that installation completes, take care of the PHP requirements with:
sudo apt-get install php zip libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip php-mysql php-bcmath php-gmp zip -y
Restart Apache with:
sudo systemctl restart apache2
Next, we’ll secure the database installation with:
sudo mysql_secure_installation
Make sure the document root is owned by the Apache group with:
sudo chown -R www-data.www-data /var/www/html
How to create the database
Next, we must create a database. Log in to the MySQL console with:
sudo mysql -u root -p
Create the database with:
CREATE DATABASE nextcloud;
Next, create the Nextcloud database user with the command:
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'PASSWORD';
Where PASSWORD
is a unique/strong password.
We now need to give the nextcloud user the necessary permissions with the command:
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
Flush the privileges and exit the console with the two commands:
FLUSH PRIVILEGES;
exit
How to download the installer script
Change into the document root with:
cd /var/www/html
Download the installer with the command:
wget https://download.nextcloud.com/server/installer/setup-nextcloud.php
How to run the installer
Open a web browser and point it to http://SERVER/setup-nextcloud.php
, where SERVER
is the IP address or domain of the hosting server. You will be greeted by the first window in the installer wizard. Click Next and you should see a window indicating all dependency checks have passed (Figure A), which allows you to set the document root for the installation.
Figure A
You can either create a new directory house Nextcloud (by typing the name field) or type a .
to install it in the web server document root. Do one or the other, then click Next and the script will download and unpack everything necessary. This will take anywhere from two to 10 minutes depending on the speed of your network connection and the power of your server.
Once Nextcloud has been installed, you will be prompted to click Next again, where you’ll be delivered to the database setup window (Figure B).
Figure B
First, create an admin user and make sure to select MySQL/MariaDB as the database. You will then fill out the database information as such:
- Database user:
nextcloud
- Database password: the password you created during the creation of the database user in the MySQL console.
- Database name:
nextcloud
Leave localhost as is and then click Install. Once the database is taken care of, you’ll be asked if you want to install the recommended apps (Figure C).
Figure C
Click Install Recommended Apps, and when that finishes, you’ll be presented with the Nextcloud main window (Figure D).
Figure D
You can now further customize your installation by installing more apps or simply start working with your new Nextcloud cloud platform. Congratulations on taking your productivity to the next level.
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.