Configuring Wasabi as primary storage
When you need to store larger amounts of data, it is beneficial to use storage experts like Amazon or Wasabi. The key benefit is cost, when compared to web host providers. This article describes how to use Wasabi.
Primary vs External
With a smaller number of Nextcloud users, you can configure External storage for individual users. This article describes how to configure Primary storage, which will facilitate the use of Wasabi for all users. Note that you can only configure this for a new installation.
- Start by signing up to Wasabi.
- Now you can create a new bucket.
- Create a Policy giving full access to this bucket
- Now you can create a API user account, with credentials, who will be able to access the bucket using this policy.
Nextcloud pre-install configuration
Prior to installing Nextcloud do the following:
- Create a new file in the /config folder, called storage.config.php.
- Add the following contents, change the highlighted items for your instance.
$CONFIG = [
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => [
'bucket' => 'bucket-name',
'autocreate' => true,
'key' => 'ABCDEFGHIJ1234567890',
'secret' => 'ABCDEFGHIJ1234567890klmnopqrst1234567890',
'hostname' => 's3.eu-central-1.wasabisys.com',
'port' => 443,
'use_ssl' => true,
'region' => 'eu-central-1',
// required for some non Amazon S3 implementations
// 'use_path_style'=> false,
Don't forget to delete the storage.config.php file after you've completed the Nextcloud installation.
Transactional file locking
When using an object store as primary storage, transactional file locking should be disabled.
- Open config/config.php for editing.
- Prior to the final ); add the following:
'filelocking.enabled' => false,
You can ignore the warning in Administration > Overview, as Wasabi’s API should gracefully handle the situation if two users attempt to write to the same file simultaneously. However if locking is handled by both NextCloud (at the application level) and by Wasabi, a conflicting situation will occur where files cannot be updated or deleted due to file locks.
It's important to note that you will not be able to access any user files on the Wasabi bucket. This is different to a standard installation of Nextcloud, where the data is stored in a dedicated folder on the web server. Additionally the database becomes an essential component as it references the meta data for all stored files. You will want to be confident that you have backups of the database.
Thanks for visiting.