Mount Google bucket to Mac

Post author
Peter van Galen

***2024 update: there is now an easier GCP-supported setup as pointed out by Simone Di Cola in the comments***

>>>original 2021 post>>>

While it is not officially supported, I was able to mount a Google bucket to my Mac using gcsfuse. First I followed gsutil installation instructions from the article "Moving data between local storage and workspace bucket" (I am working remotely and had to disconnect from the Broad VPN for the gcloud init step). After I got gsutil to work locally, I set out to mount a bucket. Unfortunately, the brew installation of gcsfuse was discontinued in July 2021, so I followed the steps from the "Building from source" section here:

1. Install dependency Go using these instructions

2. Install dependency osxfuse using "brew install --cask osxfuse". I had to go to System Preferences/Security & Privacy/ and "Allow", and needed to run "brew reinstall --cask osxfuse". In the end, the System Preferences had new icons for FUSE and macFUSE at the bottom.

3. I already had git installed.

4. Install gcsfuse using as follows:

GO111MODULE=auto go get -u

5. Add "export PATH="$PATH:$HOME/go/bin" to ~/.zshrc (my local terminal runs zsh). Open a new terminal window.

Now I can mount a bucket as follows:

mkdir ~/gcsfuse
export GOOGLE_APPLICATION_CREDENTIALS="/Users/username/.config/gcloud/legacy_credentials/"
gcsfuse --implicit-dirs <BUCKET> ~/gcsfuse
open ~/gcsfuse

# Unmount
umount ~/gcsfuse

I hope this helps someone.



  • Comment author
    Jason Cerrato

    Thank you for detailing this so clearly, Peter! This will be very helpful for Terra users.

  • Comment author
    Simone Di Cola
    • Edited

    If you landed on this page in 2024, follow these 3 steps, with the precondition that you got brew installed in your machine:

    1. brew install --cask macfuse
    2. brew install go (if you do not have it already installed) 
    3. go install

    Once you have done that, you should have the gcsfuse binary inside the directory ~/go/bin.

    You can now follow the official documentation and mount your bucket. A restart will be necessary to enable the extension, but once you follow the instructions on the screen you are good to go.

    Hope this helps 



    Peter van Galen feel free to use the above steps to update your blogpost.


Please sign in to leave a comment.