nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.22k stars 4.05k forks source link

[Feature Request] Google Cloud Storage Integration #6256

Closed KroniK907 closed 7 years ago

KroniK907 commented 7 years ago

I am currently hosting my nextcloud on the Google Cloud Compute platform and would like to centralize all of my data to one platform.

Currently I have to either use disk storage or buy an Amazon S3 bucket. While I'm not exactly against using an Amazon S3 bucket, I am really fond of google's cloud api that makes automating the whole cloud system so much more comfortable than Amazon's tools (not to mention the nightmare of trying to manage having data and systems on both platforms).

I have tried about a million ways to make the existing Amazon S3 primary storage mechanism work for a google cloud storage bucket, but I have yet to find a way to get it to work.

In any case, Google Cloud is now one of the biggest and cheapest cloud platforms, and not being able to use nextcloud with their storage platform is a real pain for some of us who decided to go with google rather than amazon.

MorrisJobke commented 7 years ago

This should be done as an app like the FTP integration: https://github.com/icewind1991/files_external_ftp

mamoit commented 6 years ago

@MorrisJobke Is there (at the current date) no app for integration with google cloud? I can look into it, but my php foo is quite limited.

mnajamudinridha commented 6 years ago

hi mamoit, google cloud storage working perfect as primary storage with compatibility with s3, google support Interoperability API.

mamoit commented 6 years ago

The interoperability API is a blank check in terms of permissions, not allowing us to narrow down access for the generated key to a single bucket in the project.

despens commented 5 years ago

@najcardboyz could you provide a guide on how you managed to get Google's object storage to work with nextcloud? I'm unable to figure it out.

mamoit commented 5 years ago

I didn't yet, but the other day I had the idea to run minio in gateway mode to a GCS bucket. Haven't tried yet, but should work.

jeffclay commented 3 years ago

Has anyone considered using GCS Fuse to mount the bucket locally on the server?

flowzen1337 commented 3 years ago

Has anyone considered using GCS Fuse to mount the bucket locally on the server?

yes, doesnt work either as nextcloud wants to set timestamps etc to a file which google/gcsfuse cant handle and therefore errors appear and it doesnt work :-(

gersur commented 1 year ago

GCS Fuse does work inside data nextcloud folder. I'm using this command, and I set it to the startup script in GCP Compute Engine (might be able to mount from fstab, but I tried and no success)

gcsfuse -o allow_other --uid {docker_user} --gid {docker_user} --experimental-local-file-cache --client-protocol http2 {bucket_name} {mount_location}

Then, you will need to keep appdata_ locally, cause it will take performance impact If you use docker, you can seperate appdata_... and user data.

My configuration folder:

Then in config/config.php 'datadirectory' => '/var/www/html/data_gcs',

In docker compose:

volumes:
  - /var/www/html/data/appdata_...:/var/www/html/data_gcs/appdata_...
  - /var/www/html/data/files_external:/var/www/html/data_gcs/files_external

But, there will be an error other user can access, need to change 0770

To fix this, add this in config/config.php 'check_data_directory_permissions' => false,


I've tested with upload small image files, delete files and folders. And it works perfectly