Whats about these .rnd file disturbing the update process? Let's search for a clue

Nextcloud version: 16.0.2
Operating system and version: Ubuntu 18.04.2 LTS
Apache or nginx version: Apache 2.4.29-1ubuntu4.7
PHP version: 7.2.19-0ubuntu0.18.04.1

Hello to everyone out there,

i am facing the common problem of the .rnd file disturbing every update progress of my nextcloud installation. Please don’t be mad on me :worried: to be the next one asking about the phenomena. I know, i can easily delete the file to do my update, but i want to know why it’s there and why it will always be recreated soon after deleting it. I hope, together we can find a clue to this situation.

  1. For me the problem first came up when switching from 16.0.0 to 16.0.1. I was wondering why such a problem began in a minor release which should exterminate errors. After searching this board and the web i found out, that the problem haunted many people for a long time. I could trace the problem back to some 10.x versions. So it wasn’t a nextcloud fault that started with the 16.x version.

  2. So perhaps i did something different since version 16.0.1 or installed a new app that created the .rnd-file :thinking:? I am very lazy with installing new apps, so it couldn’t be a new app in my case :blush:. But i really changed the way i am using my nextcloud. Until 16.0.1, i always used the browser or the official nextcloud-sync-client to access my files. Since 16.0.1 i am additional mounting it through the fstab of my linux-client. Perhaps the .rnd file is a sort of a lock-file warning, that there could be someone still mounting the share? What’s with you out there? Is there someone who has the .rnd-file-problem but isn’t using webdav mount? This could disconfirm my theory.

  3. What IS the file anyway? “.rnd” is a strange filename. No main filename, just an extension. And what means “rnd”? I can only imagine rnd = random? The “file” command couldn’t help, because it only says its data. Looking into the file with the less command couldn’t help either. There is nothing readable in there that makes sense. I collected some different .rnd-files. They are always 1.024 bytes of size, but with different contents. This could support my theory being some sort of lock-file, perhaps with the name of the file in use in it.

  4. When are .rnd-files created? I experimented with the situation and can say, that i find a new .rnd-file soon after accessing a file through the webdav mount. That would match my guess in 2). Can someone out there confirm this?

Thank for your help with this situation

Your question can easily been answered by using the search function of this forum or just by asking aunt G..
The file isn’t created by Nextcloud but by OpenSSL in the home directory of the user under which the web server is running. Don’t use the Nextcloud root as the home directory of that user and you will solve the problem. See e.g. :


This doesn’t work for me, i have a ‘normal’ VPS Server with apache as webserver running
with ‘www-data’ user and the home is set to ‘/var/www’, two Nextcloud installations reside
far below the ‘/var/www’ directory. Every time i log in to one Nextcloud installation there
will be a (fresh) .rnd file in the regarding Nextcloud root directory. But the ‘www-data’-user
may only have ONE home dir and it is set to ‘/var/www’, not to any underlying directory.

no, that is not the case in my setup either.
experpt of passwd:
www-data:/var/www:
nextcloud folder:
/var/www/owncloud

the posibility is, if you are using letsencrypt with certbot or similar,
that might be the one who is putting it in.

These .rnd files are created by openssl which is called by nextcloud. Here are some more details about them. It’s fine that these files in your nextcloud directory.

Starting with Nextcloud 17 these files are ignored from integrity check and updater.