In this blog post, we are going to explain step-by-step how to install the latest NextCloud on Ubuntu 22.04.
NextCloud is an open-source cloud storage service used to store, share, and sync data across multiple devices. NextCloud storage software is written in PHP and Javascript, which makes it very easy to install. In this tutorial, we are going to install and set up NextCloud with the LAMP stack.
Installation of NextCloud with the LAMP stack may take up to 15 minutes. Let’s get things working!
Table of Contents
Prerequisites
- A server with Ubuntu 22.04 as OS
- User privileges: root or non-root user with sudo privileges
- NVMe 1 VPS plan (1GB of RAM and 1 CPU core)
Step 1. Update the System
Before we install the NextCloud storage service we will update the system packages to the latest versions available.
Step 2. Install Apache Web Server
Install the Apache Web server with the following command:
Once installed, start and enable the service.
Check if the service is up and running:
You should receive the following output:
Step 3. Install PHP8.1 with dependencies
To install the PHP8.1 along with extensions execute the following command:
Step 4. Install MariaDB database server
To install the MariaDB database server, execute the command below.
Start and enable the mariadb.service with the following commands:
Check the status of the mariadb.service
You should receive the following output:
To check the installed MariaDB database version you can execute the following command:
You should receive the following output:
Step 5. Create Database and Database User
We need to create a database, and database user before we install the NextCloud.
Step 6. Install Nextcloud
The latest stable version of NextCloud is NextCloud 24.0.1 go into the Apache document root and download the latest version:</p
Once the installation is downloaded, extract it with the following command.
After extracting, we need to set up the right permissions:
Step 7. Create Apache Virtual Host File
In order can access NextCloud via domain name we need to create Apache Virtual Host file.
First, create the configuration file with the following command:
Open the file, and paste the following lines of code:
Enable the Apache2 confguration file and other modules:
Check the syntax of the Apache2 configuration.
You should receive the following output:
If you receive this output you can safely restart the Apache service.
Step 8. Finish NextCloud Installation
Once, the Apache service is restarted, you can acceess the NextCloud at http://YourDomain to finish the installation.
Set up the Username and the Password
Scroll down and enter the database credentials you created before in Step 5.
On the next window install the recommended apps:
Once the installation is completed, you should be redirected to the following window:
That’s it. You successfully installed NextCloud on Ubuntu 22.04 OS. If you find it difficult to install and configure this setup, just contact our technical support and they will do the rest for you. We are available 24/7. All you need to do is to sign up for our NVMe 1 GB VPS plan and submit a support ticket.
If you liked this post on how to install NextCloud on Ubuntu 22.04, please share it with your friends on social networks or simply leave a reply below. Thanks.
step 5 > sudo mysql -u root
That is the command for logging into the MySQL console. Please let us know if you have issues with logging in.