Taking your photos with you: from Apple Photos and Google Photos to Immich or Nextcloud
The first 50 GB of photos weighs the lightest. After that, the counting begins: for every year your iPhone or Android phone lasts, a few hundred GB of shots, videos, and Live Photos gets added. As long as they sit in Apple Photos or Google Photos, you pay monthly for the space, and the platform decides what happens to your files. Self-hosting sounds wonderful, until something crashes on Sunday night at 11:30 PM. Then you're not a customer waiting on the helpdesk. You *are* the helpdesk.
This article explains how to move your library to Immich or Nextcloud Photos, preserving metadata, albums, and structure. No stories about why you should do it—you already know why. Just the path there.
Requirements
You need a working Immich server (version 1.106 or newer) or a Nextcloud installation (version 28 or newer) with the Photos app. For the migration, you'll use a machine with enough disk space—plan for the total size of your library plus a third extra for the unpacked export. And you need access to your Apple or Google account to request the export.
For importing into Immich, you'll use immich-go, a community tool built specifically for bulk migrations. You install it as a standalone binary:
curl -sSL https://github.com/simulot/immich-go/releases/latest/download/immich-go_Linux_x86_64.tar.gz | tar xz
The documentation for Immich version 1.106 (July 27, 2026) explicitly refers to this tool as the recommended path for migrations from Google Photos and iCloud.
From Apple Photos: exporting via iCloud or osxphotos
Apple doesn't offer a direct API for downloading your entire library. The official route goes through iCloud, where you can request an export of all your data. That export arrives as a zip file or a series of folders, depending on the size. It contains the photos, videos, folder structures, and metadata.
An alternative is osxphotos (version 0.64.0 or newer), a community tool that reads directly from your local Apple Photos library. It grabs not just the files, but also location data, albums, and face recognition. You run it on a Mac:
osxphotos export /path/to/export --export-as-hardlink --albums --metadata
The --export-as-hardlink flag prevents the tool from copying files; they refer to the originals. That saves disk space, but it does mean you can't delete the original library as long as the export exists.
From Google Photos: Takeout is the key
At Google, the export function is called Takeout. You request an export via [takeout.google.com](https://takeout.google.com), select Google Photos, and choose the format. Google processes the request and sends an email once the export is ready. That can take a few days—for large libraries, a week is not unusual.
The export arrives as zip files of up to 50 GB each. That limit isn't a coincidence: larger files become awkward to download and process, but smaller blocks mean more downloads. Choose 50 GB if you have a fast connection, 10 GB if you want to be able to resume after an interruption.
The filename of each export follows the pattern takeout-YYYYMMDDTHHmmssZ*.zip. That timestamp is important: it tells you exactly when the export was created. If you recognize this pattern, you can automate the unpacking process with a simple loop:
for f in takeout-*.zip; do unzip -o "$f" -d takeout; done
Importing into Immich: immich-go does the heavy lifting
Immich itself has an official CLI (immich-cli) that uploads folders to your server. It's fine for small amounts or regular synchronization, but not suitable for a one-time migration of tens of thousands of files. The CLI uploads files, but it doesn't interpret Takeout structure and doesn't create albums.
That's what immich-go was made for. This tool knows the structure of Google Takeout and iCloud exports and converts it into Immich-compatible entities. Albums that only existed in the cloud are created as real Immich albums. EXIF metadata stays intact, as long as it was preserved during the export.
First, authenticate with your server:
./immich-go -server http://localhost:2283 -api-key your-api-key
Then the import. For a Google Takeout export—the tool can handle both the zip files and the unpacked folder:
./immich-go -server http://localhost:2283 -api-key your-api-key from-google-photos takeout-20260727T120000Z-001.zip
For an iCloud export you made with osxphotos:
./immich-go -server http://localhost:2283 -api-key your-api-key from-icloud /path/to/export
The tool processes the export and reports per album or file what happened. For a library of a few hundred GB, that takes a while. Let it run in a screen session or via nohup; you don't want a lost SSH connection to abort the migration halfway through.
What the choice costs
The combination of Google Takeout → immich-go is described in the Immich community (August 10, 2024) as the best way to migrate from Google Photos to Immich. That opinion is justified: the tool handles albums, metadata, and structure in one go. But there's a price attached. immich-go is a community tool, not an official Immich product. The documentation is good, but not complete, and when an unexpected error occurs, you're on your own.
The alternative is manual upload via the Immich web interface. That works, but you lose albums, facial recognition, and possibly the original capture date. For a library of a hundred photos, that's no problem. For tens of thousands of files, it's a week of work.
Nextcloud Photos: the simpler alternative
Nextcloud Photos is less advanced than Immich. Facial recognition is missing, albums don't exist as a first-class entity, and there's no migration tool like immich-go. What it does have: a solid, well-integrated photo gallery that uses the existing Nextcloud infrastructure. And you don't have to run a second system.
The migration is therefore much simpler — and much less automated. You copy the extracted export to a folder in your Nextcloud and let the server synchronize:
rsync -av --progress /pad/naar/export/ /pad/naar/nextcloud/data/gebruiker/files/Fotos/
Nextcloud scans the folder and displays the photos in the Photos app. Metadata is preserved, but albums from Google Photos or Apple Photos you have to reconstruct manually using folders. That's not a disaster, but it is work. Anyone with hundreds of albums will spend an evening on it.
Verification
After the import, check whether the library is complete. In Immich you can compare the number of photos and videos with the export; the web interface shows both. For a more precise check, use the API:
curl -s http://localhost:2283/api/server/statistics -H "x-api-key: je-api-key"
The response contains totalPhotos and totalVideos. Compare those with the number of files in your export. With Nextcloud, check whether the number of files in the folder matches what the Photos app displays.
Common problems
The import stops halfway with a network error. immich-go is not resumable in the sense that it remembers where it left off. You can restart the import; the tool recognizes files that have already been uploaded and skips them. That takes time, but no duplicate files.
Google Takeout contains JSON files alongside the photos. Those belong to the export and contain metadata such as descriptions and facial recognition. immich-go reads them and then discards them. Don't remove them in advance; otherwise you lose the metadata.
The iCloud export is too large for a single zip. Apple splits large exports into multiple parts. immich-go expects one folder with all files. Extract all parts into the same folder and point the tool to that folder. The tool sorts the files based on the internal structure, not on the zip name.
The migration is not a trivial task. A library of 300 GB means a download of 300 GB, an extraction operation that takes an hour, and an import that, depending on your server, runs overnight. But once it's done, your photos are in a place you control. Whether you'll ever want to move them back to Google or Apple? That's a question you can ask yourself in a year.