Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Google Cloud Storage Integration #6256

Closed
KroniK907 opened this issue Aug 25, 2017 · 9 comments
Closed

[Feature Request] Google Cloud Storage Integration #6256

KroniK907 opened this issue Aug 25, 2017 · 9 comments

Comments

@KroniK907
Copy link

KroniK907 commented Aug 25, 2017

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
Copy link
Member

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

@mamoit
Copy link

mamoit commented Feb 1, 2018

@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
Copy link

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

@mamoit
Copy link

mamoit commented Apr 28, 2018

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
Copy link

despens commented Apr 16, 2019

@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
Copy link

mamoit commented Apr 16, 2019

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
Copy link

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

@flowzen1337
Copy link

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
Copy link

gersur commented Apr 7, 2023

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:

  • data = store locally for app data
  • data_gcs = GCS for user data

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants