In this tutorial we will be using the easiest possible way to install Nexcloud – snapcraft. Snapcraft is an outstanding tool allowing us to install software as easy as you may imagine.

Snap will do all the work for you: install php, apache, mysql and all necessary extensions, create db and db user. Everything goes as one single package.

Sound good? Same for me…

To run install process, use the following command:

sudo snap install nextcloud

Adding admin user and password

sudo nextcloud.manual-install username password

Listing trusted domains:

sudo nextcloud.occ config:system:get trusted_domains 

The ouput will show the following: localhost

Now as we want to configure a domain we should add it to the list of trusted domains:

sudo nextcloud.occ config:system:set trusted_domains 1 

Run listing command one more time to ensure domain has been added.

sudo nextcloud.occ config:system:get trusted_domains 

Let’s Encrypt SSL certificate

Nextcloud require a valid SSL certificate to be installed. That is why we will install Let’s Encrypt SSL certificate. Of course you can install any other SSL certificate or even self-generated certificate. But in this tutorial we will use only Let’s Encrypt.

Before you start please ensure that you configured your domain to point same IP address and ports 80 and 443 are opened.

To check this go to Networking tab in your lightsail management panel and check if your domain pointing to your ip and line “https 443” present in the list.

Now run a command:

sudo nextcloud.enable-https lets-encrypt 

Now type in your web browser the domain you used for installation. It should redirect you from http to https automatically and the following screen should appear.

NextCloud Login page

You should use same username and password you entered for the command: sudo nextcloud.manual-install

More information can be found here:

That’s all!


  • byDylan Kinnett
    Posted April 6, 2019 9:33 pm 0Likes

    Thank you for this easy-to-follow tutorial. I was able to set up an owncloud installation very quickly! Please keep up the good work.

    • byCreateOnlineTraining
      Posted April 6, 2019 10:41 pm 0Likes

      Thank you, Dylan, for your interest! Definitely)

  • byDG
    Posted July 31, 2019 5:17 pm 0Likes

    Thank You!!!

    Unfortunately, the lets-encrypt no longer issues certificates for domains.

Leave a comment