Plenty of people upgrade their phones yearly or every two years. Some people upgrade less frequently than that, but the point is that chances are, you've had an old phone lying around that you weren't sure what to do with. While there are a ton of great projects that you can use for your phone, Nextcloud is one that I personally found a lot of interest in. You can basically turn an old phone into a NAS, but in a more robust way than just remotely accessing it and copying files back and forth.
This guide requires your phone to be rooted, but chances are if you have an older phone then it can be. I'm using a OnePlus 11 which is easy to unlock and root, but most smartphones should be in a similar boat as well. As a side note, too, this guide will also launch a Pi-hole server that you can use on your phone.
How to set up Nextcloud on your old phone
We'll be using Pi deploy
Pi-deploy is a fork of Linux Deploy, and what it's built for is to deploy a Raspbian instance with Pi-hole on your smartphone. However, in an update, the developer also added a script to install Nextcloud Pi, too. Nextcloud Pi is just like Nextcloud, except it comes with a full server instance and a management system for your Nextcloud instance. It's often behind on updates from official Nextcloud builds, but that really isn't too much of an issue for the average person.
You can download Pi-deploy from GitHub, and granting it root access will allow it to download and launch a virtualized Raspbian environment. Once Raspbian has started (it can take up to 15 minutes to deploy), you can then use SSH (through Termux, an SSH client, or from another device on the same network) and run pideploy-nextcloud-install to download and install Nextcloud. Your SSH password will be shown in the Raspbian boot-up process, so make sure to take it down. It's only shown once.
Once installed, you can navigate to nextcloudpi.local in your phone's browser and it will bring you to the configuration page for Nextcloud. Save the login details that it gives you, and then login to the admin account with those details. You can then create a new user with a new username and password for accessing on other devices from the primary administrator account.
Once you've set everything up, you can sync your laptop, PC, or phone to your new Nextcloud server running on your smartphone. It will work exactly like you would expect a NAS to work, so that you can backup your files and copy them across your network. You'll be limited by your phone's storage, but that's typically the case with projects like these. For basic backups, it's fine, and it's a project that can teach you more about networking and Linux. Plus, it's pretty cool to have a smartphone be a central server within your home for syncing!
What you learn with this can teach you how to do things with an actual NAS. There are proper operating systems that are actually built for this kind of thing if you wanted to build your own NAS or buy one. It's a fun project, but never rely on this as a sole backup provider for your important files!
