Nextcloud Hub II is here, and it's a big improvement over previous iterations. Jack Wallen walks you through the process of installing this new release on Ubuntu Server.
Nextcloud 23 brings a major overhaul to the platform and introduces Nextcloud Office and plenty of other features and fixes to make it an outstanding choice for anyone looking to host a full-fledged cloud service in-house (in your data center, your cloud-hosted provider or even on a server in your home).
The new features include:
- Profile page and automatic user settings
- Administration task delegation
- Nextcloud Groupware
- Nextcloud Office
- Nextcloud Backup
This might be one of the more significant updates to come from the Nextcloud developers.
I'll walk you through the process of installing Nextcloud 23 (aka Nextcloud Hub II) on Ubuntu Server 21.10.
SEE: Checklist: How to manage your backups (TechRepublic Premium)
What you'll need
To successfully install Nextcloud 23, you'll need a running instance of Ubuntu Server (preferably either 20.04 or newer) and a user with sudo privileges. That's it; let's make some magic.
How to install Apache, MySQL and dependencies
The first thing we'll do is install our web and database servers. Log into Ubuntu and run the installation of everything necessary with the command:
sudo apt-get install lamp-server^ -y
Once the above command completes, start and enable the services with the commands:
sudo systemctl start apache2 sudo systemctl enable apache2 sudo systemctl start mysql sudo systemctl enable mysql
Next, we'll install the remaining dependencies with the command:
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
How to create the MySQL database
Before we create the database, let's secure the MySQL installation with the command:
Make sure to give the MySQL admin users a strong/unique password and answer y to the remaining questions.
Log in to the MySQL console with the command:
sudo mysql -u root -p
Create a new database with:
CREATE DATABASE nextcloud;
Create the Nextcloud database user with the command:
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'PASSWORD';
Where PASSWORD is a unique/strong password.
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, unpack and move the Nextcloud file
Download Nextcloud 23 with the command:
Unzip the downloaded package with:
Move the newly created file to the Apache document root with:
sudo mv nextcloud /var/www/html/
Give the newly relocated folder the proper ownership with:
sudo chown -R www-data:www-data /var/www/html/nextcloud
How to create the Apache configuration file
Create a new Apache .conf file with the command:
sudo nano /etc/apache2/sites-available/nextcloud.conf
In that file, paste the following:
Alias /nextcloud "/var/www/html/nextcloud/" <Directory /var/www/html/nextcloud/> Options +FollowSymlinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud </Directory>
Enable the necessary Apache modules:
sudo a2enmod rewrite headers env dir mime
Enable the new Nextcloud site with:
sudo a2ensite nextcloud
Change the PHP memory limit:
sudo sed -i '/^memory_limit =/s/=.*/= 512M/' /etc/php/7.4/apache2/php.ini
Restart Apache with:
sudo systemctl restart apache2
How to access the web installer and finish up
Open a web browser that has access to the same network that hosts the new Nextcloud server and point it to http://SERVER/nextcloud (Where SERVER is the IP address or domain name of the hosting server). In the resulting page (Figure A), make sure to create a new admin user and the, in the database section, fill it out as such:
- Database user: nextcloud
- Database password: the password you created in MySQL console
- Database name: nextcloud
Since the database is being hosted on the same server, leave the location set to localhost. Leave the box checked for Installed recommended apps and click Finish setup. When the installation completes, you'll be automatically logged into the site as the admin user.
A surprising caveat
Upon finishing up the installation, I was surprised to find no sign of the Nextcloud Office feature. Creating a new file in the Files application only gives you the option to create a text file. I've reached out to the developers to find out if there is an issue or some other step that must be taken to enable the Nextcloud Office feature (because it is not obvious in either the Apps or the Settings windows).
My contact with Nextcloud informed me the installation should have installed Collabora and the Nextcloud connector by default. The problem is the Collabora download is fairly large, so the max_upload file size limit for PHP must be increased significantly. To make this work, you could always increase that option to 1GB for the installation and then shrink it back down to a more reasonable limit once the installation completes. If you don't want to bother with that, those pieces can be added from the Nextcloud App Market, so make sure to install Collabora Online and Collabora Online Built-in CODE Server from the App store. Once you've installed both of those apps, you should be able to create documents, spreadsheets and presentations in Nextcloud.
Subscribe to TechRepublic's How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
- How to become a developer: A cheat sheet (TechRepublic)
- How-to guide for Linux administrators (free PDF) (TechRepublic)
- Linux 101: What tech pros need to know (TechRepublic Premium)
- iCloud vs. OneDrive: Which is best for Mac, iPad and iPhone users? (free PDF) (TechRepublic)
- Top 5 programming languages data admins should know (free PDF) (TechRepublic)
- DevOps: More must-read coverage (TechRepublic on Flipboard)