[GUIDE] Getting google drive sync plug-in to work across all devices with the option for backups for Windows and iOS syncing (with multiple iOS devices)

This is both a guide and steps to allow backups (as an option) for users. It also shares some insights and things I learned about how the plug in works and a few things that confused the hell out of us when we were setting it up. (I’m still new to this forum so pardon my formatting)

The plug in: Google drive sync by Richard Xiong.

Caveats and preface:

  1. Yes, please support the obsidian sync option if you can, it supports the developers. I understand that this isn’t immediately an option for others hence the guide.
  2. There are limitations to the iOS system that are very confusing at first but I’m inserting explanations and workarounds on this and a few tips as well (just for good file housekeeping).

Prerequists and timesavers:

  1. Have obsidian on all your devices.
  2. Have the google drive application installed on all your devices as well.
  3. Be signed in (I write this down because i’m an idiot sandwich and forgot to do so PLUS it helps to have everything already synced)
  4. Have a backup of your files (in case things go wrong) ← they have for me multiple times cuz i’m not the smarted bulb in the lightshow.

Steps to getting it to work


Step 1: creating your global vault. (windows)

  • I recommend making your vault using your desktop setup (it’s really just easier with a keyboard than a touch screen).
  • Create your global vault and pick it’s location. For sake of example I named my vault “Vaulty McVaultFace”, my actual vault that I have been using was called “HairOfBeccaKeeperOfSecrets”. You can start with a current vault but that’s very risky. (if you’re too not familiar it’s on the lower left with the manage vaults section at the bottom).
  • (optional but how I chose to do integrate it) Instead of c:\My documents\ I chose to save my vault in google drive’s location.

this builds the framework for the automatic google drive backups on your main vault. It’s optional but since you’re setting it up, you can choose to do so. Keep in mind google drive’s file limit. Mine’s only 15 gigs.

Step 2: delete the note that is automatically created when you make a new vault.

  • it’s a requirement to be able to get the plug in to work smoothly that your main vault is completely empty.

Step 3: Go to settings (the cog on the lower left), select community plugins (under options), and enable plugins.

Step 4: Find google drive sync by Richard Xiong aka richardx366 in the community plugins through the search bar.

Step 5: Install → Enable → select Options.

  • This is where you’ll get your authentication code from the plugin’s developer’s page.

Step 6: Get your authentication token. On upper left, select Get refresh token (this will open a browser window). It will ask you create a login authentication by authorizing your google account. Copy the code that’s created.

Step 7: go back to the obsidian plugin page of google drive sync and paste this code on the refresh token field and press enter.

if you closed it out by accident, don’t worry you can find it again the same way you got to the community plugins area through the settings.

  • a tiny popup notification will ask you to restart obsidian on the upper right.

Step 8: Relaunch obsidian and you’ll notice a small syncing symbol is now present on the left side bar section. CLICK THAT SYNC BUTTON. Treat this like your save button. :slight_smile: i’ll go back and explain this later.

! At this point you’re like 70% done ! By clicking the sync button you set the baseline for the plugin to work.

Step 9: Make sure your google drive application is installed, signed in, and synced (iPad / iPhone).

Step 10: Launch your obsidian app and create a new vault but MAKE SURE YOU DON’T HAVE ICLOUD SELECTED. it will cause problems like it did for me. You’re free to delete that one and just create a new vault if you accidentally anyway.

Note: You can name this vault anything really. For simplicity let’s also call this Vaulty McVaultFace as well.

  • you’ll notice that you couldn’t select the location where you want your vault saved. This is that limitation i mentioned earlier.

Step 11: Do the thing with the plugins like did on desktop obsidian. Click the settings symbol (the cog), go to community plugins, allow the community plugins, find, install, and enable google drive sync plugin.

Step 12: Access options section and select get refresh token. This will pop up a browser onyour ipad / device. Sign in on your device (the ipad) and copy the code.

Note: You’ll notice that the authentication key is exactly the same as the one you got when you authorized the plugin on your desktop. If you think you’re being clever and can just send it to yourself via some messaging tool, don’t do it. It creates some weirdness (i’ll circle back to this later in troubleshooting).

Step 13: Paste your authentication code on the authentication key field and you’ll see another popup saying relaunch your Obsidian.

I suggest exiting and actually closing the application rather than simply navigating out of it. Apple is weird like that and some users are as well (i honestly just navigated out the first few times cuz i’m not a native apple user).

Step 14: Confirm that your sync worked before we celebrate.

  • on your windows obsidian, create a note. Add a title like “Did you hear about the circus fire?” and in the note write “it was in tents”.

  • click on that sync button on the left side (again we need you to start treating that like a save button).

This will open a prompt question asking if you want to confirm the sync and such. You’ll see this every time you select it.

  • once it’s finished syncing, check your ipad. Nothing happens!

  • you need to click the sync button to let the plugin know that you want it to update.

The plugin only re-syncs when you first launch the obsidian program on your ipad, so any other refreshes must be done by manually pressing the sync button.

At this time, on your ipad it should show the test file you created.
you know… the one about the circus fire and being in tents? (get it???)

! at this point you’re 90% done !
huzzahhh!!! but wait… I already have a vault with my stuff in it! How do i transfer that stuff???

You can actually just copy your files over but there are some notes that I’m circling back to that will help remove a lot of confusion before you do.

How the plugin actually works:

Clarifications:

  1. When you allow the plugin authorization, you’re actually giving it permission to create a copy of your vault onto your google drive that it can sync discretely.
  • Let’s say you followed the instructions but didn’t want to create a backup on your google drive.

the plugin would read your vault name in your C:\My documents\VaultyMcVaultFace and create a copy of it INTO google drive. You will see that your google drive has a folder now called VaultyMcVaultFace in your my drive folder.

whenever you click the sync button, it then saves that copy to your google drive with the same folder name.

  1. But what about my ipad? It also does the same thing. It takes a copy from your ipad files and creates another copy of that filter that can be synced to your google drive.
  • you can see this by checking google drive itself after you’ve done the steps. It’ll show your VaultyMcVaultFace (windows google drive folder), and VaultyMcVaultFace 1 (the vault folder you had in your ipad).

Isn’t that confusing? Yes very. So what I ended up doing is renaming the ipad vault folder name in google drive to IpadVaultyMcVaultFace after making sure that things were syncing properly.

Note: it turns out, that the folders created by the plugin doesn’t care what you rename it AFTER you’ve done the sync. having their own separate naming just prevents further confusion.

  1. But didn’t you create your vault in your google drive?

Yes, because for my personal needs - I prefer to have my google drive backup my obsidian notes online via google drive. Because the vault was already in google drive, the plugin did not need to create another folder in order to sync it. It used the folder I created ahead of time before authenticating.

  1. Cautionary mistakes I’ve made:
    a. being lazy and referencing the vault created by the plugin. - Started over, tried to do it the other way around. Ipad first, authenticate and sync. → On my desktop, be lazy and know that google drive already created the directory from the ipad… and chose Create vault from folder. This becomes an issue. the plugin will get updates from ipad no problems. but If i were to sync my files from desktop to other devices, it would have a recurrence and create another copy. resulting in 2 files (e.g. Did you hear about the circus fire 1 and did you hear about the circus fire
    2.) Why does it do you dirty like that? I honestly don’t know… remember i’m the idiot sandwich that took 4 hours trying to get this to work.

Lesson: don’t create your vault to a folder that was created by the plugin.

b. copying MD files before syncing intially. - I honestly don’t know what the real difference is exactly but my best guess it that the plugin creates a baseline on what is in the folder after it’s initial sync. If you are like me and are a old impatient fart and copy your backup files to the vault you want to save before syncing, it won’t recognize the files to be synced. Yes it will show you on your desktop obsidian. But it will never sync with your ipad.

Lesson: Don’t copy your .md files before syncing and confirming both devices work. Only copy your markdown files after you’ve done the intial sync. It’s also best practice to sync your obsidian application (in windows) after copying it to make sure that the syncing actually took place. it sometimes doesnt show up if you don’t…

Parting notes so far:

  • The plugin creates google drive folders for you IN your google drive. It doesn’t do this because of bad design but because it has to. iOS architechture literally doesn’t allow programs to reference other file locations.
  • Syncing to more devices means you’ll have more copies of those vaults in your google drive. (i’m still not entirely sure how to get around this).
  • i keep my synched global vault in my google drive to have the backups (and shut off the program if i want to save bandwidth) to save on space.
  • In chosing between this method and the icloud method; the manual update stops that nightmare from happening of creating multiple recurring files.

p.s. I just realized after typing this that i really am an idiot sandwich and i could have created this guide on obsidian and not the forum webpage cuz they’re both MD format. it’s late, i lack sleep, i’ve been at this for hours. i’ll try to give an update to this in the comments after i’ve done testing with my friend on the Relayplugin. and stress testing this with a windows pc, an android phone, an iphone, and ipad all at once.

I hope this helps you guys. If there are better ways, please let me know.
sorry for formatting, i’m not sure how i can insert pictures to the guide.