IT in Education

Configuring Wasabi as primary storage

nextcloudWhen 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. However, this article describes how to configure Primary storage, which will facilitate the use of Wasabi for all users. Note that you can only configure when building a new installation.


  1. Start by signing up to Wasabi.
  2. Now you can create a new bucket.
  3. Create a Policy giving full access to this bucket
  4. 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:

  1. Create a new file in the /config folder, called storage.config.php.
  2. Add the following contents, change the highlighted items for your instance.
'objectstore' => [
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => [
'bucket' => 'bucket-name',
'autocreate' => true,
'key' => 'ABCDEFGHIJ1234567890',
'secret' => 'ABCDEFGHIJ1234567890klmnopqrst1234567890',
'hostname' => '',
'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.

  1. Open config/config.php for editing.
  2. Add the following line, after the objectstore configuration.
'filelocking.enabled' => false, // This is required for S3 Primary storage

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.

Accessing files

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,