With OpenTodoList, you can manage your notes, todo lists and images in libraries. And you decide, where these libraries are stored:
You can sync your libraries with one of the supported services like NextCloud or ownCloud. Or you can decide to keep your files entirely local on the device where you use the app. Finally, as libraries are just plain files stored in a directory structure, you can use other apps, like Foldersync to keep them in sync with services not supported natively by OpenTodoList.
OpenTodoList is open source - at any time, you can study the code, build the app on your own and even extend it on your own. Visit https://gitlab.com/rpdev/opentodolist to learn more.