ownCloud Optimisation on Model B Pi

Firstly, thanks for creating DietPi. I’m quite new to the Pi scene after being gifted a model B Pi and had followed some YouTube Tutorials to set up the OS and get it on my network.

I’m now running ownCloud off it. While it is working, I’m getting the following “suggestions”.

  • Transactional file locking should be configured to use memory-based locking, not the default slow database-based locking. See the documentation :arrow_upper_right: for more information.

  • You are accessing this site via HTTP. We strongly suggest you configure your server to require using HTTPS instead as described in our security tips.

  • No memory cache has been configured. To enhance your performance please configure a memcache if available. Further information can be found in our documentation.

Suggestion 2 is obvious enough. I haven’t got a domain hooked up to the Pi, so I can’t run the Let’s Encrypt script to get SSL working.

Suggestions 1 and 3 are what I’m struggling with. From what I’ve read in the ownCloud documentation, most of this should “just work” out of the box. I’m running redis since that was the memcache suggested in dietpi-software and it looks like ownCloud should have picked up on it automatically.

Any help would be appreciated. :smiley:

What version of ownCloud are you running?

Per the docs (had to used the “cached” version at work)

Transactional File Locking¶

ownCloud’s Transactional File Locking mechanism locks files to avoid file corruption during normal operation. It performs these functions:

Operates at a higher level than the filesystem, so you don’t need to use a filesystem that supports locking
Locks parent directories so they cannot be renamed during any activity on files inside the directories
Releases locks after file transactions are interrupted, for example when a sync client loses the connection during an upload
Manages locking and releasing locks correctly on shared files during changes from multiple users
Manages locks correctly on external storage mounts
Manages encrypted files correctly

Note

Transactional file locking is in core, and replaces the old File Locking app. The File Locking app has been removed from ownCloud in version 8.2.1. If your ownCloud server still has the File Locking app, you must visit your Apps page to verify that it is disabled; the File Locking app and Transactional File Locking cannot both operate at the same time.

What Transactional File locking is not for: it is not for preventing collisions in collaborative document editing (see Configuring the Collaborative Documents App to learn about collaboration with the Documents app), nor will it prevent multiple users from editing the same document, or give notice that other users are working on the same document. Multiple users can open and edit a file at the same time and Transactional File locking does not prevent this. Rather, it prevents simultaneous file saving.

File locking is enabled by default, using the database locking backend. This places a significant load on your database. Using memcache.locking relieves the database load and improves performance. Admins of ownCloud servers with heavy workloads should install a memcache. (See Configuring Memory Caching.)

http://cc.bingj.com/cache.aspx?q=Transactional+file+locking+should+be+configured+to+use+memory-based+locking%2c+not+the+default+slow+database-based+locking.+See+the+documentation+%e2%86%97+for+&d=5004682319955244&mkt=en-US&setlang=en-US&w=qdytmFvSFjvj3bLGsv0Xo2E4trTs28sJ

You installed ownCloud via dietpi-software selection, right?
Because it should include setting up Redis (memory cache) for transactional file locking and APCu (faster memory cache) used as memcache.
Just installing Redis does not make ownCloud use it, but ownCloud need to be configured to use the above. The needed setup steps (+ many others) are included within our install script (dietpi-software). If you used it, but it obviously did not fully work, I need to investigate.

I anyway planned to update/review the ownCloud and Nextcloud install code, so can add this to the ToDo.

About HTTPS, yeah for LetsEncrypt a domain is needed. Without, you could set up a self-singed key+certificate to enable HTTPS. Most browsers will throw a warning, that the certificate is not trusted, but at least the traffic is encrypted :wink:.
This is also something I planned to implement into DietPi for a while :thinking: :stuck_out_tongue:.

Yes, I did use dietpi-software to install ownCloud. Apart from those messages it’s been throwing, it works alright on my Pi.

I appreciate the reply. :smiley:

I just opened the admin page…
A new version is available: Nextcloud 13.0.6

nzbeans
I just tested, on VM ownCloud install correctly configures memory cache and Redis for transactional file locking. No warnings besides expected HTTPS.

If you want to, we can investigate and check what went wrong/is missing on your setup.

For this please paste the results of the following commands:

occ config:list # Just the first part is needed, leave out the apps list
php -m
cat /etc/redis/redis.conf | grep unixsocket