Skip to content

rikmeijer/googlephotos2nextcloud

Repository files navigation

Requires Nextcloud Photos app to be installed, because of albums.

Replace NEXTCLOUD_URL with the following: https://<USER>:<APP_PASSWORD>@nextcloud.example.org/Photos
--> /Photos can be any path in Nextcloud to import photos to

# Run from command line (in /path/to/Takout/Google Photos, where photo directories and jsons are residing)
# Imagick extension required (with ffmpeg for video exif data)
```.env
NEXTCLOUD_URL=<NEXTCLOUD_URL> # e.g. https://user@s3cr3t:cloud.example.com/Photos
NEXTCLOUD_USER=usernamehere # Optional, overwrites user in NEXTCLOUD_URL
NEXTCLOUD_PASSWORD=secret # Optional, overwrites password in NEXTCLOUD_URL
```
```
$ php gp2nc.php
```

# Run with docker
"/path/to/Takeout/Google Photos" is the path where the general json files (e.g. user-generated-memory-titles.json) of your Takeout reside.

```
docker build . -t gp2nc
docker run --rm -v "/path/to/Takeout/Google Photos":/photos -e NEXTCLOUD_URL=<NEXTCLOUD_URL> gp2nc
```
or use ready2use image (auto-build)
```
docker run --rm -v "/path/to/Takeout/Google Photos":/photos -e NEXTCLOUD_URL=<NEXTCLOUD_URL> ghcr.io/rikmeijer/googlephotos2nextcloud:latest
```

# Known errors

Disk cache limit is set to 32GiB, files requiring larger cache will exhaust this and result in an error like:
```
Failed reading metadata: cache resources exhausted
```

# If you like this tool

Donations are [welcome](https://rikmeijer.github.io)

About

Tool to import Google Photos Takeout into Nextcloud

Resources

License

Stars

Watchers

Forks

Packages