OK, so you've got a Nextcloud server set up, ready to back up and store all of your files. Now what?
There's a lot of reasons you'd want to sync files from your Android device to your Nextcloud server: backing up photos/screenshots, storing notes or other files that others have sent you, and the list goes on.
In this post, I'll cover 2 ways to get files from your device to your server: one will be for an automated upload for a directory on the device, and the other will be by manually uploading files of your specific choosing.
Backing up files from your devices to Nextcloud
The first step in this process will be to get files from your device onto the Nextcloud server that will be connected to PhotoPrism.
Prerequisites
There's one thing that you'll need to get started:
A running Nextcloud server
This guide will assume that you've already got a running Nextcloud server on which to store your photos.
If not, there are a lot of ways to get this set up, but it's out of scope for this post. I'd recommend with starting with the official documentation here and, for making it available on the public internet, my previous post about setting up a reverse proxy in Docker using Cloudflare here.
All other setup will be handled through the guide.
Setting up file sync from your device to Nextcloud
There's a few different ways to do this: an automatic way, for automatically uploading all files from certain directories on your device to Nextcloud (and ultimately PhotoPrism), or a manual way. We'll cover both here.
Install and log in to the Nextcloud app
First things first, go out and get the official Nextcloud app for your device.
- Android: https://f-droid.org/packages/com.nextcloud.client/
- iPhone: https://apps.apple.com/us/app/nextcloud/id1125420102
Once it's installed, you can open it, and you'll have to enter your server URL, and you'll then be directed to the login page through your browser to authenticate your session.

Option 1: Configure automatic uploads from the device to Nextcloud
This is my preferred method, because I like automation. We'll be setting up the Nextcloud app so that files in your device directory will automatically be uploaded to Nextcloud.
To set up auto-uploads in the Nextcloud app:
- Press the hamburger menu button in the top left of the screen

- Press Settings
- Press Auto upload (under Sync)
Here, you'll see a list of all of the file libraries that the Nextcloud app automatically discovered on your phone. Simply find the folder which is holding the files (usually DCIM/Camera for photos on Android devices), and click the Cloud symbol in the top-right.

Then, press the ellipses in the top-right of the folder, and tap Configure.
Select the destination on the Nextcloud server for your files if you'd like (Nextcloud will put them in a pre-defined default folder if you don't).
Take a look through the other settings and configure them to your liking. Personally, I set up different sub-folders at the Year/Month level to help keep things organized on the back-end, since I primarily use this for storing my photos.
Here's my complete settings:

Click Save, and you're done! Nextcloud will begin uploading files from this directory onto the server, and any files that are added into that directory in the future will also be added.
Option 2: Manually upload photos to Nextcloud
This is my wife's preferred way of doing this. Since she's not as invested in the PhotoPrism collection as I am, and she has her own collection on her iPhone, she simply chooses individual photos that she wants to share with me an uploads them that way.
Here's how we have it set up.
Create a folder on Nextcloud as the target for the uploads
Same as above, and if setting this up across multiple devices, you can even use/re-use the same folder.
Since I set up the /Photos/Camera directory to sort my files into sub-folders however, I created a separate directory at the root of Nextcloud to make it easy to find and upload.
Upload the files as needed
The only next step here is to upload the files from the device to Nextcloud when needed.
We find that it's easiest to do this from the Gallery app itself. Simply bulk select the photos that you want to upload, tap the share button, tap Nextcloud, navigate to the target directory, and press Upload. That's all there is to it!
Conclusion
In this post, I showed how to set up automatic uploads of files from an Android device onto a Nextcloud server. My primary use for this is to get back up files from my phone onto my server so that I can curate them in my collection.
What are you using Nextcloud's auto upload functionality for? Let me know below.