New user needs help getting going

Hi!

I am a long time Dropbox user who now out of privacy and economy reasons want to setup my personal nextcloud using a Raspberry Pi3, my PC is running Windows 10.
I want a cloud that my whole family can use around the globe (we live in multiple countries). Let my just say that I am a linux beginner, so I don’t have a lot of experience with linux operating systems.

I have now tried several times to get nextcloud running, but there is always something that doesn’t work. There are a lot of tutorials on the web, but most of them are for owncloud, some are very complicated and I don’t follow what’s going on (such as the tutorial from Carsten Rieger), and there are a lot of tutorials in German.

My most successful attempt was by following this: https://www.youtube.com/watch?v=pYo6seF29ts , which to a large extend follow the “Example Installation on Ubuntu 16.04 LTS Server” found in the nextcloud manual. Problem is that he uses Rasbian, meaning PHP5, and I couldn’t get SSL working after following his approach.

I very much would like to follow the nextcloud instruction manual and use Apache, MariaDB and PHP7, since I have the understanding that this is the recommended and best setup.

Problem 1: OS
I have been looking all over, and understand that I cannot use Rasbian since I want PHP7. I have tried Ubuntu 16.04 for raspberry pi 3, Ubuntu 16.04 Server for raspberry pi 3, but I can’t get them to boot.

I wanted to try Ubuntu MATE 16.04, but I doesn’t fit on my 8GB card even though it is supposed to.

I have tried to install Ubuntu Core 16 to be ready for the snap of nextcloud, but I need to import an SSH key to my account, and the instructions to do so is not valid for Windows.

From what I have read on this and other forums, the answer is basically to wait for the snap version of nextcloud for Pi3, since it is the easiest and best solutions for a simple setup. Is this correct?

Problem 2: Installation
If I can get an OS that supports PHP7 up and running, I think I could follow the nextcloud manual. But in the youtube video I previously followed, it is shown that one have to edit the apache2.conf file (have a look from 6:50 in the video), is this necessary when I would follow the manual correctly?

Before using the graphical installation wizard, the manual says that I should temporarily change some ownership by using “chown -R www-data:www-data /var/www/nextcloud/”. Is this a temporary execution, og do I need to reverse it somehow?

Problem 3: External HDD
I can’t find any instructions on how to choose what drive functions as the storage. How can I mount and set an external HDD as the storage on my Pi3?

Is there a recommended HDD, or a non-recommended one?

Problem 4: External Access
How can I access the cloud from anywhere, like my Dropbox?

Problem 5: Security
How do I best secure the cloud when it is to be used with external access?

From the nextcloud manual I understand that SSL is quite important.

I am guessing that the users’ passwords need to be strong (including the admin password I made at the start of the GUI wizzard).

Is the file encryption option important?

Is the passwords I need to enter during the setup important? If I remember correctly I needed to make a password for MariaDB and for MySQL (I thought that was the same thing).

Problem 6: File size
If I understand correctly the snap version has a file size limitation of 2GB, which to me is quite small.
I have some HD movies I have made that I would like to have in the cloud, and they are larger then 2GB.

If I do a manual installation, can I change this limitation to something larger?

HI RBorlet,

Problem 1: OS
I cannot answer this questions as I don’t use RPi3
Challange:
Investigate why you cannot boot on the ubuntu and raspberry help forums

Problem 2: Installation
Changing the ownership is permenant as we see in the manual
OC11 - Setting Strong Permissions
all files except /OC_ROOT/.htaccess and /OC_ROOT/data/.htaccess should be owned by user and group www-data ( www-data for ubuntu )
The two .htaccess files should be owned by
user root
group www-data

Or you could make a script from the manual and execute it.

as for the video he uses phpmyadmin which is not mandatory for OC 11 to function so NO this is not in the manual installation manual for OC.

Problem 3: External HDD
You can use any HDD to your liking with any filesystem your OS supports.
I could advice on ext4 but that creates a discussion.
the default storage location for user data is /OC_ROOT/data/ which is set in the config.php located at /OC_ROOT/config/config.php.
You should first mount your external HDD to a mounting point ex. /cloud

then change

  'datadirectory' => '/var/www/nextcloud/data',

to

  'datadirectory' => '/cloud',

This is best done before installation otherwise you will need to copy the existing data across.

There are other ways to use the external HDD

External storage on localdisk

which can be mapped to a user or group but is not the same as the primary data storage

Problem 4: External Access

For this to work you should get a domain and need SSL certificates
many documentation on this.

Problem 5: Security
Setup a firewall accordingly
Use SSL but not SSLv2 and SSLv3 ( google POODLE )
Use Strong Directory Permissions
set Strict-Transport-Security
Ultimately you should run in chroot environment
Encryption hardens your files but if you want to use Collabora CODE this options is not yet compatible. If you don’t use collabora you can enabled it if you want.

MySQL & mariaDB
Initially when you do a clean install you first install mariaDB and have to create a root password for it this is the master password too all databases you’ll ever make. After the installation there is the database setup for which a new master user is created that has full access to only the database DBNAME
After all that when accessing the GUI installation a New user is created for having the ADMIN rights inside NC.

Problem 6: File size

I use a manual installation and have not tested above 1,5GB.
trough webdav and browser no problems.

Some google slang to get familiar with:
permission commands
chmod
chown

Learn about mounting
mount
/etc/fstab

Hope it’s of any use to you.

Problem 1: OS
I highly recommend not to use an RPi3.
The RPi3 just like his fellas Rpi1 and 2 are very powerful systems.

Bot like every system he has his limits. The Rpi3 runs fairly out of Mem and CPU when he has to handle a few connections simultaneously. I have been using an RPi2 and he started to break down with 25 simultaneously connected ppl.

Problem 2: Installation
Try the nextcloud Webinstaller which should run without problems and should set everything as he needs it.
Upload it to /var/www/html do an chown www-data.www-data and a chmod +x and its works like a charm.

Problem 3: External HDD
as Vincent said.

Problem 4: External Access
Check if your ISP is using DSLite, DS (DS = DualStack)

If you have DSLite it means you have an IPv4 address which is in NAT with all other Costumers and you cant reach your Nextcloud from outside with IPv4 but with IPv6.

DS means you got your own IPv4 and IPv6 and can reach yor Nextcloud with both from outside.

Then simply go to www.dot.tk and register a free .tk domain.
Certificates can be handled by Letzencrypt those are free.

Problem 5: Security
as Vincent said :slight_smile:

Problem 6: File size
We are Uploading really large files via Webdav and browser. About 4 to 6 Gigs per files.
We haven’t faced any Problems yet.

If you need any further help on linux commands or setup feel free to contact me @ webmaster@scr33nfun.de

Thanks for both responses, unfortunately I am none the wiser. I am very happy to have gotten responses to all the problems I listed, but I since I still don’t have the basics up and running I will focus the attention on that.

Problem 1: OS
To clarify the usecase:

The cloud is for a total of 5 users.

Problem 2: Installation
I have successfully installed Ubuntu MATE 16.04 for Pi3, and have that up and running smoothly. Problem is that when I run these:

sudo apt-get install apache2 mariadb-server libapache2-mod-php7.0
sudo apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring
sudo apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip

I don’t get that blue prompt screen to make a root password in MariaDB. When I followed the youtube tutorial with PHP5 in Rasbian that part functioned OK.

I looked at the script in the webinstaller, but I don’t think that is helpful in my case. From what I see, this webinstaller just downloads the nextcloud installation file and unzips it, which I can do myself.

When I have reached the graphical setup wizard, I will continue to ask about the other problems.

not too worry you will be asked to set a root password as soon as you connect to mysql.

else there are various ways to (re)set a password.
try

sudo mysql_secure_installation

or

mysql -u root

The first command cleans your test database and test user and then setup a root password

This second command is to connect to your SQL DB with user root this will only be successfull when root has no password.
If you get

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

then there is a password set and you should login using

mysql -u root -p 

where you will be asked to supply the password that is set.

you may exit mysql with the word quit

mysql is now setup to create the database for nextcloud and a database admin user

Thanks again.
I have tried several approaches simultaneously, failing something and succeeding something else.

I have now a working Nextcloud snap version running on Ubuntu Core. I very much wanted the snap version from the beginning due to the simple installation process, but I thought that I had read somewhere that it wouldn’t work on the Pi3. I found a tutorial on https://flexion.org/posts/2016-12-raspberry-pi-3-powered-nextcloud-box-on-ubuntu-core/ where the snap version is running on the Pi3, and I got that working nicely. I know there is an unchangeable file size limit to the snap version, but for now I am just happy having something that works, and I will be moving further along the process with the snap version.

I appreciate the answers to all the questions listed in my first post, and will now create new topics outside of this “installation” forum category since I now have a working Nextcloud.

If you have a PC running WIndows 10, why not load VirtualBox in the machine and run NextCloud from there? That’s how I started my setup until I was able to buy a more powerful machine. It works seamlessly

Since my Windows machine is a laptop that quite often leaves the house, and I need the cloud to be up and running all the time.

Anyway, since the cloud is no functioning in it’s testing-state, the “installation” part of the cloud is done.