For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/storage-and-backup/object-storage/nextcloud.md.
  • English

Object Storage - Use Object Storage with Nextcloud

View as Markdown

Learn how to set up storage in Nextcloud to use an Object Storage container.

Nextcloud is a suite of client-server software for creating and using file hosting services.

Warning

NOTE: OVHcloud provides services for which you are responsible for their configuration and management. You are therefore responsible for their proper functioning.

This tutorial is designed to help you as much as possible with common tasks. If you are having difficulty performing these actions, please contact a specialized service provider. OVHcloud cannot provide you with technical support in this regard.

 

Requirements

  • a container (see our Getting Started with Object Storage guide)
  • a user with the required access rights on the container
  • your Object Storage credentials (access_key and secret_access_key)
Info

To identify the endpoint corresponding to your storage class, please refer to our Endpoints and Object Storage Geoavailability guide.

 

Instructions

Configuration from the graphical interface

Activate the External storage support application

Click on your profile at the top right and then on Apps.

Nextcloud - step 1

Select the Disabled Apps in the left panel.

Locate the External storage support application and click Enable.

Nextcloud - step 2

 

Configuration

Click on your avatar at the top right and select Settings from the drop-down menu.

Nextcloud - step 3

  1. Select the External storage menu
  2. Create an Amazon S3®* storage type.
  3. Name your destination folder
  4. Specify the name of your container
  5. Set the host as: s3.<region_in_lowercase>.io.cloud.ovh.us
  6. Set the port to 443
  7. Specify the region
  8. Activate SSL
  9. Enter your access key
  10. Fill in your secret key
  11. Validate

Nextcloud - step 4

Open the Files application, select the External storage menu in the Administrative menu and then select your container.

Nextcloud - step 5

The result should be similar to this:

Nextcloud - step 6

 

Configuration from the CLI

First, the External storage support application must be enabled:

$ php occ app:enable files_external
files_external enabled

Check that S3™ API 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™-compatible Object Storage 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>.io.cloud.ovh.us \
                                -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     |
+---------+-------+--------------+

 

Set your bucket as primary storage

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>.io.cloud.ovh.us',
                'port' => 443,
                'use_ssl' => true,
                'region' => '<region_in_lowercase>',
                'use_path_style' => false
        ),
),

 

Go further

Browse all the Object Storage (S3™-compatible) guides.

Browse the rest of the OVHcloud US documentation for guides on our other products and services.

Learn more about Object Storage on the OVHcloud US website.

If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.

*S3 is a trademark filed by Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.