Install and configure Nextcloud Box again

Goodmorning everyone,
I would need your help: I think I have done some damage to my Nextcloud Box, I can not explain - unfortunately! Excuse me !!! - the steps and damage I’ve done, are little more than a basic user.
I need a step by step guide for a new installation and configuration of the entire Nextcloud Box. I tried to search on the site, but I found them really fragmentary and unclear. My fault, however, excuse me !!!
Thanks to those who will help me! :slight_smile:

Ubuntu LTS/Odroid: https://www.c-rieger.de/nextcloud-installation-guide/#c02
RasPI or any Debian: https://ownyourbits.com/2017/02/13/nextcloud-ready-raspberry-pi-image/

I thank you for the answer! :slight_smile:
I also apologize, but I’m afraid I did not understand: which one is needed to install all the Nextcloud Box?

The second: the image from Nachoparker. Works like a charm on my nextcloud box.

Thanks a lot to everyone for the advice! :slight_smile:
This weekend I will get to work!

Hello everyone, after a long time, I go back to this discussion: work and other things, they did not allow me to put my hand to the Nextcloud Box.
So, I would say to have made it:

  • I installed ubuntu-18.04-preinstalled-server-armhf + raspi2;
  • I installed openssl;
  • I installed apache;
  • I installed mariadb;
  • I installed Nextcloud 13.04;
  • I configured the ssl protocol;
    all in the Raspberry PI 2 of my NextcloudBox.
    Everything works, in my home LAN, but … now how can I use it outside the home? :-OR
    Thanks to those who will help me! :slight_smile:

Looks like you went with a manual install rather than the docker image. These instructions will apply to most manual installs, but the docker and snap images have their own interfaces for configuring accepted names and TLS certs.

First, you’ll need to forward the web ports 80 and 443 from your home router through to your Nextcloud box. That connects anyone that has your IP address straight to Nextcloud. There’s an extremely basic guide here to get you started, but most routers these days will have their default IPs and passwords labelled right on them. This would also be a good time to check your router’s firmware and change to a non-default password. Nothing to do with Nextcloud, but you don’t want your router as part of a botnet, and many routers are vulnerable these days.

Second, you’ll need to make sure your IP won’t change (if you have a Static IP from your ISP), or if it does, you’ve got a name that will stay updated to match.
For the simplest possible configuration, check to see if your router supports any free Dynamic DNS services. Otherwise, you can try out a free service like dnsdynamic.org. They’ll give you a program you can leave running on any computer in the house, which will point whatever free domain you choose (e.g., example.dnsdynamic.org) to your new IP whenever it changes.

Third, if you’re going to be using this from outside, you’ll want TLS/SSL. If you know how to use a self-signed certificate and verify it every time you connect, that’s fine, but LetsEncrypt/certbot is pretty smooth (apart from installing the right version…) and gives a good configuration.
The version included in Ubuntu 16.04 wasn’t working for me, and I’m not sure about 18.04, but you can follow this guide which, despite the name, works on any fairly recent Ubuntu. I do recommend you let this wizard redirect all requests from port 80 (unsecured) through to 443 (TLS), so no sensitive information is accidentally unsecured.

Fourth, your Nextcloud needs to be configured to accept connections where it’s referred to by the name you set up. You’ll need to modify your config.php file, usually at /var/www/nextcloud/config/config.php.
Add your new domain (example.dnsdynamic.org) inside the 'trusted_domains' => array list. Try and match the syntax exactly, and include a comma after each entry that has another after it. A comma after the last one too isn’t going to hurt, so I just leave one so I don’t forget it later.

Mine looks a little like this, after having used it a couple years, with different names pointing to it for various reasons:

  'trusted_domains' =>
  array (
    0 => '192.168.<x>.<x>',
    1 => 'nextcloud.<mydomain.tld>',
    2 => '<mydomain.tld>',
    3 => '<otherdomain.I.sometimes.send.people.to>',
    4 => '<nextcloud-local-netbios-name>',
  ),
1 Like

Hello,
I thank you for your response and advice! :slight_smile:
Ok, I’m going to work and I’ll let you know.
Thanks again and happy Sunday!

Goodmorning everyone!
So, I did it and I configured all the security protocols! :slight_smile:
Question how do I get almost 100 GB of data as quickly as possible?
I moved them to transfer them from the HD in the Nextcloud Box, copying them directly to the / nextcloud / data folder, but if I do so, I will not let them see …
Where am I wrong?
Thank you all!

Moving them directly into the folder you want them to be is indeed the fastest way. To make them show up in Nextcloud after that, you’ll need to do two things:

  1. Check permissions on the files - having them be owned by the web server user (www-data on Ubuntu) is usually the simplest solution.
  2. Run occ files:scan to add them to Nextcloud’s database. On my Ubuntu install, I usually use this one-liner to run as the web user and scan all relevant files:
    sudo -u www-data php /var/www/nextcloud/occ files:scan --all
    Adjust as needed. :slight_smile:

You will want to double-check and make sure you’re putting them in the proper folder. If they belong to a certain user account, they go in the files folder inside that user’s folder. For example:
/var/www/nextcloud/data/<myUsername>/files/<myFilesHere>.

1 Like

Hello,
and thank you for your reply! :slight_smile:
I try immediately and update you.

Mhmm I apologize, but this morning I think I answered too fast: what is occ? I do not seem to have installed it …:pensive::blush:

And, I’m sorry if I take this opportunity: but at the first ignition, after it has started, the microsd no longer serves, right? I mean, the operating system should be on the hard disk, right?:astonished:
Thank you for your patience!

occ is an executable PHP console that’s installed in your Nextcloud base directory. Usually the same folder that contains your data, apps, and other folders, and is your Apache document root directory. It’s not usually in your $PATH, which is why I specify my path to it in my one-liner. Here’s the admin documentation that explains a bit more about how to use it and where to find it.

I don’t have an answer on your other question, but perhaps someone else does.

1 Like

Thanks again for the answer!:grinning:
Nothing unfortunately, I just can not find nor operate it … and now, from a browser does not load me a folder. I did not think it was so hard to use Nextcloud … :pensive:
I’ll do another trial, but then I’ll give up …
One last question please and excuse me: Apache, php, MariaDB and Nextcloud do I have to install them in the microsd of the Raspberry or in the HD?