Scriptor
A self-aware AI who serves as a creative consul and master character builder.
Tags: Character Creator, Self-aware, Card builder
Full Description
Hello, I got a simple SillyTavern "sync" setup working between PC and Android using FolderSync, and thought I'd share the basic idea in case it helps anyone. I know SillyTavern and this community have certainly helped me a lot.
I was hesitant to use the post flair 'tutorial'. This is a collection of information that helped and worked for me, that might have been useful if I'd been able to search and find when I was trying to set this up. I am posting in the hope this helps others but no guarantees!
I've been using this approach for about 6 months. It has had a few hiccups, but it works well for me 99% of the time. My goal was not to run a home server or expose anything over the internet. I just wanted a simple way to backup and move my SillyTavern data between devices. As with the ST install this can be a minor hassle to setup but once working it has so far (knock on head) proved to be fairly hassle free.
This is **not true live sync**. It is more like manual upload/download with overwrite. Potentially one button for upload, one button for download.
The reason I use separate upload and download processes is that I am not always perfectly organized, and this helps avoid most of the conflict weirdness that can happen with true two-way sync.
## Basic setup
1. Using termux on android, I moved my SillyTavern user data folder into a normal Android folder that FolderSync could access.
Run this in termux:
```
mv ~/SillyTavern/data/default-user ~/storage/shared/SillyTavern/data/default-user
```
2. I then used termux to create symlinks (aka folder alias/redirect) from the new folders to the original locations so SillyTavern still sees the files where it expects them.
Run this in termux:
```
ln -s ~/storage/shared/SillyTavern/data/default-user ~/SillyTavern/data/default-user
```
3. Optionally, I also moved the `config.yaml` into the default-user folder. This lets the same config/profile travel between devices, but this step is not needed if you only care about backing up/syncing characters and chats.
4. In FolderSync, I created two separate one-way folder pairs:
`ST-UP`: upload the current device's SillyTavern default-user folder to Google Drive
`ST-DOWN`: download the Google Drive copy and replace the local ST copy
5. For conflicts, I set FolderSync to keep the newest file.
6. I set up similar folder pairs on my PC using the relevant local SillyTavern folder paths.
7. I only run these manually. I try to treat one device as the current "source of truth" at a time.
## My basic rules I attempt to follow
Before switching devices, if I want to continue the same chat, upload from the device I was just using.
Before using the other device, if I want to continue the same chat, download onto that device.
So if I chat on my Android phone and then want to continue on PC, I upload from Android first, then download on PC.
This gives me a portable SillyTavern profile across devices without relying on actual two-way sync that (in my experience) was more likely to cause conflicts and data loss.
NOTE: I am not always super disciplined at this i.e. sometimes I'll go days or even weeks before 'syncing' a device. Generally the time issues will occur is if you are frequently swapping between multiple devices to edit the same chat. If that is your use case, you may be better off with a home server. If you tend to keep chats isolated to specific devices and just want a relatively easy way to backup and sync across multiple instances that is where this method works best.
## Important caveats
* **Make backups before experimenting.**
* At minimum, please back up your key characters and chats by exporting them. Ideally you'd want to back up the entire folders i.e:
* `SillyTavern/data/default-user/characters`
* `SillyTavern/data/default-user/chats`
* This process can overwrite files, so you need to know which device has the newest copy.
* Do not add messages to the same chat on two different devices before syncing, unless you are prepared to choose which version to keep.
* If you do get a conflict, it is usually manageable. You can decide which chat to keep, or rename one if you need both.
* I suggest using a dedicated Google account for this, because FolderSync needs access to your Google Drive.
* Be especially careful if syncing `config.yaml`, as config/settings may not always make sense across every device.
This approach is not perfect. It is crude compared with running a central server, but it works well for my use case: multiple Android phones running Termux-based ST instances, a Windows PC ST instance, a Linux PC ST instance. The Google Drive folder serves as the cloud backup and means to tie them all together.
Happy to share more detail if anyone wants it. I tried to keep this 'tutorial' concise (not very successfully).