Storage / OVHcloudMenu

OVHcloudOVHcloud

Store your SFTP server's files in your own OVHcloud Object Storage bucket, with an S3 user limited to that bucket.

OVHcloud Object Storage has regions across Europe (France, Germany, the UK, Poland and Italy), as well as Canada, Singapore, Australia and India. Paris (eu-west-par) and Milan (eu-south-mil) are 3-AZ regions; the others are single-zone.

Before you start

  • An OVHcloud account with a Public Cloud project.
  • The region you want, for example gra (Gravelines) or eu-west-par (Paris).

1. Create the bucket

  1. In the OVHcloud Control Panel, go to Public Cloud, select your project and open Object Storage.
  2. On the My containers tab, choose Create Object Container.
  3. Pick the offer, the deployment mode (1-AZ or 3-AZ) and the region.
  4. Leave versioning off (it’s off by default) and don’t enable Object Lock: it can’t be turned off later, and it stops SFTP users from deleting or replacing files.
  5. When asked to link a user, link or create an admin user. This user becomes the bucket owner. Don’t give the owner’s keys to CloudFile; see step 2.
  6. Choose Create.

2. Create an access key

OVHcloud can’t restrict the bucket owner: owners keep full control through the bucket’s ACL, whatever their policy says. Create a second S3 user just for CloudFile and give it a policy for this bucket.

  1. Go to the Object Storage users tab and create a user, for example cloudfile.
  2. Copy the user’s Access key and Secret key. You can show the secret again later from the ... menu on the user’s row.
  3. Save this policy as a .json file (replace my-bucket):
{
  "Statement": [
    {
      "Sid": "CloudFile",
      "Effect": "Allow",
      "Action": ["s3:ListBucket", "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:AbortMultipartUpload"],
      "Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
    }
  ]
}
  1. On the user’s row, open the ... menu and choose Import JSON file, then pick the file. This replaces the user’s current policy.

3. Connect it

In CloudFile, go to Storage → Add bucket and choose OVHcloud:

Field Value
Bucket Your bucket name
Region The bucket’s region code, e.g. gra, de or eu-west-par
Endpoint https://s3.<region>.io.cloud.ovh.net (filled in from the region)
Access key ID The cloudfile user’s access key
Secret access key The cloudfile user’s secret key
Name Optional, e.g. Production
Path-style URLs Off

Click Test connection, then Save. To use the bucket, open a server and pick it under Settings → Storage.

Troubleshooting

  • Writing a test file failed with a NoSuchBucket or region error. The region code doesn’t match the bucket. Use the lowercase code, such as gra or eu-west-par, not the city name.
  • Writing a test file failed: Access Denied. The policy wasn’t imported, or it names a different bucket. Download the user’s current policy from the same ... menu (Download JSON File) to check it.
  • Writing a test file failed with a DNS or connection error. The endpoint uses the older .perf.cloud.ovh.net or the Swift s3.<region>.cloud.ovh.net form. Use https://s3.<region>.io.cloud.ovh.net.
  • Deleting the test file failed. Object Lock is enabled on the bucket.

See Your own bucket for how files are laid out in the bucket.