blackdark
Tools

9Drive GitHub: Merge Google Drive Accounts for Free

Official 9Drive GitHub link, what it does and how to install it with Docker, set up Google OAuth and fix common errors to pool several Drive accounts.

By Updated on 9 min read
Jump straight to the 9Drive link

Official 9Drive GitHub link: github.com/zenhosta/9drive. Every Google Drive account gives you 15 GB for free. Having four accounts is easy; using them is the annoying part: log into one, check if the file fits, log out, try the next… 9Drive pulls all your accounts into a single dashboard, adds up the space, and decides on its own which account stores each file.

It is free, open source, and self-hosted. This guide covers what it does, how to install it, how to create the Google credentials (where almost everyone gets stuck), the most common errors, and how it compares to MultCloud and rclone. Everything is based on the official README and the repository's public issues.

The reel where I showed it

9Drive (zenhosta/9drive)

Go to the GitHub repository

Free and open source · Apache-2.0 license · Credit to Zenhosta

What is 9Drive

9Drive is a web app that works as a storage gateway: you connect several Google Drive accounts and it presents them as if they were one. From the same dashboard you can:

  • See the total space and what's left in each account.
  • Upload files without worrying about which account has room.
  • Organize them in virtual folders, preview, rename, move, or delete them.
  • Share file links and check a quota history per account.

It's not limited to Google Drive either: it also supports S3-compatible storage such as Amazon S3, Cloudflare R2, Backblaze B2, Wasabi, or MinIO.

Note

Quick math: 4 accounts × 15 GB = 60 GB in one dashboard, with no subscription.

How it works under the hood

What happens when you upload a file

  1. You connect your accounts

    Sign in with Google and your first Drive connects automatically; add the rest from the dashboard.

  2. 9Drive tracks the space

    It keeps count of used and free quota on every Drive or S3 storage.

  3. It picks the destination

    Based on the rule you choose: most free space, round-robin, or your priority order.

  4. It streams the upload

    The file passes through your server without touching its disk and lands in that account (in a folder called 9drive).

The key point for privacy: files are not kept on the server's disk. They pass through the server you install and go straight to your Drive or S3 storage. If you change something by hand inside the 9drive folder in Google Drive, the Sync Drive button brings it back into the dashboard.

For more technical users, there is also an upload API for your own tools (POST /api/v1/uploads with API keys), with cURL and JavaScript examples inside the app.

How to install it with Docker (the easy way)

You need Docker installed. The repository includes everything to run the database (MySQL), the backend, and the web app together.

  1. Clone the project and enter the folder:
git clone https://github.com/zenhosta/9drive.git
cd 9drive
  1. Prepare the config by copying the example file (on Windows PowerShell: Copy-Item .env.docker.example .env):
cp .env.docker.example .env
  1. Edit .env: set long random strings (32+ characters) for JWT_ACCESS_SECRET and TOKEN_ENCRYPTION_KEY. You can leave the Google credentials (GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET) blank for now and add them later from the app.

  2. Start everything:

docker compose up -d --build
  1. Open http://localhost:5173 and create your account. The backend runs at http://localhost:4000 and MySQL on port 3306.

You can also run it without Docker: you need Node.js 20+ and MySQL 8+, and the repo ships a script (setup.sh on Linux/macOS, setup.ps1 on Windows) that writes the .env files and installs dependencies. The exact steps are in the README.

Tip

Don't want to fight the terminal? Open Claude Code, paste the repository link, and say: «install this with Docker and walk me through it step by step». It explains every step, including how to create the Google credentials.

Google Cloud OAuth credentials, step by step

This is where most people get stuck. For 9Drive to access your Drives, it needs a free OAuth client created in Google Cloud Console (note: not Google Search Console). According to the README, you do it once and it takes about 10 minutes.

Google credentials for 9Drive

  1. 1. Create or pick a project

    At console.cloud.google.com. The OAuth client and the Drive API must be in the SAME project.

  2. 2. Enable the Google Drive API

    APIs & Services → Library → Google Drive API → Enable. It can take a few minutes to take effect.

  3. 3. OAuth consent screen

    User type External, app name, support email and developer contact. Add the Drive and profile scopes.

  4. 4. Test users

    While the app is in Testing mode, add EVERY Google account you plan to connect.

  5. 5. Create the client ID

    Credentials → Create credentials → OAuth client ID → Web application. Add the origin and redirect URI.

  6. 6. Paste it into 9Drive

    Settings → Google Credentials: Client ID, Client Secret and Redirect URI → Save Configuration.

These are the three scopes the README asks for on the consent screen:

https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile

And on the client ID (local install):

  • Authorized JavaScript origin: http://localhost:5173
  • Authorized redirect URI: http://localhost:4000/connected-accounts/google/callback

Copy the Client ID and Client Secret and give them to 9Drive in one of two ways:

  • In the app (easiest): log in, go to Settings → Google Credentials, paste the Client ID, Client Secret, and Redirect URI, and click Save Configuration.
  • From the terminal: put them in .env and run docker compose exec backend npm run seed:google-config (or npm run seed:google-config inside backend/ if you're not using Docker).

The credentials are stored encrypted in MySQL. Then add each account under Settings → Connect Drive and choose how uploads are distributed in Quota Tracker.

Note

If you deploy it on a server with your own domain, replace localhost with your public URLs in three places in .env: FRONTEND_URL, VITE_API_URL, and GOOGLE_REDIRECT_URI, and also in the authorized origins and URIs in Google Cloud. Put it behind HTTPS and don't expose the MySQL port to the internet.

Common errors and how to fix them

Taken from the README's troubleshooting section and from the repository's open and closed issues:

Error or symptomCauseFix
«Google Drive API has not been used in project… or it is disabled»The Drive API is not enabled in the same project as the OAuth clientEnable it under APIs & Services → Library in the same project and wait a few minutes
«Access blocked… Error 403: access_denied»The consent screen is in Testing mode and that account isn't a test userAdd the account under OAuth consent screen → Test users
Unverified app warning when connecting Drive (issue #18)It's your own OAuth app, not verified by GoogleExpected for personal use: if the app is yours, continue via «Advanced». To open it to other people, Google may require verification
redirect_uri_mismatchThe redirect URI doesn't match the one in Google Cloud character for characterUse the exact same URI in Google Cloud, in 9Drive's Settings, and in GOOGLE_REDIRECT_URI
The web app still calls the old API URLVite bakes VITE_API_URL in at build timeRebuild the frontend or run docker compose up -d --build
prisma generate fails on WindowsA running Node process is locking the fileStop the dev servers and run npx prisma generate in backend/
«stream.push() after EOF» on upload (issue #2)Upload bug that has been fixedUpdate to the latest main (git pull and rebuild)
The demo at 9drive.zenhosta.com shows 502 or «Host error» (issues #12, #20, #24, #26, #27)The demo server is down, not the codeHost it yourself: the demo isn't reliable for real use

Tip

To see what is actually failing, check the backend logs: docker compose logs -f backend.

Security and Google's terms: what you should know

  • You grant full Drive access. The auth/drive scope lets 9Drive read, create, and delete files in those accounts. Only run it on a server you control and don't share the dashboard with anyone you don't trust.
  • Protect your secrets. Never push .env to GitHub or share TOKEN_ENCRYPTION_KEY, JWT_ACCESS_SECRET, or the Client Secret: with them, your account tokens can be decrypted.
  • There's an open bug that can delete files. Issue #21 (open as of today) reports that deleting a virtual folder also removes its files from Google Drive, even though the warning says otherwise. Until it's fixed, move files out of a folder before deleting it and keep backups of anything important.
  • It's not a backup. Each file lives in a single account: if you lose that account, you lose what's in it.
  • Google's terms. Connecting several of your own accounts through the official Drive API is what 9Drive does, but Google can limit or suspend accounts it considers abusive or mass-created to get around limits. Review the Google Terms of Service and Google Drive's additional terms before setting it up, especially for business use.

9Drive vs MultCloud vs rclone

9DriveMultCloudrclone
What it isSelf-hosted web appThird-party web serviceCommand-line tool
PriceFree (Apache-2.0)Limited free plan and paid plansFree (open source)
Pool space from several accountsYes, one dashboard with automatic routingManages several clouds in one place and transfers between themYes, with its «union» backend
Where your files travelThrough your own serverThrough MultCloud's infrastructureThrough your own machine
DifficultyMedium: Docker + Google CloudLow: sign up and connectHigh if you don't use a terminal
Best forOne «big Drive» with a nice interfaceMoving or syncing between clouds without installing anythingBackups, syncing, and scripts

In short: if you want nothing to install, MultCloud; if you live in the terminal and want to automate backups, rclone; if you want your own dashboard that adds up your accounts' space and routes uploads automatically, 9Drive.

Who it's for (and who it isn't)

It's a fit if:

  • You have several Google accounts and want to use all their free space.
  • You're comfortable with Docker or have a small server to keep it running.
  • You'd rather your files didn't go through a third-party service.

It's not a fit if:

  • You want a one-tap mobile app: you set this up yourself (though you can use it on your phone as a PWA afterwards).
  • You don't want to touch Google Cloud to create the credentials.
  • You need redundant backups: 9Drive distributes files, it doesn't duplicate them.

Credits

9Drive is a project by Zenhosta, released under the Apache-2.0 license. All the code and documentation are on GitHub; there's a demo at 9drive.zenhosta.com, although according to the repository's issues it has had outages for a while. If it helps you, give the repository a star.

FAQ

The official repository is github.com/zenhosta/9drive. It is published by Zenhosta under the Apache-2.0 license and contains the code, the README with install steps, and the issue tracker.

A free, open-source web app that combines several Google Drive accounts (and S3-compatible storage) into one dashboard. You see the total space, upload files, organize them in virtual folders, and the app decides which account stores each file based on free space.

Yes. It is open source under Apache-2.0, so you can use and modify it at no cost. What you need is somewhere to run it: your own computer or a server (a cheap VPS is enough).

They go through YOUR server, the one you install, but they are not written to its disk: they stream straight to your Google Drive (into a folder called 9drive) or to your S3 storage. No third-party service sits in the middle.

In Google Cloud Console: create a project, enable the Google Drive API, configure the OAuth consent screen as External with the Drive and profile scopes, add your accounts as test users, and create a Web application OAuth client ID with the redirect URI http://localhost:4000/connected-accounts/google/callback. Then paste the Client ID and Client Secret into 9Drive's Settings.

Because your consent screen is in Testing mode and that Google account is not on the test users list. Add it under OAuth consent screen, Test users, and try again.

In concept, yes: both bring several clouds together in one place. The difference is that MultCloud is a ready-to-use paid third-party service, while 9Drive is self-hosted, free, and your files never go through another company's infrastructure.

Keep digging into the same topic.

Share
Newsletter

Get the next guides in your inbox

AI and marketing ideas and resources, no filler. What works and how to apply it.

Ideas and resources, no spam. Unsubscribe anytime.

Finding this guide useful?

Subscribe