{"id":13583579,"url":"https://github.com/rfgamaral/docker-gphotos-uploader","last_synced_at":"2025-03-26T02:30:31.068Z","repository":{"id":44428019,"uuid":"168824375","full_name":"rfgamaral/docker-gphotos-uploader","owner":"rfgamaral","description":"🐳 Mass upload media folders to your Google Photos account with this Docker image.","archived":false,"fork":false,"pushed_at":"2020-04-12T18:57:19.000Z","size":83,"stargazers_count":60,"open_issues_count":5,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-21T01:34:14.519Z","etag":null,"topics":["docker","docker-image","google","google-photos","google-photos-albums","google-photos-backup","google-photos-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rfgamaral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-02T11:21:15.000Z","updated_at":"2025-01-29T17:01:19.000Z","dependencies_parsed_at":"2022-09-06T11:52:13.977Z","dependency_job_id":null,"html_url":"https://github.com/rfgamaral/docker-gphotos-uploader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfgamaral%2Fdocker-gphotos-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfgamaral%2Fdocker-gphotos-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfgamaral%2Fdocker-gphotos-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rfgamaral%2Fdocker-gphotos-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rfgamaral","download_url":"https://codeload.github.com/rfgamaral/docker-gphotos-uploader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245576522,"owners_count":20638123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","google","google-photos","google-photos-albums","google-photos-backup","google-photos-cli"],"created_at":"2024-08-01T15:03:36.298Z","updated_at":"2025-03-26T02:30:30.794Z","avatar_url":"https://github.com/rfgamaral.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# rfgamaral/gphotos-uploader\n\n![ci workflow](https://github.com/rfgamaral/docker-gphotos-uploader/workflows/Docker%20Images%20CI/badge.svg)\n![image size](https://img.shields.io/microbadger/image-size/rfgamaral/gphotos-uploader.svg)\n![layers](https://img.shields.io/microbadger/layers/rfgamaral/gphotos-uploader.svg)\n![docker pulls](https://img.shields.io/docker/pulls/rfgamaral/gphotos-uploader.svg)\n![docker Stars](https://img.shields.io/docker/stars/rfgamaral/gphotos-uploader.svg)\n\nThis repository contains the _Dockerfiles_ and all other files needed to create and run a container with a background task to mass upload media folders to your [Google Photos](https://photos.google.com) account. The task runs periodically on a predefined schedule and is powered by [`gphotos-uploader-cli`](https://github.com/nmrshll/gphotos-uploader-cli).\n\n## Supported Architectures\n\nThis image supports multiple architectures such as `x86-64`, `arm64` and `armhf`. Simply pulling `rfgamaral/gphotos-uploader` should retrieve the correct image for your architecture, but you can always pull specific architecture images via tags.\n\nThe architectures supported by this image are:\n\n| Architecture | Tag (`latest`) | Tag (`x.y.z`) | Tag (`preview`) |\n| :----: | --- | --- | --- |\n| x86-64 | `amd64-latest` | `amd64-x.y.z` | `amd64-preview` |\n| arm64 | `arm64v8-latest` | `arm64v8-x.y.z` | `arm64v8-preview` |\n| armhf | `arm32v7-latest` | `arm32v7-x.y.z` | `arm32v7-preview` |\n\n## Usage\n\n### Create and start the container\n\nMake sure the Docker daemon is running and then start the container like this:\n\n```\ndocker run -d \\\n    --name=gphotos-uploader \\\n    -e GPU_SCHEDULE=\"\u003cSCHEDULE_EXPRESSION\u003e\" \\\n    -p \u003cEXTERNAL_PORT\u003e:29070 \\\n    -v \u003cPATH_TO_CONFIGURATION\u003e:/config \\\n    -v \u003cPATH_TO_PHOTOS_LIBRARY\u003e:/photos \\\n    --restart unless-stopped \\\n    rfgamaral/gphotos-uploader\n```\n\nOnce the container is running and before `gphotos-uploader-cli` is able to work properly, you'll first need to edit the `/config/config.hsjon` and set your `APIAppCredentials` according to the [Authentication](#authentication) section below. Please refer to the official [documentation](https://github.com/nmrshll/gphotos-uploader-cli/blob/master/.docs/configuration.md) for all other configuration options.\n\n### Container configuration parameters\n\nPlease refer to the following table for all available configuration paramaters that can be passed at run-time to container images:\n\n| Parameter | Required | Description |\n| :----: | --- | --- |\n| `-e GPU_SCHEDULE=\"\u003cSCHEDULE_EXPRESSION\u003e\"` | | Background task schedule expression (defaults to every 8 hours).\u003cbr\u003eSee [crontab.guru](https://crontab.guru/) for help with the schedule expression. |\n| `-p \u003cEXTERNAL_PORT\u003e:29070` | \u003cdiv align=\"center\"\u003e✔\u003c/div\u003e | Publish the container's `29070` internal port to the host as `\u003cEXTERNAL_PORT\u003e`.\u003cbr\u003eThis is necessary for the Authentication process (more on that below). |\n| `-v \u003cPATH_TO_CONFIGURATION\u003e:/config` | \u003cdiv align=\"center\"\u003e✔\u003c/div\u003e | Absolute host path to store `gphotos-uploader-cli` configuration. |\n| `-v \u003cPATH_TO_PHOTOS_LIBRARY\u003e:/photos` | \u003cdiv align=\"center\"\u003e✔\u003c/div\u003e | Absolute host path for the photos library source folder. |\n\n## Authentication\n\nGiven that `gphotos-uploader-cli` uses OAuth 2 to access Google APIs, authentication is a bit tricky and involves a few manual steps. Please follow the guide below carefully, to give `gphotos-uploader-cli` the required access to your Google Photos account.\n\n### API credentials\n\nBefore you can use `gphotos-uploader-cli`, you must enable the Photos Library API and request an OAuth 2.0 Client ID.\n\n1. Make sure you're logged in into the Google Account where your photos should be uploaded to.\n2. Start by [creating a new project](https://console.cloud.google.com/projectcreate) in Google Cloud Platform and give it a name (e.g., _Google Photos Uploader_).\n3. Enable the [Google Photos Library API](https://console.cloud.google.com/apis/library/photoslibrary.googleapis.com) by clicking the \u003ckbd\u003eENABLE\u003c/kbd\u003e button.\n4. Configure the [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent) by setting the application name (e.g., _docker-gphotos-uploader_) and then click the \u003ckbd\u003eSave\u003c/kbd\u003e button on the bottom.\n5. Create [credentials](https://console.cloud.google.com/apis/credentials) by clicking the **Create credentials → OAuth client ID** option, then pick **Other** as the application type and give it a name (e.g., _gphotos-uploader-cli_).\n6. Copy the **Client ID** and the **Client Secret** and keep them ready to use in the next section.\n\n### CLI authentication\n\nOnce an OAuth 2.0 Client ID is generated, authenticating `gphotos-uploader-cli` against your Google Account is required for proper access to your Google Photos account.\n\n_The following steps assume the container has been created and it's running. If not, please refer to the [create and start the container](#create-and-start-the-container) section above before continuing._\n\n1. Open the `/config/config.hsjon` file and set both the `ClientID` and `ClientSecret` options to the ones generated in the previous section and your the `jobs[0].account` option to the Google Account e-mail address where your photos should be uploaded to.\n2. Open your favorite terminal and run the following command to start the authentication process:\n\n    ```\n    docker exec -it gphotos-uploader run\n    ```\n\n3. You should get an output similar to this one:\n\n    ```\n    [info]   Opening browser to complete authorization.\n    [warn]   Browser was not detected. Complete the authorization browsing to: http://localhost:29070\n    ```\n\n    Open the authorization URL in your main browser and allow **docker-gphotos-uploader** access to your Google Account to \"View and manage your Google Photos library\". Please note that you'll have to replace `localhost` with the Docker host network IP address if accessing from a different machine in your local network.\n\n4. Once the authentication process is complete you should get a green box with \"Success!\".\n\nThe authentication process is now complete and `gphotos-uploader-cli` is ready to upload your photos on the background.\n\n## Support Information\n\n### Force run `gphotos-uploader-cli` upload task:\n\n```\ndocker exec -it gphotos-uploader run\n```\n\n### Shell access whilst the container is running:\n\n```\ndocker exec -it gphotos-uploader /bin/sh\n```\n\n### To monitor the logs of the container in real-time:\n\n```\ndocker logs -f gphotos-uploader\n```\n\n## License\n\nThe use of this source code is governed by an MIT-style license that can be found in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frfgamaral%2Fdocker-gphotos-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frfgamaral%2Fdocker-gphotos-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frfgamaral%2Fdocker-gphotos-uploader/lists"}