Object Storage - Use S3 Object Storage with Nextcloud
Learn how to set up storage in Nextcloud to use a S3 Object Storage bucket
Learn how to set up storage in Nextcloud to use a S3 Object Storage bucket
Last updated on 3rd January 2022
Nextcloud is a suite of client-server software for creating and using file hosting services.
This guide explains how to set up storage in Nextcloud to use a S3 Object Storage bucket.
OVHcloud provides services which you are responsible for with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.
This guide is designed to assist you in common tasks as much as possible. If you encounter any difficulties performing these actions, please contact a specialist service provider and/or discuss the issue with our community on https://community.ovh.com/en/. OVHcloud cannot provide you with technical support in this regard.
See our Getting started with S3 Object Storage guide.
Click on your profile at the top right and then on Apps
.
Select the Disabled Apps
in the left panel.
Locate the External storage support application and click Enable
Click on your avatar at the top right then on Settings
.
External storage
menus3.<region_in_lowercase>.perf.cloud.ovh.net
Validate
Open the Files
application, select the External storage
menu then your bucket
.
The result should be similar to this:
First, the External storage support application must be enabled:
$ php occ app:enable files_external
files_external enabled
Check that S3 is supported on your installation:
$ php occ files_external:backends storage amazons3
- name: Amazon S3
- identifier: amazons3
- configuration:
- bucket: text
- hostname: text
- port: text
- region: text
- use_ssl: boolean
- use_path_style: boolean
- legacy_auth: boolean
- storage_class: \OCA\Files_External\Lib\Storage\AmazonS3
- supported_authentication_backends:
- amazons3::accesskey
- authentication_configuration:
- amazons3::accesskey:
- key: text
- secret: password
Mount your S3 bucket on Nextcloud as a OVH_hp-bucket mount point:
$ php occ files_external:create -c bucket=hp-bucket \
-c hostname=s3.<region_in_lowercase>.perf.cloud.ovh.net \
-c region=<region_in_lowercase> \
-c use_ssl=true \
-c use_path_style=false \
-c legacy_auth: false \
-c key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
-c secret=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy \
OVH_hp-bucket amazons3 amazons3::accesskey
Storage created with id 4
Validate your settings:
$ php occ files_external:verify 4
- status: ok
- code: 0
- message
Verify and update the settings if necessary:
$ php occ files_external:list
+----------+----------------+-----------+---------------------+-----------------+---------+------------------+-------------------+
| Mount ID | Mount Point | Storage | Authentication Type | Configuration | Options | Applicable Users | Applicable Groups |
+----------+----------------+-----------+---------------------+-----------------+---------+------------------+-------------------+
| 4 | /OVH_hp-bucket | Amazon S3 | Access key | bucket: "nex.." | | All | |
+----------+--------------+-----------+---------------------+-----------------+---------+------------------+-------------------+
Start indexing the new storage:
$ php occ files:scan -vvv --path /admin/files/OVH_hp-bucket
Starting scan for user 1 out of 1 (admin)
Folder /admin/files/OVH_hp-bucket/
Folder /admin/files/OVH_hp-bucket/home
...
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 3 | 13 | 00:00:04 |
+---------+-------+--------------+
Edit your config/config.php
file and add:
'objectstore' => array(
'class' => 'OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'hp-bucket',
'autocreate' => true,
'key' => 'xxxxxxxxxxxxxxxxxxxx',
'secret' => 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy',
'hostname' => 's3.<region_in_lowercase>.perf.cloud.ovh.net',
'port' => 443,
'use_ssl' => true,
'region' => '<region_in_lowercase>',
'use_path_style' => false
),
),
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community