NextCloud is a free and open-source collaboration and sharing program. It lets users to access and store data from a variety of devices, including PCs and smartphones. NextCloud is comparable to DropBox in that it enables for seamless collaboration on many projects, calendar management, email sending and receiving, and video calls.
We’ll walk you through installing, configuring and using Nextcloud on Amazon Linux 2 in this tutorial.
Features of Nextcloud 23
Here are the amazing features of Nextcloud 23:
- Nextcloud Files has 10x faster synchronization, delegate limited administration from admins to users, and set user status automatically.
- External appointment booking, advanced room and resource search in Calendar and Mail have all been improved in Nextcloud Groupware.
- Background blur, device check screen, and sophisticated permission management are discussed in Nextcloud Talk.
- Nextcloud Office is a cooperation between Collabora Productivity and Nextcloud. Docker-All-In-One is simple to install and upgrade.
- Nextcloud Backup is a peer-to-peer backup service aimed towards individual users.
- Updates for Nextcloud Desktop, Android, and iOS clients are now available.
Following the steps below, let’s dig in the installation of Nextcloud on Amazon Linux 2.
#1) Update Amazon Linux 2
Run the following command to ensure that all packages are updated in Amazon Linux 2:
sudo yum -y update
We always recommend a reboot when system is upgraded:
#2) Install Apache on Amazon Linux
To be able to run Nextcloud web interface, we need to install Apache on Amazon Linux 2.
Run the following command to install Apache:
sudo yum install httpd -y
Start and enable Apache:
sudo systemctl start httpd sudo systemctl enable httpd
Confirm the status of Apache:
$ systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2022-02-03 20:49:17 UTC; 20s ago Docs: man:httpd.service(8) Main PID: 22856 (httpd) Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec" CGroup: /system.slice/httpd.service ├─22856 /usr/sbin/httpd -DFOREGROUND ├─22861 /usr/sbin/httpd -DFOREGROUND ├─22862 /usr/sbin/httpd -DFOREGROUND ├─22864 /usr/sbin/httpd -DFOREGROUND ├─22881 /usr/sbin/httpd -DFOREGROUND └─22891 /usr/sbin/httpd -DFOREGROUND Feb 03 20:49:17 localhost systemd: Starting The Apache HTTP Server... Feb 03 20:49:17 localhost systemd: Started The Apache HTTP Server.
#3) Install PHP and its Dependencies
Run the following command to install PHP and its dependencies on Amazon Linux 2:
sudo amazon-linux-extras install php7.4 -y sudo yum install -y php php-curl php-fpm php-mysqlnd php-opcache php-gd php-xml php-mbstring php-common php-json php-zip
#4) Install MariaDB Database on Amazon Linux
Use the following guide to install MariaDB database on Amazon Linux 8:
Create Nextcloud database
Login to MariaDB database as follows:
$ mysql -u root -p
Now create Nextcloud a database as below:
CREATE DATABASE nextclouddb; CREATE USER 'nextcloud'@'%' IDENTIFIED BY '[email protected]'; GRANT ALL PRIVILEGES ON nextclouddb.* TO 'nextcloud'@'%'; FLUSH PRIVILEGES; EXIT;
#5) Install NextCloud on Amazon Linux 2
The NextCloud file must be downloaded from the official release site. You can download the most recent version by going to the official website.
sudo yum install wget -y wget https://download.nextcloud.com/server/releases/latest.zip
After you’ve downloaded it, extract it as instructed.
sudo yum install unzip -y unzip latest.zip
After that, copy the extracted files to Apache’s document root (
/var/www/html). Make a data directory to hold user information.
sudo mv nextcloud /var/www/html sudo mkdir -p /var/www/html/nextcloud/data
Make the Apache user the owner of the files listed above.
sudo chown -R apache:apache /var/www/html/nextcloud/
#6) Configure Apache for Nextcloud on Amazon Linux 2
Change the configuration file for Apache httpd:
sudo vim /etc/httpd/conf.d/nextcloud.conf
Now, add the following content to the file above:
ServerName nextcloud.example.com DocumentRoot /var/www/html/nextcloud ErrorLog /var/www/html/nextcloud/error.log CustomLog /var/www/html/nextcloud/requests.log combined
Allow apache access to the file /var/www/html/nextcloud/ and restart the service.
sudo chown -R apache:apache /var/www/html/nextcloud/ sudo chmod -R 755 /var/www
Disable default apache page and restart service:
sudo rm /etc/httpd/conf.d/welcome.conf sudo systemctl restart httpd
Ensure httpd services is running:
$ systemctl status httpd ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/httpd.service.d └─php-fpm.conf Active: active (running) since Thu 2022-03-03 00:50:22 UTC; 6s ago Docs: man:httpd.service(8) Main PID: 3565 (httpd) Status: "Processing requests..." CGroup: /system.slice/httpd.service ├─3565 /usr/sbin/httpd -DFOREGROUND ├─3571 /usr/sbin/httpd -DFOREGROUND ├─3572 /usr/sbin/httpd -DFOREGROUND ├─3573 /usr/sbin/httpd -DFOREGROUND ├─3574 /usr/sbin/httpd -DFOREGROUND └─3575 /usr/sbin/httpd -DFOREGROUND Mar 03 00:50:22 amazon-linux systemd: Starting The Apache HTTP Server... Mar 03 00:50:22 amazon-linux httpd: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to... this message Mar 03 00:50:22 amazon-linux systemd: Started The Apache HTTP Server.
#7) Configure Nextcloud on Amazon Linux 2
You can now go to http://your-server-ip> in your browser to access Nextcloud. The following page should appear.
Now, create an admin account.
Fill in the database credential based on the Nextcloud database created above under storage and database by selecting MySQL/MariaDB section:
Scroll to the bottom of the page and click Install.
After successful installation, you will get the following page:
Now while you’re here, go through the tips all the way to the conclusion.
You can adjust your background and what appears on the start-up page on the page below.
Using Nextcloud on Amazon Linux 2
As an admin or a user with admin permissions, you may now start uploading files directly to the Nextcloud server and sharing them with your members of the team. Click the files icon, then the plus sign, and then ‘upload file’ to upload a file from your local storage.
When you upload a file, you can share it with others and specify permissions for what those who have access to it may do with it, such as read, write, and share it. Click the sharing icon as indicated to share a file.
You should look at the various sharing possibilities.
#8) Install Nextcloud client
To interface with the Nextcloud server, a nextcloud client will be installed on our local workstations. Windows, MacOS, and Linux users can choose from a variety of options. We will install Nextcloud client for Linux.
Make sure you’ve created a user on the Nextcloud server who will be utilizing the client to connect to the server before proceeding.Click the Admin logo, then Users, to create a user on the Nextcloud server. At this time, just the admin user has been created. As seen below, we have created user frank.
You can now install the Nextcloud client once you’ve created the user. Go to the Nextcloud website and choose a client for your operating system. I’ve downloaded for Linux in my situation.
Right-click the downloaded file and select Properties->Permissions. On Execute section, choose only owner and group.
Now, double click on the file to run the application.
Choose ‘login to your nextcloud‘. Enter the URL for the Nextcloud server (http://nextcloud-server-ip>). Before the user is granted access to the Nextcloud server, Nextcloud will automatically start the browser and prompt you to login.
Log in if you haven’t already. The account will be connected after you click ‘Grant access‘. Return to the installation wizard and select ‘Connect‘. Nextcloud will begin synchronizing on its own.
A Nextcloud folder should also appear in your disk. Anything you place in this folder will be synced to the cloud storage automatically, and files uploaded directly to the cloud server will be synced back to this folder. All files you’ve shared with others will be synced to the folder as well.
#9) Nextcloud Apps Management
You may extend, customize, and restrict functionalities with NextCloud. Depending on your needs, you may choose to enable and disable a few features and apps after installing Nextcloud. Navigate to the Apps page to see the default apps.
On Amazon Linux 2, you’ve successfully installed Nextcloud server, configured it, uploaded files, and shared them with others. We’ve also seen how to set up a client that will sync local files to the cloud storage automatically. I hope you found the information in this tutorial to be helpful.