Google Photos surpassed 1 billion users by 2019, and for good reason: it was free, unlimited, and effortless. Then Google ended free unlimited storage in 2021, and suddenly your 15 GB cap started filling up fast. Add growing discomfort about a single company scanning, analyzing, and monetizing your personal memories, and the appeal of self-hosting starts to make sense.
Nextcloud — an open-source platform with over 400,000 active installations as of 2023 — gives you a Google Photos alternative that runs on hardware you control. No subscription fees. No facial recognition algorithms feeding ad profiles. No terms of service changes that alter how your data gets used.
The migration isn't trivial, but it's also not as hard as it sounds. What follows is a practical, step-by-step guide to moving your entire photo library from Google to Nextcloud.
Key Takeaway: You're trading convenience for control. The migration takes effort upfront, but once it's done, you own your photos outright — no recurring fees, no privacy trade-offs.
Google Takeout is the official export tool, and it's the only reliable way to get your photos out of Google's ecosystem. The interface is clunky, but it works.
Google will email you when the archive is ready. For large libraries, this can take hours or even days.
Google Takeout caps each archive at 50 GB. If your library exceeds that — say a 200 GB collection — you'll get four or more separate ZIP files. A typical smartphone photo runs 2–5 MB, so 100 GB translates to roughly 20,000–50,000 images. Plan accordingly.
The JSON files are critical. Google stores album membership and some metadata outside the image files themselves. Without processing those JSONs, you'll lose album organization and some date information.
Key Takeaway: Always export in original quality. Compressed exports permanently degrade your photos, and you can't undo it later.
Before you upload a single photo, your Nextcloud server needs to be ready. This step prevents headaches later.
Estimate your total photo library size, then add 20% overhead for thumbnails, previews, and database growth. A 500 GB photo library needs at least 600 GB of usable storage. Nextcloud generates preview images for every photo, which can add significant space depending on your configuration.
If you're running Nextcloud on a Raspberry Pi with an external drive, make sure the drive is formatted with a filesystem that supports large files (ext4, Btrfs, or XFS — avoid FAT32).
Key Takeaway: Don't skip the preparation. Importing 50,000 photos into an underpowered or misconfigured server will cause timeouts, failed uploads, and database errors.
Once your Takeout archives arrive, you need to unpack and organize them before uploading.
Download all ZIP parts to a local drive with enough free space. If you have 10 files named takeout-20240101T120000Z-001.zip through -010.zip, extract them all into the same parent folder. Most archive tools (7-Zip, WinRAR, macOS Archive Utility) handle multi-part extraction automatically if the files are in the same directory.
After extraction, you'll typically see a Takeout/Google Photos/ folder containing:
Photos from 2023/ — chronological foldersAlbums/ — one folder per albumGoogle's export structure is inconsistent. Some photos appear in both the chronological folder and an album folder. Some albums contain copies, not references. You'll likely need to deduplicate after import.
This is optional but recommended. Third-party tools like google-photos-takeout-helper can read the JSON files and write the metadata back into each photo's EXIF data. This preserves:
Without this step, Nextcloud may use the file modification date instead of the actual capture date, scrambling your timeline.
# Example using google-photos-takeout-helper
gpth process --input ./Takeout/Google\ Photos --output ./processed
Run this on a copy of your data, not the originals. Verify a sample of photos before processing the entire library.
Key Takeaway: Merging JSON metadata into EXIF before upload saves hours of manual sorting later. Nextcloud's timeline depends on accurate capture dates.
You have four main options, depending on library size and technical comfort.
Drag and drop files into the Nextcloud web UI. Works fine for a few hundred photos. Beyond that, browser timeouts and memory limits become problems. Not recommended for libraries over 5 GB.
Install the Nextcloud desktop client, point it at a local folder containing your extracted photos, and let it sync. This is the most user-friendly approach for libraries up to a few hundred gigabytes. The client handles chunked uploads, retries, and conflict resolution automatically.
Setup:
For libraries over 500 GB, the fastest method is to bypass the upload process entirely:
/var/www/nextcloud/data/username/files/Photos/)chown -R www-data:www-data /path/to/filessudo -u www-data php occ files:scan --all
# Or for a specific user:
sudo -u www-data php occ files:scan username
This tells Nextcloud to index the files without uploading them through the web stack. It's dramatically faster for large libraries.
rclone supports WebDAV as a backend, letting you transfer files from Google Drive, a local disk, or cloud storage directly to Nextcloud:
rclone copy /local/photos nextcloud:Photos --progress
This is useful for scripted or automated transfers, especially for ongoing syncs.
Key Takeaway: For libraries over 500 GB, direct file placement with
occ files:scanis the only practical method. Uploading terabytes through a web interface will fail.
Once your photos are indexed, the Nextcloud Photos app takes over.
Nextcloud's Photos app groups images by date, similar to Google Photos. This works best when EXIF data is intact. If your photos show up under the wrong dates, the JSON metadata merge step (Section 3) was likely skipped or failed.
You can create albums manually, add photos to favorites, and share albums with other Nextcloud users. Album creation is manual — Nextcloud doesn't automatically recreate your Google Photos albums unless you script it or use a tool that reads the JSON album data.
For large libraries with many albums, consider a script that reads the JSON files and creates corresponding albums via the Nextcloud API or occ commands. This is advanced but saves significant manual effort.
Nextcloud reads EXIF data for:
Ensure your photos have clean EXIF data before import for the best results.
Key Takeaway: Nextcloud's Photos app is functional but less polished than Google Photos. Expect to do more manual organization, especially for albums.
The whole point of this migration is to stop relying on Google. That means configuring your phone to upload new photos directly to Nextcloud.
Download the Nextcloud app for iOS or Android. Connect it to your server using your credentials or a generated app password.
On Android, you may need to disable battery optimization for the Nextcloud app to ensure background uploads work reliably. On iOS, background uploads are more restricted — the app uploads when opened or when iOS permits background activity.
Test the setup by taking a photo and confirming it appears on your server within a few minutes.
Key Takeaway: Mobile auto-upload works, but it's not as seamless as Google Photos. Expect occasional manual intervention, especially on iOS.
Self-hosting means you're responsible for backups, updates, and security. This is the part Google handled for you.
Follow the 3-2-1 rule: three copies, two different media, one off-site.
Nextcloud has a built-in backup app, but for photos, a simple rsync or Borg backup of the data directory is often more reliable.
Security patches matter. Nextcloud releases updates regularly, and running an outdated version exposes you to known vulnerabilities. Set up automatic minor updates if your hosting supports it, and schedule major version upgrades during low-traffic periods.
Nextcloud supports public share links with optional passwords and expiration dates. For sharing with family, create user accounts instead of public links. For external sharing, use password-protected links and set expiration dates.
Key Takeaway: Self-hosting is ongoing work. Budget a few hours per month for maintenance, updates, and backup verification.
How do I export my photos from Google Photos? Use Google Takeout at takeout.google.com. Select only Google Photos, choose original quality, and download the resulting ZIP archives.
Can I import Google Takeout directly into Nextcloud? Not directly. You need to extract the archives first, then upload via the web interface, desktop client, or direct file placement.
Will my albums and metadata be preserved? Album information is stored in JSON files, not in the photos themselves. You'll need to merge that metadata into EXIF or recreate albums manually in Nextcloud.
How long does the migration take? For a 100 GB library: a few hours to export, a few hours to extract and process, and 1–3 days to upload depending on your connection and method.
Is Nextcloud free? The software is free and open-source. You'll pay for hardware, hosting, or a managed provider if you don't self-host.
Can I automatically sync new photos from my phone to Nextcloud? Yes, using the Nextcloud mobile app's auto-upload feature. Reliability varies by platform.
What are the storage requirements for self-hosting Nextcloud? Plan for your photo library size plus 20% overhead for previews and database growth. A 500 GB library needs at least 600 GB.
How do I handle the JSON files from Google Takeout?
Use a tool like google-photos-takeout-helper to merge JSON metadata into photo EXIF data before uploading.
Is Nextcloud secure for storing personal photos? Yes, if properly configured. Use HTTPS, strong passwords, two-factor authentication, and keep the software updated.
Can I share photos from Nextcloud with others? Yes. You can create public links, share with specific users, or set up password-protected shares with expiration dates.
Migrating from Google Photos to Nextcloud isn't a one-click process. It involves exporting, extracting, processing metadata, uploading, and ongoing maintenance. But the payoff is real: you own your photos, you control who sees them, and you stop paying rent on your own memories.
The steps in this guide — Takeout export, server prep, metadata merging, upload, organization, mobile sync, and maintenance — cover the full lifecycle. Start with the export, take your time with the metadata, and don't rush the upload.
Once it's done, you'll have a photo library that answers to you and no one else.
Ready to take control of your photos? Start your migration today by exporting your Google Photos library with Google Takeout and setting up your own Nextcloud instance. For step-by-step guidance, check out our detailed tutorial and join the community of self-hosters who value privacy and ownership.