Skip to content

How to sync using Google Drive

This guide explains how to sync KeePassium database with other devices using Google Drive cloud storage.

KeePassium supports two synchronization methods for Google Drive:

Method 1: Direct connection

With this method, KeePassium communicates directly with Google's servers. This way, the app has full control over data transfer and does not depend on other apps. As a result, the direct connection is more reliable than via the Files app.

To sync your database from Google Drive, follow these steps:

  • Go to Databases screen
  • Tap +Connect to Server
    • If asked, allow network access.
  • Select your cloud storage type
  • KeePassium will ask you to log in to your cloud account
  • Navigate to your database file and select it

Privacy

When you sign in to Google, it gives KeePassium an access token that allows future connections. The app does not see nor store your Google account password.

Method 2: Integration with iOS Files app

With this method, KeePassium works offline and delegates synchronization to Google Drive app. This is easier to set up, but less reliable than the direct connection method.

  • Install Google Drive app and log in to your account
  • Open KeePassium, go to Databases screen (tap < Back if necessary)
  • Tap +Open Database
  • If Google Drive is not visible in the list, make it visible
  • Select your database file

Troubleshooting

Does not work offline

Google Drive does not work offline, even if the database file was "Made available offline".

"Unsupported file type" when selecting a database

This is caused by the Privacy Screen in Google Drive. This feature blocks access to files from other apps, such as KeePassium. When you open a file selection dialog in KeePassium, the system shows “Authentication required”. When you tap “Open Google Drive” in that dialog — you switch from KeePassium to Google Drive app. When you select a database, Google Drive complains it does not know anything about .kdbx files.

The solution is to turn off the Privacy Screen in Google Drive settings.

Google Drive does not respond

This often happens after you add your database to KeePassium and then enable the Privacy Screen in Google Drive. The Privacy Screen blocks access to Google Drive files from other apps. As a result, Google Drive does not respond to KeePassium's attempts to read the database.

The solution is to turn off the Privacy Screen in Google Drive settings.

Limitations for shared files

Google Drive does not expose shared files to the Files app, so they cannot be added to KeePassium directly.

Partial workaround: Google Drive app → Shared… for the shared file → Add shortcut to Drive. This will make the database accessible to the file system, Files, and KeePassium. Unfortunately, shortcuts seem to be read-only, so KeePassium will not be able to save the database.

FUSE filesystem over Google Drive (google-drive-ocamlfuse)

If you use google-drive-ocamlfuse with KeePassXC, KeePassium might often complain that Google Drive does not respond. The detailed diagnostic info shows that the database file has been deleted:

Error Domain=NSCocoaErrorDomain 
Code=4101 "Couldn't communicate with a helper app"
UserInfo={
  NSUnderlyingError=0x1234ABCD {
    Error Domain=trash 
    Code=0 "(null)"
  }
}

The reason is that google-drive-ocamlfuse creates a new file ID when KeePassXC saves the database. Since KeePassium tries to access the database using an old reference, Google Drive repots that the old file has been deleted.

The solution is to open ~/.gdfuse/default/config and set mv_keep_target=true.

See also