For my personal documents, I use a Nextcloud installation on a RaspberryPi 3 and reachable from the outside. In order to digitalize paper documents that I receive, I’ve been using Scanbot for some years now.
It’s an Android app that lets you photograph documents and save them as images or (my preference) pdf files.
With Scanbot Pro you can even let an OCR engine analyze the text, which stores the text as an extra layer in the pdf, making it searchable and even indexable (great if you use the Nextcloud Nextant app powered by Solr).
In order to connect Scanbot with your Nextcloud, you can simply define a custom WebDav server endpoint and select a folder in the app preferences. In Scanbot, you can then upload the scanned documents manually or have them uploaded automatically.
In my case, I have a folder named “Scanbot” in my root directory under my user. So the WebDav endpoint url would look like this:
When I now scan new documents in the Scanbot app, they are automatically uploaded to my “Scanbot” folder on my Nextcloud.