No credit card required · Free platform during early access · You bring the VPS

Google Drive as a backup destination

Overview

WayHost uploads project backups to a folder in Google Drive using OAuth. You create a Google Cloud “Web application” client, paste Client ID and secret into the backup destination, then click Connect.

Redirect URL (required)

In Google Cloud, under the OAuth client’s Authorized redirect URIs, add exactly:

https://host.hamdek.com/api/integrations/google-drive/callback

Also add an Authorized JavaScript origin:

https://host.hamdek.com

These must match the live WayHost site. A wrong scheme or domain causes a redirect_uri_mismatch error from Google.

Create the Google Cloud OAuth app

  1. Open Google Cloud Console and select or create a project.
  2. APIs & Services → Library → enable Google Drive API.
  3. APIs & Services → OAuth consent screen:
    • User type External is fine (use Testing and add test users while developing).
    • Fill app name and support email.
  4. APIs & Services → Credentials → Create credentials → OAuth client ID.
  5. Application type: Web application.
  6. Authorized JavaScript origins: https://host.hamdek.com.
  7. Authorized redirect URIs: https://host.hamdek.com/api/integrations/google-drive/callback.
  8. Create and copy the Client ID and Client secret.

Scope used by WayHost: https://www.googleapis.com/auth/drive.file (files WayHost creates).

Add the destination in WayHost

  1. Open the project → Settings → Backup destinationsAdd destination.
  2. Type: Google Drive.
  3. Paste Client ID and Client secret into the form (stored encrypted on that destination).
  4. Optionally run Test connection, then Save.
  5. In the destinations table, click Connect. You are sent to Google to authorize.
  6. After approval you return to project settings. Status should show Connected.

WayHost creates a Drive folder named like wayhost-<project-slug>-backups under My Drive for that project.

Optional platform defaults

If you prefer one Google app for the whole platform, set in the server .env:

GOOGLE_DRIVE_CLIENT_ID=...
GOOGLE_DRIVE_CLIENT_SECRET=...

Destination-level Client ID/secret still override these when filled in the UI.

Troubleshooting

  • redirect_uri_mismatch — the URI in Google Console must be exactly https://host.hamdek.com/api/integrations/google-drive/callback.
  • Access blocked / testing — add your Google account under OAuth consent → Test users.
  • Connected but uploads fail — re-check Drive API is enabled and click Connect again (tokens expire / revoke).