How to install NextCloud on my Ubuntu 22.04

NextCloud – Nextcloud Hub – Hub integrates the four key Nextcloud products Files, Talk, Groupware and Office into a single platform, optimizing the flow of collaboration. Reduce risk, improve citizen communication and reduce operational expenses with the leading content collaboration platform. Contact us now to learn how we can help you! It is also worth noting that this is a special application with which you will be able to manage open source files, which allows you to create, edit, host and share files without restrictions.

Initial steps for installing dependencies

By default, the Snap daemon is enabled on most Ubuntu server distributions. In any case, install it with the following command.

apt install snapd

Check the installed version of snap.

sudo snap version

Next, make a output and you cah show it (For ubuntu 22.04)

 snap    2.57.1
 snapd   2.57.1
 series  16
 ubuntu  22.04
 kernel  5.15.0-41-generic

Then you can install tne NextCloud programm. Use this command with snap

snap install nextcloud

Configure your NextCloud

The first step in your successful configuration should be to configure UFW to allow HTTP network traffic on server port 80. Please use this command

ufw allow 80/tcp

Next, you should allow access to https in order for everything to work fine. Use this command:

ufw allow 443/tcp

After you have made the necessary changes, you should reload the firewall. Use command to reload:

 ufw reload

To activate the NextCloud database and configuration file values, visit your server’s IP address using a web browser.


Now it remains to enter a username and a strong password to create the first administrator account. Then open your most preferred text editor and edit the main NextCloud configuration file.

nano /var/snap/nextcloud/current/nextcloud/config/config.php

Find the “trusted_domains” =>` section and replace the server IP address with your domain name as shown below.

 'trusted_domains' =>
    array (
       0 => '',

Then save and close the file. Install the Let’s Encrypt SSL certificate to secure your NextCloud server with HTTPS by running the following command.

nextcloud.enable-https lets-encrypt

You can find how to install your security certificate here (based on your web server).

Was this article helpful?

Related Articles

Leave A Comment?