Select Page


Nextcloud, a fork of ownCloud, is a report sharing server that lets you retailer your individual content material, like paperwork and images, in a centralized location, similar to Dropbox. The variation with Nextcloud is that every one of its options are open-source. It additionally returns the keep watch over and safety of your delicate information again to you, thus getting rid of using a third-party cloud webhosting provider.

On this educational, we will be able to set up and configure a Nextcloud example on an Ubuntu 18.04 server.


With a purpose to whole the stairs on this information, you’re going to want the next:

  • A sudo person and firewall configured to your server: You’ll create a person with sudo privileges and arrange a elementary firewall by way of following the Ubuntu 18.04 initial server setup guide.
  • (Non-compulsory) A site identify pointed for your server: We will be able to be securing connections to the Nextcloud set up with TLS/SSL. Nextcloud can arrange and arrange a unfastened, depended on SSL certificates from Let’s Encrypt in case your server has a site identify. If no longer, Nextcloud can arrange a self-signed SSL certificates that may encrypt connections, however may not be depended on by way of default in internet browsers. If you’re the use of DigitalOcean, you’ll be able to observe our information on how to set up a domain name for your server if you happen to intend to make use of Let’s Encrypt.

Upon getting finished the above steps, proceed directly to discover ways to arrange Nextcloud to your server.

Step 1 – Putting in Nextcloud

We will be able to be putting in Nextcloud the use of the snappy packaging machine. This packaging machine, to be had on Ubuntu 18.04 by way of default, permits organizations to send tool, together with all related dependencies and configuration, in a self-contained unit with automated updates. Which means as a substitute of putting in and configuring a internet and database server after which configuring the Nextcloud app to run on it, we will be able to set up the snap bundle which handles the underlying methods mechanically.

To obtain the Nextcloud snap bundle and set up it at the machine, kind:

  • sudo snap set up nextcloud

The Nextcloud bundle will probably be downloaded and put in to your server. You’ll verify that the set up procedure was once a hit by way of list the adjustments related to the snap:


ID Standing Spawn In a position Abstract 2 Finished nowadays at 16:12 UTC nowadays at 16:12 UTC Set up "nextcloud" snap

The standing and abstract point out that the set up was once finished with none issues.

Getting Further Knowledge In regards to the Nextcloud Snap

If you need some extra details about the Nextcloud snap, there are a couple of instructions that may be useful.

The snap data command can display you the outline, the Nextcloud control instructions to be had, in addition to the put in model and the snap channel being tracked:

Snaps can outline interfaces they make stronger, which include a slot and plug that, when hooked in combination, provides the snap get entry to to sure features or ranges of get entry to. For example, snaps that wish to act as a community shopper should have the community interface. To peer what snap “interfaces” this snap defines, kind:

  • snap interfaces nextcloud


Slot Plug :community nextcloud :network-bind nextcloud - nextcloud:removable-media

To be told about all the explicit services and products and apps that this snap supplies, you’ll be able to check out the snap definition report by way of typing:

  • cat /snap/nextcloud/present/meta/snap.yaml

This may help you see the person elements integrated throughout the snap, if you want assist with debugging.

Configuring an Administrative Account

There are a couple of other ways you’ll be able to configure the Nextcloud snap. On this information, fairly than growing an administrative person during the internet interface, we will be able to create one at the command line with a view to steer clear of a small window the place the administrator registration web page could be available to any person visiting your server’s IP deal with or area identify.

To configure Nextcloud with a brand new administrator account, use the nextcloud.manual-install command. You should cross in a username and a password as arguments:

  • sudo nextcloud.manual-install sammy password

The next message signifies that Nextcloud has been configured appropriately:


Nextcloud isn't put in - just a restricted choice of instructions are to be had Nextcloud was once effectively put in

Now that Nextcloud is put in, we wish to regulate the depended on domain names in order that Nextcloud will reply to requests the use of the server’s area identify or IP deal with.

Adjusting the Depended on Domain names

When putting in from the command line, Nextcloud restricts the host names that the example will reply to. By means of default, the provider best responds to requests made to the “localhost” hostname. We will be able to be having access to Nextcloud during the server’s area identify or IP deal with, so we will wish to regulate this surroundings to just accept those form of requests.

You’ll view the present settings by way of querying the price of the trusted_domains array:

  • sudo nextcloud.occ config:machine:get trusted_domains



Recently, best localhost is provide as the primary cost within the array. We will be able to upload an access for our server’s area identify or IP deal with by way of typing:

  • sudo nextcloud.occ config:machine:set trusted_domains 1


Machine config cost trusted_domains => 1 set to thread

If we question the depended on domain names once more, we will be able to see that we’ve got two entries:

  • sudo nextcloud.occ config:machine:get trusted_domains



If you want so as to add in a different way of having access to the Nextcloud example, you’ll be able to upload further domain names or addresses by way of rerunning the config:machine:set command with an incremented index quantity (the “1” within the first command) and adjusting the --value.

Securing the Nextcloud Internet Interface with SSL

Ahead of we start the use of Nextcloud, we wish to safe the internet interface.

If in case you have a site identify related along with your Nextcloud server, the Nextcloud snap help you download and configure a depended on SSL certificates from Let’s Encrypt. In case your Nextcloud server does no longer have a site identify, Nextcloud can configure a self-signed certificates which can encrypt your internet visitors however will not be able to make sure the id of your server.

With that during thoughts, observe the phase beneath that fits your state of affairs.

Possibility 1: Atmosphere Up SSL with Let’s Encrypt

If in case you have a site identify related along with your Nextcloud server, the most suitable option for securing your internet interface is to procure a Let’s Encrypt SSL certificates.

Get started by way of opening the ports within the firewall that Let’s Encrypt makes use of to validate area possession. This may make your Nextcloud login web page publicly available, however since we have already got an administrator account configured, no person will be capable to hijack the set up:

  • sudo ufw permit 80,443/tcp

Subsequent, request a Let’s Encrypt certificates by way of typing:

  • sudo nextcloud.enable-https lets-encrypt

You’ll first be requested whether or not your server meets the stipulations vital to request a certificates from the Let’s Encrypt provider:


To ensure that Let's Encrypt to make sure that you just in truth personal the area(s) for which you are soliciting for a certificates, there are a choice of necessities of which you want to bear in mind: 1. With a purpose to check in with the Let's Encrypt ACME server, you should conform to the currently-in-effect Subscriber Settlement situated right here: By means of proceeding to make use of this instrument you settle to those phrases. Please cancel now if differently. 2. You should have the area identify(s) for which you need certificate pointing on the exterior IP deal with of this device. 3. Each ports 80 and 443 at the exterior IP deal with of this device should level to this device (e.g. port forwarding would possibly wish to be setup to your router). Have you ever met those necessities? (y/n)

Sort y to proceed.

Subsequent, you’re going to be requested to offer an e-mail deal with to make use of for restoration operations:


Please input an e-mail deal with (for pressing notices or key restoration):

In spite of everything, input the area identify related along with your Nextcloud server:


Please input your area identify(s) (space-separated):

Your Let’s Encrypt certificates will probably be asked and, supplied the whole thing went smartly, the interior Apache example will probably be restarted to instantly put into effect SSL:


Making an attempt to procure certificate... completed Restarting apache... completed

You’ll now skip forward to sign into Nextcloud for the first time.

Possibility 2: Atmosphere Up SSL with a Self-Signed Certificates

In case your Nextcloud server does no longer have a site identify, you’ll be able to nonetheless safe the internet interface by way of producing a self-signed SSL certificates. This certificates will permit get entry to to the internet interface over an encrypted connection, however will not be able to make sure the id of your server, so your browser will most probably show a caution.

To generate a self-signed certificates and configure Nextcloud to make use of it, kind:

  • sudo nextcloud.enable-https self-signed


Producing key and self-signed certificates... completed Restarting apache... completed

The above output signifies that Nextcloud generated and enabled a self-signed certificates.

Now that the interface is safe, open the internet ports within the firewall to permit get entry to to the internet interface:

  • sudo ufw permit 80,443/tcp

You at the moment are in a position to log into Nextcloud for the primary time.

Logging in to the Nextcloud Internet Interface

Now that Nextcloud is configured, talk over with your server’s area identify or IP deal with for your internet browser:

Observe: If you happen to arrange a self-signed SSL certificates, your browser would possibly show a caution that the relationship is insecure for the reason that server’s certificates isn’t signed by way of a known certificates authority. That is anticipated for self-signed certificate, so be happy to click on during the caution to continue to the website.

Since you have got already configure an administrator account from the command line, you’re going to be taken to the Nextcloud login web page. Input the credentials you created for the executive person:

Nextcloud login page

Click on the Log in button to log in to the Nextcloud internet interface.

The primary time you input, a window will probably be displayed with hyperlinks to quite a lot of Nextcloud purchasers that can be utilized to have interaction with and arrange your Nextcloud example:

Nextcloud client modal

Click on via to obtain any purchasers you have an interest in, or go out out of the window by way of clicking the X within the upper-right nook. You’ll be taken to the principle Nextcloud interface, the place you’ll be able to start to add and arrange information:

Nextcloud main page

Your set up is now whole and secured. Be at liberty to discover the interface to get extra familiarity with the options and capability of your new machine.


Nextcloud can reflect the features of in style third-party cloud garage services and products. Content material may also be shared between customers or externally with public URLs. The good thing about Nextcloud is that the guidelines is saved securely in a spot that you just keep watch over.

Discover the interface and for added capability, set up plugins the use of Nextcloud’s app store.