Nextcloud installation tutorial

Locked
lmarcos
Posts: 78
Joined: Sun 26. Jan 2020, 12:55

Nextcloud installation tutorial

Post by lmarcos »

I'm translating from this thread the information I found useful to install Nextcloud on my Ubuntu server in case it helps some other non German speaking people out here.

First of all backup your server and make sure you're running MariaDB 10.3 or later (better 10.4 if you're updating, since it has unix_socket authentication plugin installed by default) for the proper encoding and collate required by Nextcloud to support emoji (utf8mb4) and so on. Otherwise you might get an error with character length and need to manually modify some of the tables by going into them and modifying var from 255 to 191 and back when trying the database repair after following the instructions on this post. For the MariaDB update, Tobi has kindly given me this link in another thread to solve the problem I got after the upgrade with the unix_socket.

Create the subdomain you want Nextcloud to be installed in on KH. Activate HSTS with 180 days time (mine has gone back to 120 days since! :shock: )
Open the 3306 port in the firewall if you haven't done already so.
Edit the user and configure memcache in 'Additional php configuration'

Code: Select all

opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

Go to Nextcloud to get the web installer (currently at https://nextcloud.com/install/#instructions-server) and follow the instructions:
  • Right-click on the link and save the file to your computer
  • Upload setup-nextcloud.php to your web space
  • Point your web browser to setup-nextcloud.php on your webspace
  • Follow the instructions and configure Nextcloud
  • Login to your newly created Nextcloud instance!
Tip from OllitheDarkness: give 754 permissions to occ file.

If Nextcloud tells you something about memcache, you might need to install any of the following packages php-pear php-apc or php-apcu using apt install and then restart apache. Olli's commands made it for me.

Code: Select all

apt install php-apcu php-apcu-bc

service apache2 restart
In Nextcloud folder config.php add the following line

Code: Select all

'memcache.local' => '\OC\Memcache\APCu', 
If Nextcloud version is not 17, update as required (they're currently rolling out NC18, with onlyoffice out of the box and not just the connector). It's a 1 click thing.

MiFi had to add also the following lines to the additional php configuration of his user, but that was not the case for most of us.

Code: Select all

apc.enable = 1
apc.enable_cli = 1
apc.shm_size = 256M
always_populate_raw_post_data = -1
And that's it :D
Doky
Posts: 1
Joined: Sat 23. Jan 2021, 18:41

Re: Nextcloud installation tutorial

Post by Doky »

Thanks man! 8-)
Locked