1. Selective Synchronization with Syncthing
Yes, it is possible to set up Syncthing so that not all files are stored across all your devices. Syncthing offers several features that allow you to control which files and folders are synchronized to each device:
-
Folder Sharing Control: You can choose which folders to share with specific devices. When you set up Syncthing on each device, you can decide which shared folders are synced to that device. This means you can have certain folders that are only synced between, for example, your Fedora workstation and your Raspberry Pi, and not to your Android smartphone or Windows PC.
-
Ignore Patterns: Within each shared folder, you can use .stignore files to define ignore patterns. This allows you to exclude specific files or subfolders within a shared folder from being synchronized to a device. The ignore patterns use the same syntax as gitignore, giving you fine-grained control over which files are synced.
To create an ignore pattern:
- Open the Syncthing web GUI.
- Click on the folder you want to edit.
- Go to the "Ignore Patterns" tab.
- Enter the patterns for files or folders you want to exclude.
Examples:
# Ignore all .mp4 files
*.mp4
# Ignore a specific folder
/path/to/ignored_folder/
-
Folder Types: Syncthing allows you to set folders as "Send Only," "Receive Only," or "Send & Receive." This can help control the direction of synchronization and prevent unwanted changes from propagating.
However, it's important to note that Syncthing synchronizes entire files within the shared folders (excluding any ignored files). It doesn't support selective synchronization at the file level where only some files within a folder are synced based on per-device preferences without using ignore patterns.
2. Streaming Media Files without Local Synchronization
Syncthing is designed primarily for file synchronization, and it doesn't support streaming media files without synchronizing them to local storage first. All files that are synchronized by Syncthing are stored locally on each device that shares the folder (unless excluded by ignore patterns).
If you want to access and stream media files stored on your Raspberry Pi without downloading them to your devices, you'll need to use a different solution. Here are some alternatives:
Considerations for Streaming:
-
Bandwidth and Network Speed: Streaming media requires sufficient network bandwidth. Ensure your network can handle the data rates required for smooth playback, especially for high-resolution video files.
-
Security: When exposing services over the network, especially if accessible over the internet, ensure they are secured with proper authentication and encryption.
-
Device Compatibility: Choose a solution that works well with the operating systems of your devices (Fedora, Windows, Android).
Conclusion:
While Syncthing is excellent for keeping files synchronized across devices with control over what gets synced where, it doesn't support streaming files without synchronization. For your use case, combining Syncthing for synchronizing necessary files and setting up a media server or network shares for streaming media files would be the best approach.
Next Steps:
-
Configure Syncthing:
- Set up Syncthing on all your devices.
- Define which folders to sync to each device.
- Use ignore patterns to exclude unnecessary files.
-
Set Up a Media Server or File Sharing:
- Install a media server like Plex on your Raspberry Pi.
- Configure network file sharing with Samba or NFS.
- Ensure your devices can access the shared media.
-
Access Media on Devices:
- Install the corresponding client apps or configure network mounts on your devices.
- Stream media directly without storing it locally.
By combining these solutions, you'll have synchronized access to your necessary files and convenient streaming of your media content across all your devices.