编辑配置文件 nextcloud/config/config.php,在最下方添加以下配置: //S3 as internal storage 'objectstore' => array( 'class' => 'OC\\Files\\ObjectStore\\S3', 'arguments' => array( 'bucket' => 'bucket-name', 'key' => 'keygoeshere', 'secret' => 'secret-goes-here', 'hostname' => 'example.com', 'use_ssl' => true, 'use_path_style'=>true, ), ), 注意:hostname 不应使用 https 这样的协议前缀,应直接写域名部分。