1. Install Nextcloud Server.
2. Install the Nextcloud Client on your phone.
3. Set up autosync of media files (photos, videos) with local deletion enabled.
Bonus Tip: Don't expose your Nextcloud server over the public Internet, hide it behind a Pfsense firewall and keep a persistent VPN connection open.
This way you never keep personal or private data on your phone. The moment you take a photo, it's immediately synchronized to your server and deleted afterwards.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!