Nextcloud on Android


Set up a Nextcloud server and development environment on your Android device. This is useful if you are on the move and need to test things, or have an extra device you want to use as your own server.

Clone code using MGit (optional, you can also just use the terminal)

  • Set “root storage location for repos” to something like /storage/emulated/0
  • Clone with: Remote URL, Local Path nextcloud (doesn’t support 2FA – if you use that get an app token and log in with that)
  • Clone the 3rdparty submodule too, local path nextcloud/3rdparty

Install (and optionally clone as well) with Termux

  • First install some dependencies pkg install php php-fpm sqlite coreutils openssl-tool
  • Allow Termux to access storage outside of own folder termux-setup-storage
  • (If you want to clone with Termux: cd /storage/emulated/0/ && git clone nextcloud)
  • Get the Nextcloud submodules cd /storage/emulated/0/nextcloud/ && git submodule update --init
  • Start the server php -S -t /storage/emulated/0/nextcloud/

Finish setup in Firefox

  • Go to
  • Set an admin username and password in the
  • (SQLite will be used as database)

Now you can check out branches and test them, or even edit files in some code editor. :)



Rojen Zaman

Anarchist | GnuPG: 0x9089BB25

How to change author of all commits?

Redirecting One Domain to Another Domain on Cloudflare