Yes, this can work. I use a very similar setup myself.
My stashapp runs in Docker on an RPi 5 with the drives mounted locally. From my PC, I connect to those drives over SMB. On the PC, I run the Windows version of Stash with the libraries added through the network path. Then I generate previews, run scraping, make manual edits if needed, and finally do a full export from the settings tab.
After that, I run a simple script from PowerShell that compares the data, finds new files in Generated and Metadata, and creates archives with only those new files. In practice, you could also skip that part and just copy the entire Generated folder to the server and archive the Metadata folder as is, but I ended up using a more selective workflow.
After some trial and error, this is the migration process that works reliably for me:
-
Stop the stashapp Docker container on the RPi.
-
Copy the Generated files from the PC to the RPi.
-
Start the stashapp Docker container again.
-
Open Stash in the browser and run Import from File with these settings:
Duplicate object handling: Ignore
Missing reference handling: Fail
Then select the metadata archive created on the PC.
-
Refresh the Scenes page and confirm that the metadata import and generated assets were applied correctly.
-
Run a library scan on the RPi with all generation-related options disabled, including re-scan or regeneration options.
During the scan, Stash notices that the file path is different and corrects it automatically. After that, refresh Scenes again, open any video, and verify that the path now points to the local storage on the server instead of the Windows network path.
A couple of extra notes:
-
If some videos appear duplicated after the import, run Maintenance → Clean.
-
If previews or sprites are missing, stop Docker again and fully replace the Generated folder.
Refreshing the Scenes page between steps is probably not strictly necessary, but I still use it as a checkpoint to make sure each stage completed correctly.
Edit: I finished a fully automated Python script for exporting generated files and metadata from a Windows PC to a remote Stashapp. It completely replaces the manual steps above!
It handles everything automatically: zips only the modified files, transfers them via SFTP, restarts Docker, imports metadata via the Stash GraphQL API, and triggers the library scan.
Setup:
Install Python on your PC.
Open the script and edit the SETTINGS block at the top (local/remote paths, SSH credentials, and your Stash API Key). (Missing dependencies will auto-install on the first run).
Usage:
Smart Sync: Run python stash_export.py. It does the entire process (Delta zip → SFTP → Docker restart → API Import → API Scan) with zero clicks.
Manual Mode: Run python stash_export.py -export to skip the local file scan. It will open native file dialogs so you can manually select generated and Metadata ZIPs to upload.
stash_export.py (22.7 KB)