Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How To Install Nextcloud on a Linux system

Posted on 25/08/202215/08/2026 Raphael Gab-Momoh By Raphael Gab-Momoh 2 Comments on How To Install Nextcloud on a Linux system
  1. Home
  2. Backup
  3. 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.

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 Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
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

  • Veeam ONE Update e1780339954118
    How to Upgrade Veeam ONE to 13.0.2.6723 to Address Security Fixes Backup
  • S3 Bucket Replication
    Set up Cross-Region Replication for S3 Buckets AWS/Azure/OpenShift
  • veeamONE integration with VBR
    Install Veeam ONE and Add VBR: Fix failed to connect to VBR Backup
  • finalelastic
    How to Install and Configure Elasticsearch on Linux  Linux
  • switchlinuxusers
    How to Switch between Users in Linux Linux
  • Object first ootbi
    How to update Object First OOTBI Cluster Storage

More Related Articles

finalelastic How to Install and Configure Elasticsearch on Linux  Linux
How to backup Azure VIM 3 How to backup Azure VM with VM Settings AWS/Azure/OpenShift
banner2 How to Integrate Postman With GitHub Automation
systemd services How to use Systemd Timers on Linux Linux
veeam vulnerability backups Fix critical Veeam Backup and Replication 9.5, 10, and 11 vulnerabilities Backup
Step to migrate from microsft SQl to PostgreSQL Migrate Veeam Configuration Database to PostgreSQL Server 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

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • Upgrade for Veeam ONE
    How to upgrade Veeam ONE to v12.1 Backup
  • WinReg
    Unable to import Windows Reg File: The specified file is not a registry script Scripts
  • Copy and Paste Between HyperV VMs and host
    Copy and Paste between your device to a VM running in Hyper-V 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
  • Angular Azure
    How to deploy your Angular App to Azure from Visual Studio Code AWS/Azure/OpenShift
  • HP driver
    Printer Driver Information: How to determine the version and type of a Printer Driver Windows
  • MSSQLlicensing
    Microsoft SQL Evaluation period has expired: How to upgrade SQL Server instance Oracle/MSSQL/MySQL
  • Protech Synology NAS
    Cybersecurity Tips to Secure Synology NAS against Ransomware Reviews

Subscribe to Blog via Email

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

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

Tags

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

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.