Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » How To Install Nextcloud on a Linux system
  • Banner
    How to enable or disable Firefox Network Captive Portal Service Network | Monitoring
  • dsdfg
    Create a Bootable USB Drive Using dd Command on Linux Linux
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • screenshot 2020 02 07 at 20.59.01
    How to use the PsInfo utility from SysInternals Windows Server
  • troubleshooting Active Directory Replication
    How to troubleshoot Active Directory Replication issues Network | Monitoring
  • mbamreports
    Email notifications for MBAM Enterprise and Compliance and Recovery Audit reports Windows
  • ChatGPT on Linux
    Set Up and Use ChatGPT in Linux Terminal Linux
  • youtube cover blue
    How to use the Azure Cloud Shell or Azure CLI and Azure PowerShell AWS/Azure/OpenShift

How To Install Nextcloud on a Linux system

Posted on 25/08/202214/05/2024 Raphael Gab-Momoh By Raphael Gab-Momoh 2 Comments on How To Install Nextcloud on a Linux system
nextcloudfeature-1

Nextcloud, a clone of ownCloud, is a file-sharing service that, like Dropbox, allows you to save your own stuff, such as documents and photos, in a centralized area. Furthermore, Nextcloud differs in that all of its features are open source. It also gives you back control and protection over your sensitive data, eliminating the need for a third-party cloud hosting service. In this article, we shall be walking you through how to install Nextcloud on a Linux system. Please see how to install Nextcloud Desktop client on Mac.

You can find other articles that are useful and relevant here: How to upgrade from Ubuntu 20.04 LTS to 22.04 LTS and How to fix unable to access microphone on Zoom and How to Change User Account Type in Windows 10 and How to modify Windows 11 Taskbar via Intune and GPO and How to install Rust in a Linux System

Requirements for Installing Nextcloud on Linux

Below are the requirements to install NextCloud on a Linux system

  • A Linux machine preferably Ubuntu 22.04
  • A user account with sudo privileges

Step 1: Install NextCloud on Linux Using Snap

Installing Nextcloud on Linux is a straightforward process that enables you to have full control over your data and privacy. In this case. the Snap packaging system will be used to install Nextcloud.

This packaging system, which is included by default in Ubuntu 22.04, enables organizations to ship software in a self-contained unit with automatic updates, along with all associated dependencies and configuration.

This means that rather than installing and configuring a web and database server and then configuring the Nextcloud app to run on it, we can install the snap package that handles the underlying systems automatically.

Note: If your Ubuntu server is already hosting other sites in Apache2, snap's instance of Apache2 will conflict. So remove the apache2 that you already have installed before you run the next command.

You can do this with the command :

sudo snap install nextcloud
how to install nextcloud on Linux-next
installation

To this end, your server will be downloaded and installed with the Nextcloud package. You can confirm that the snap installation was successful by listing the following changes:

snap changes nextcloud
how to install Nextcloud on Linux-check
installation

The status and summary indicate that the installation had errors. This also shows the one that was successfully installed without a hitch.

Step 2: Configure Nextcloud with an Administrative Account

The nextcloud.manual-install command is used to configure Nextcloud with a new administrator account. Moreover, as arguments, you must supply a username and password. In the case of our example, the password is password and the username is raphael

sudo nextcloud.manual-install raphael password
how to install nextcloud on Linux
admin account setup

Now that Nextcloud has been installed, we must modify the trusted domains so that Nextcloud responds to requests with the server’s domain name or IP address.

Step 3: Adjust the Trusted Domains

Nextcloud limits the host names to which the instance will respond when installed from the command line. By default, the service only responds to requests addressed to the hostname “localhost.” Because we will be accessing Nextcloud via the server’s domain name or IP address, we will need to change this setting to accept these types of requests.

View the current configuration by querying the trusted domains array:

sudo nextcloud.occ config:system:get trusted_domains
how to install Nextcloud on Linux-trusted
trusted domain

At the moment, the array’s first value is only localhost. Besides, by typing: we can add an entry for our server’s domain name or IP address (This is my IP address, you have to enter yours -:) )

sudo nextcloud.occ config:system:set trusted_domains 1 --value=92.168.125.136
how to install Nextcloud on Linux-ipadd
server’s ip

If we query the trusted domains again, we will see that we now have two entries:

sudo nextcloud.occ config:system:get trusted_domains
2domains
two entries

Step 4 : Secure Nextcloud Web Interface with SSL

Next step in installing Nextcloud on Ubuntu is securing the web interface. But, first, let’s protect the web interface by creating a self-signed SSL certificate. This certificate will allow access to the web interface over an encrypted connection, but it will be unable to verify your server’s identity, so your browser will most likely display a warning.

To generate a self-signed certificate and configure Nextcloud to use it, enter:

sudo nextcloud.enable-https self-signed
selfsigned-cert
self signed certificate

Open the web ports in the firewall now that the interface is secure to allow access to the web interface:

sudo ufw allow 80,443/tcp
how to install Nextcloud on Linux-firewall
rules updated

Now that you’ve installed Nextcloud on Linux, navigate to your server’s domain name or IP address in your web browser:

https://192.168.125.136

This will redirect you to the Nextcloud login page because you have already configured an administrator account from the command line. Enter the administrative user credentials you created:

how to install Nextcloud on Linux- login-to
login page

Summary

In conclusion, Nextcloud can mimic the capabilities of popular third-party cloud storage services. Users can share content among themselves or externally via public URLs. In addition, the benefit of Nextcloud is that it securely stores information in a location under your control. By now, you should have adequate knowledge of how to install Nextcloud on a Linux system.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Backup, Linux, Storage

Post navigation

Previous Post: How to uninstall and prevent the installation of Microsoft Teams on Windows
Next Post: How to Install Apache Subversion on a Linux System

Related Posts

  • dfeef
    How to automatically resolve errors associated with failed dependencies Linux
  • GRADLE FEATURE
    How to install Gradle on Ubuntu Linux
  • SSL on WAMPServer
    Setup VirtualHost with SSL on WAMP Server Linux
  • elasticsearch error feature
    Elasticsearch: How to stop systemd service start operation from timing out Linux
  • sep hybrid backup tiny
    SEP sesam Hybrid Backup and Disaster Recovery Solution Backup
  • Perform an in place upgrade of Windows Server
    In-place upgrade of Windows Server 2022 to 2025 Backup

More Related Articles

dfeef How to automatically resolve errors associated with failed dependencies Linux
GRADLE FEATURE How to install Gradle on Ubuntu Linux
SSL on WAMPServer Setup VirtualHost with SSL on WAMP Server Linux
elasticsearch error feature Elasticsearch: How to stop systemd service start operation from timing out Linux
sep hybrid backup tiny SEP sesam Hybrid Backup and Disaster Recovery Solution Backup
Perform an in place upgrade of Windows Server In-place upgrade of Windows Server 2022 to 2025 Backup

Comments (2) on “How To Install Nextcloud on a Linux system”

  1. Avatar photo Trevor says:
    23/08/2023 at 2:12 PM

    Hi, Nice article and it worked but there are some errors:
    value=92.168.125.136
    missing the 192 rather than the 92 and I believe you should indicate ‘your IP’ rather than 192.168.125.136 because it didn’t work for me but when I inputted ‘my IP’ then it worked

    Sudo gave me errors so I switched to su – that then worked

    

    Log in to Reply
    1. chris Christian says:
      24/08/2023 at 1:23 PM

      Hi Trevor,

      Many thanks for your kind words. Yes, that is a different IP. The author will be informed and the document will be updated.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Banner
    How to enable or disable Firefox Network Captive Portal Service Network | Monitoring
  • dsdfg
    Create a Bootable USB Drive Using dd Command on Linux Linux
  • Fix OneDrive Error
    How to Fix OneDrive Error 0x80071129: The tag present in the reparse point buffer is invalid Windows
  • screenshot 2020 02 07 at 20.59.01
    How to use the PsInfo utility from SysInternals Windows Server
  • troubleshooting Active Directory Replication
    How to troubleshoot Active Directory Replication issues Network | Monitoring
  • mbamreports
    Email notifications for MBAM Enterprise and Compliance and Recovery Audit reports Windows
  • ChatGPT on Linux
    Set Up and Use ChatGPT in Linux Terminal Linux
  • youtube cover blue
    How to use the Azure Cloud Shell or Azure CLI and Azure PowerShell AWS/Azure/OpenShift

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.