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
  • Retieve BitLocker Recovery Keys from microsoft sql
    Get MBAM BitLocker Recovery Keys from Microsoft SQL Server Windows
  • How to Block IP Addresses Using Group Policy (GPO) in Active Directory
    Block IP Addresses Using Group Policy (GPO) in Active Directory Network | Monitoring
  • maxresdefault
    How to join a computer to the Domain Windows Server
  • BitLocker 1
    Unable to install Microsoft Bitlocker Administration: Uninstall your current version of MBAM and run setup again Windows
  • macOS
    How to upgrade macOS Big Sur to macOS Monterey Mac
  • Locate Find and Grep Required 1
    Locate, Find and Grep: Search for files and patterns in Linux or Unix-like OS Linux
  • Free up filesystem root space
    How to fix the Filesystem root is running low on Disk space Virtualization
  • image 6
    Set Browers and Windows to reopen Apps on Startup Windows

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.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • 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

  • Slide4
    How to install Let’s Encrypt on Apache Web Server Linux
  • finalelastic
    How to Install and Configure Elasticsearch on Linux  Linux
  • Rport
    RPORT the free and open source remote management tool Linux
  • FEATURE IMAGE BASE URL 1
    How to solve cannot find a valid base URL for repo: base/7/x86_64 Linux
  • ClamAV
    How to install and manage ClamAV and ClamTK on Ubuntu Linux Anti-Virus Solution
  • SOBR   implementing 3 2 1 Rule
    Achieve 3-2-1 rule with SOBR on Synology or OOTBI and Wasabi Backup

More Related Articles

Slide4 How to install Let’s Encrypt on Apache Web Server Linux
finalelastic How to Install and Configure Elasticsearch on Linux  Linux
Rport RPORT the free and open source remote management tool Linux
FEATURE IMAGE BASE URL 1 How to solve cannot find a valid base URL for repo: base/7/x86_64 Linux
ClamAV How to install and manage ClamAV and ClamTK on Ubuntu Linux Anti-Virus Solution
SOBR   implementing 3 2 1 Rule Achieve 3-2-1 rule with SOBR on Synology or OOTBI and Wasabi 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

  • Retieve BitLocker Recovery Keys from microsoft sql
    Get MBAM BitLocker Recovery Keys from Microsoft SQL Server Windows
  • How to Block IP Addresses Using Group Policy (GPO) in Active Directory
    Block IP Addresses Using Group Policy (GPO) in Active Directory Network | Monitoring
  • maxresdefault
    How to join a computer to the Domain Windows Server
  • BitLocker 1
    Unable to install Microsoft Bitlocker Administration: Uninstall your current version of MBAM and run setup again Windows
  • macOS
    How to upgrade macOS Big Sur to macOS Monterey Mac
  • Locate Find and Grep Required 1
    Locate, Find and Grep: Search for files and patterns in Linux or Unix-like OS Linux
  • Free up filesystem root space
    How to fix the Filesystem root is running low on Disk space Virtualization
  • image 6
    Set Browers and Windows to reopen Apps on Startup Windows

Subscribe to Blog via Email

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

Join 1,832 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

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.