External Storage: Set Amazon S3 region

Lately, I’ve set-up Amazon S3 as external storage. The buckets that were created from within Nextcloud have always been assigned to the us-east region, although they are supposed to be in eu-west-1 region. Region settings in the Nextcloud admin backend are set to eu-west-1.

Accessing files in the US region from within the EU region is not very performant, so I’d like to tell Nextcloud to create buckets in the EU region.

Does anyone else have this issue?


Hi Robert,

Your question is exactly why I have visited this support site. I noticed that I cannot successfully setup external s3 storage unless the bucket does not already exist. Perhaps there is a way to make it use an existing one, but I do not know…

But anyway, when I populated “us-west-2” in the field, I was also surprised and annoyed that it put it in the us-east region. I was thinking perhaps there is something different besides us-west-2 or we’ve encountered a bug. While my future plans include using both west and east regions, that time has not yet come for me.

I’ll update here if I figure out a workaround, please let me know if you figure out the trick… I may just move the bucket it created to the correct zone and adjust the appropriate config files… when I’m sure what I’m doing.

Please let me know if you get any info, and I’ll do the same.




Any news regarding this? It’s still not possible to use S3 buckets created with an european region. This leads to less performance and it’s not possible to use this solution for many companies because of privacy requirements.

I see the issue. Right now, the S3 stuff is pretty much entirely developed by our company and as long as no customer has an issue with it, it is low priority to change this… As customers set our priorities where it comes to business features like these. Actually, it is even possible that we have a solution already for it for customers, I am not sure.

If you have a support contract, ask the support team. If you don’t, contact sales…

The problem is that you can’t set another region other than us east. And if you create a bucket in e.g. a European region before the installation, the whole nc throws an internal server error.

I’ve got NC setup with home directories on S3, you need to have the config set with the correct region code. Mine is hosted in London so had to put the correct region code in and it works fine.

array (
‘class’ => ‘OC\Files\ObjectStore\S3’,
‘arguments’ =>
array (
‘bucket’ => ‘’,
‘autocreate’ => true,
‘key’ => ‘’,
‘region’ => ‘eu-west-2’,
‘secret’ => ‘’,
‘use_ssl’ => true,
‘use_path_style’ => false,

Hey Dan, I just tried your config and for me the same error occured again. The bucket got created in US-East (N.V.). Could you post the whole config? Maybe some other arguments get in the way.
(If I try eu-central-1 (Frankfurt) I get the internal server error again)

This is my config.php, bear in mind as I said that I’m using S3 as primary storage

<?php $CONFIG = array ( 'instanceid' => 'occyj73p7de2', 'objectstore' => array ( 'class' => 'OC\\Files\\ObjectStore\\S3', 'arguments' => array ( 'bucket' => '', 'autocreate' => true, 'key' => '', 'region' => 'eu-west-2', 'secret' => '', 'use_ssl' => true, 'use_path_style' => false, ), ), 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => '', 1 => '', 2 => '', ), 'datadirectory' => '', 'overwrite.cli.url' => '', 'dbtype' => 'mysql', 'version' => '', 'dbname' => '', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => '', 'dbpassword' => '', 'installed' => true, 'memcached_servers' => array ( 0 => 'localhost', 1 => 20041, ), 'auth.bruteforce.protection.enabled' => false, 'knowledgebaseenabled' => false, 'allow_user_to_change_display_name' => false, 'trashbin_retention_obligation' => 'auto, 7', 'htaccess.RewriteBase' => '/', ); hope this helps!