NextCloud 19.0.0 and Google Drive

I installed NextCloud 19.0.0 in my test environment.

Now I’m configuring Google Drive, usign this guide:

But, on NextCloud, I can authenticate (click on Grant Access) but I can’t create the external storage for this error:
> Error files_external Exception: Google storage not yet configured
> /var/www/html/nextcloud/apps/files_external/lib/config.php - line 259:
> OCA\Files_external_gdrive\Storage\GoogleDrive->__construct()
> /var/www/html/nextcloud/apps/files_external/lib/Controller/StoragesController.php - line 257:
> OC_Mount_Config::getBackendStatus("*** sensiti … “)
> /var/www/html/nextcloud/apps/files_external/lib/Controller/GlobalStoragesController.php - line 180:
> OCA\Files_External\Controller\StoragesController->updateStorageStatus(”
** sensiti … “)
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 170:
> OCA\Files_External\Controller\GlobalStoragesController->update(”
** sensiti … *")
> /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:
> OC\AppFramework\Http\Dispatcher->executeController()
> /var/www/html/nextcloud/lib/private/AppFramework/App.php - line 137:
> OC\AppFramework\Http\Dispatcher->dispatch()
> /var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:
> OC\AppFramework\App::main()
> <>
> OC\AppFramework\Routing\RouteActionHandler->__invoke()
> /var/www/html/nextcloud/lib/private/Route/Router.php - line 297:
> call_user_func()
> /var/www/html/nextcloud/lib/base.php - line 1007:
> OC\Route\Router->match()
> /var/www/html/nextcloud/index.php - line 37:
> OC::handleRequest()

Thanks for the support.

You’re referring to an outdated Nextcloud documentation. Nextcloud doesn’t have a build-in function to directly access a Google drive. A 3rd-party app named “External storage support for Google Drive” has been developed 3 years ago by a user. Unfortunately it only supports Nextcloud up to v16.

Maybe this might be a possible solution for you:

As per the 1st option in the guide linked above by j-ed, rclone is a brilliant way to mount Google Drive on a linux system. You can even encrypt the whole drive so that Google won’t have any access to your data (read about encrypted remotes in rclone’s documentation, fairly easy to set up).

Hi J-ed,
thank you so much for your reply.

Your link is very interesting, but I search a different solution.
My solution is to view only a google drive contents and not copy in local.

I’m checking with owncloud, but after I connect to Google Drive I can’t export it as network share.

Hi, Ferrara:
I’ve experienced the same issue. Did you find any solutions to run Google Drive on Nextcloud 19.0.0?

I am running a similar Setup with my Nextcloud and was using it with every version beginning with v14 and now currently v20 - but i am running nextcloud in a docker environment.
i was using the apache version till some time and switched to traefik->nginx->nextcloud-fpm some time ago (was working on both)

What i am doing:

  • creating a rclone crypt mount with my cloud (which one doesnt matter to much) to lets say /media/crypt
  • installing nextcloud via docker compose with your needs (i am using radis and mariadbn, and i am using “user: 1000:1000” which is the same as my local user) and a nextcloud data volume pointing to your local harddrive, lets say /media/data/nextcloud

to get it working with my crypted rclone mount i did:

  1. i was creating my main user at the first nextcloud start and completed the setup till i was in my files overview
  2. i was shutting down my nextcloud docker instance
  3. i moved the files from the internal nextcloud path “/var/www/html/data/USER” - which is in my example “/media/nextcloud/data/USER” to my crypted cloud for example: “/media/crypt/nextcloud/USER”
  4. i added a volume in my docker compose file like:
    • /media/crypt/nextcloud/USER:/var/www/html/data/USER
  5. restart the docker container
  6. (optional) everytime i need a new user, i am creating the user and did steps 3, 4 and 5 again. so for every new user i created a new volume pointing to the desired cloud directory.

additional infos:

  • making a volume to the cloud directory for the complete “data” folder was not working for me, tried it in many different ways
  • creating the user after making the nextcloud volume point is not working, you always need to create the user first, so nextcloud creates the folder structure at your local hard drive, stop the server, move the files and bind the directorys in the compose file or docker start command
  • if you change your files manually, you need to do a occ scan files to see the changes in nextcloud. if you do the changes through a NC client or the webpage or webdav, thats not needed
  • playing videos or music is working without a problem
  • if you have some local space and like to go for the advanced setup (like i did it), you can use mergerfs to merge the local and cloud drive to a single volume which you can use in your docker volume setup and then run a cron job which is uploading your files once in a while (like every day, once a week etc.). the benefit is that newly uploaded files are easier to edit / change and for my experience i am editing / changing files more often in the beginning.
    i am using a systemd service for that like:
    ExecStart=/usr/bin/mergerfs /media/local:/media/crypt /media/merged -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full

Like that my complete Nextcloud user folder is directly in my cloud and if i am uploading files they are directly crypted and saved to my rclone mount, which is working without any issues.
the only thing is that deleting files takes longer, thats why i changed to the FPM version and made some PHP tweaks, now its working much better and my download speeds are normal.

as this is an ongoing question i hope, i could help some of you with their desired setups.

Is this a Google Drive theme? If not please on an own thread. Thanks.

Here a german video with Nextcloud and Google Drive.
Perhaps someone like it. I think also in english language you can interpret the buttons and fields.

If you would read, you would know that i was giving an answer to the questions on that thread, no need for me for a new topic - i was not asking anything - and YES its about gdrive.

your youtube video is completely out of date and that option is NOT availible anymore, since a long long time.

and its a completly different story having gdrive or any cloud storage as external storage or running the nextcloud user files completly on a gdrive / cloud drive.

@j-ed was mentioning that fact earlier
" Nextcloud doesn’t have a build-in function to directly access a Google drive. A 3rd-party app named “External storage support for Google Drive” has been developed 3 years ago by a user. Unfortunately it only supports Nextcloud up to v16."

sometimes its very helpful to just read a thread before answering

Hi @hefamily
no I’m sorry.
I found another solution using only Linux and rclone without Nextcloud