{"id":13562748,"url":"https://github.com/xemle/home-gallery","last_synced_at":"2025-05-15T01:05:57.803Z","repository":{"id":37238967,"uuid":"323640623","full_name":"xemle/home-gallery","owner":"xemle","description":"Self-hosted open-source web gallery to view your photos and videos featuring mobile-friendly, tagging and AI powered image discovery","archived":false,"fork":false,"pushed_at":"2025-04-23T19:22:17.000Z","size":1957,"stargazers_count":930,"open_issues_count":24,"forks_count":72,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-23T20:29:32.053Z","etag":null,"topics":["calculate-previews","exif","face-detection","face-recognition","gallery","geo-reverse-lookups","linux","macos","mobile","mobile-phones","open-source","photo-gallery","photography","photos","reverse-image-search","self-hosted","tagging","videos","web-gallery","windows"],"latest_commit_sha":null,"homepage":"https://home-gallery.org","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/xemle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-22T13:56:02.000Z","updated_at":"2025-04-23T19:22:21.000Z","dependencies_parsed_at":"2024-01-14T03:45:30.050Z","dependency_job_id":"2026c169-516e-436f-adef-137dbaf6db2b","html_url":"https://github.com/xemle/home-gallery","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xemle%2Fhome-gallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xemle%2Fhome-gallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xemle%2Fhome-gallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xemle%2Fhome-gallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xemle","download_url":"https://codeload.github.com/xemle/home-gallery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254040,"owners_count":22039792,"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":["calculate-previews","exif","face-detection","face-recognition","gallery","geo-reverse-lookups","linux","macos","mobile","mobile-phones","open-source","photo-gallery","photography","photos","reverse-image-search","self-hosted","tagging","videos","web-gallery","windows"],"created_at":"2024-08-01T13:01:11.891Z","updated_at":"2025-05-15T01:05:57.753Z","avatar_url":"https://github.com/xemle.png","language":"JavaScript","funding_links":["https://www.patreon.com/xemle","https://paypal.me/xemle"],"categories":["JavaScript","Apps","10、基础服务架构","Other"],"sub_categories":["PhotoManagement","9、效率工具集合","Web Applications"],"readme":"![HomeGallery hero image](https://home-gallery.org/hero.png \"self-hosted open-source web gallery\")\n\n# HomeGallery\n\n[![Join the chat at https://gitter.im/home-gallery/community](https://badges.gitter.im/home-gallery/community.svg)](https://gitter.im/home-gallery/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[Home-Gallery.org](https://home-gallery.org) is a self-hosted open-source web gallery\nto browse personal photos and videos featuring tagging, mobile-friendly, and AI\npowered image and face discovery. Try the [demo gallery](https://demo.home-gallery.org)\nor enjoy the [food images](https://demo.home-gallery.org/similar/c7f8a3bf0142fc9694f517c23e42d988c97233c3)!\n\n**Note:** This software is a private pet/spare time project without any warranty.\nAsk questions on [gitter.im](https://gitter.im/home-gallery/community) or [Discord](https://discord.gg/kbvmvadCwe).\n\nDo you like HomeGallery? Does it solve your media problem?\nWould you like to help? Please read the [CONTRIBUTING](CONTRIBUTING.md) guidelines and\nsupport this project through any recurring financial support to my\n[patreon.com/xemle](https://www.patreon.com/xemle) or one time support to my\n[paypal.me/xemle](https://paypal.me/xemle) account. Thank you in advance.\n\n[MIT License](https://en.wikipedia.org/wiki/MIT_License)\n\n## Links\n\n* [Homepage](https://home-gallery.org)\n* [Demo gallery](https://demo.home-gallery.org)\n* Latest binaries for [Linux](https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64),\n[Mac](https://dl.home-gallery.org/dist/latest/home-gallery-latest-darwin-x64),\n[Windows](https://dl.home-gallery.org/dist/latest/home-gallery-latest-win-x64.exe)\n[Docker image](https://hub.docker.com/r/xemle/home-gallery)\n* [Documentation](https://docs.home-gallery.org)\n* [Changelog](CHANGELOG.md)\n\n## Motivation\n\n* The source of all my private images and videos are stored local on my NAS at home. The gallery should be on top/close of the source.\n* Cloud service do not cover my privacy concerns\n* All gallery software are lacking to have a fast user experience on mobile phones\n* The gallery software should help to browse and discover forgotten memories from the complete media archive\n\n## Target Users\n\n* Computer affine users who solve their own problems and go the extra mile\n* Serve your local data without usage of cloud services\n* One user only - all files are served\n* View your own photos and videos from mobile phones\n* Serve all your images from multiple media source directories (hard drive, camera files, mobile phone files, etc)\n\n## Quickstart\n\nFollowing steps need to be performed to use HomeGallery\n\n* **Download** the gallery software as prebuilt binary or docker image\n* **Init the configuration** with media sources like `~/Pictures`\n* **Start the server** on [localhost:3000](http://localhost:3000)\n\n```\ncurl -sL https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64 -o gallery\nchmod 755 gallery\n./gallery init --source ~/Pictures\n./gallery run server\n```\n\nand open [localhost:3000](http://localhost:3000) in your browser. Run `./gallery -h` for\nfurther help of the CLI.\n\nSee [dl.home-gallery.org/dist](https://dl.home-gallery.org/dist) for further binaries.\nEg. latest binaries for [Linux](https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64),\n[Mac](https://dl.home-gallery.org/dist/latest/home-gallery-latest-darwin-x64)\nor [Windows](https://dl.home-gallery.org/dist/latest/home-gallery-latest-win-x64).\n\nThe configuration `gallery.config.yml` can be found in the current directory for\nfine tuning.\nSee [install section](https://docs.home-gallery.org/install/index.html) in the documentation\nfor further information.\n\n### Quickstart using Docker\n\n```\nmkdir -p data\nalias gallery=\"docker run -ti --rm \\\n  -v $(pwd)/data:/data \\\n  -v $HOME/Pictures:/data/Pictures \\\n  -u $(id -u):$(id -g) \\\n  -p 3000:3000 xemle/home-gallery\"\ngallery init --source /data/Pictures\ngallery run server\n```\n\nand open [localhost:3000](http://localhost:3000) in your browser. Run `gallery -h` for\nfurther help of the CLI.\n\nThe gallery configuration can be found in `./data/config/gallery.config.yml` for fine tuning.\n\nWant to use docker compose? See [install](https://docs.home-gallery.org/install/index.html)\nsection in the documentation for further information.\n\n## Documentation\n\nSee [docs.home-gallery.org](https://docs.home-gallery.org) for general documentation.\n\n* [Installation](https://docs.home-gallery.org/install)\n* [CLI help](https://docs.home-gallery.org/cli)\n* [Configuration](https://docs.home-gallery.org/configuration)\n* [FAQ](https://docs.home-gallery.org/faq)\n* [Architecture](https://docs.home-gallery.org/internals)\n\n## Features\n\n- Endless photo stream via virtual scrolling\n- Video transcoding\n- Reverse image lookup (similar image search). If you have one sunset image, you can easily find other sunset photos in your archive without manual tagging\n- Face detection and search by similar faces\n- Expressive query language with and, or, not operands\n- GEO location reverse lookups\n- Simple mobile app through [PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps) support\n- Tagging, single and multi selection\n- Support of read only and offline media sources. Once the preview files are generated and their meta data are extracted, the original sources are not touched and required any more. So media from offline disk need to be extracted only once and the disk can stay offline on next runs\n- Media are identified by their content. Duplicated media (identical files byte-by-byte) are only processed once. Renaming is supported without recalculating previews etc.\n- Fast file changes detection such as add, removes, renames or moves\n- Static web gallery site export such as the [demo gallery](https://demo.home-gallery.org)\n- Meta data export to XMP sidecar files\n- Stream photos and videos to Chromcast enabled TV devices\n- Runs on SoC such Raspberry PI\n\n## Limits\n\nThe complete \"database\" is loaded into the browser. My 100.000 media are about\n100 MB plain JSON and 12 MB compressed JSON. The performance is quite good on\ncurrent mobile device. A user reported a successful setup with over 400.000\nmedia files. Further feedback is welcome.\n\n## Binary Downloads\n\nHomeGallery has prebuilt binaries for\n[Linux](https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64),\n[MacOS](https://dl.home-gallery.org/dist/latest/home-gallery-latest-darwin-x64) and\n[Windows](https://dl.home-gallery.org/dist/latest/home-gallery-latest-win-x64.exe).\nFurther download options can be found [here](https://dl.home-gallery.org/dist).\n\nSee [installation](https://docs.home-gallery.org/install) section for usage.\n\n# External Services and Privacy\n\nThe goal of HomeGallery is to use as less public services as possible\ndue sensitive private image data. It tries to use service which can\nbe deployed local. However the setup requires technical knowledge and\ntechnical maintenance. Following services are called:\n\nFor geo reverse lookups (geo coordinates to address), HomeGallery\nqueries the [Nominatim Service](https://nominatim.openstreetmap.org/reverse)\nfrom [OpenStreetMap](https://openstreetmap.org). Only geo coordinates\nare transmitted.\n\nFor reverse image lookups (similar image search), object detection and face\nrecognition, HomeGallery uses the\nits own public API at `api.home-gallery.org`. This public API supports\nlow powered devices such as the SoC Raspberry PI and all preview images are\nsend to this public API by default. No images or privacy data are kept.\n\nThe API can be configured and ran also locally or as Docker container.\nSee [installation](https://docs.home-gallery.org/api-server) section for usage.\n\n## Customized Environments\n\nHomeGallery runs on the JavaScript runtime [NodeJS](https://nodejs.org) which\nis supported by various platforms such as Linux (also Raspberry PIs), Mac and Windows.\n\nFor most cases a customized environment should be sufficient with\n\n* [node](https://nodejs.org) version 20 LTS (or 18 old LTS)\n* perl (Linux)\n\n### Setup\n\n```\n# Clone or download the repo from GitHub\ngit clone https://github.com/xemle/home-gallery.git\ncd home-gallery\n# Install required packages\nnpm install\n# Build required modules\nnpm run build\n```\n\nIn some corner cases you might also need essential build tools to compile library\nbindings.\n\n* make\n* g++\n* python\n\n## Development recipes\n\n### Build\n\nHomeGallery uses npm workspaces with multi\npackages. Common npm scripts are `clean`, `build`, `test`.\n\nTo run only a subset of packages you can use pnpm's\nfilter feature, e.g build only module `export-static` and `database`:\n\n```\nnpx pnpm -r --filter './*/{export-static,database}' build\n```\n\n### Unit Test\n\nRun unit tests from specific packages (via pnpm)\n\n```\nnpx pnpm -r --filter './*/{query,events}' test\n```\n\n### End-To-End Test\n\nRun specific e2e tests (via [Gauge](https://gauge.org))\n\n```\ngit clone https://github.com/xemle/home-gallery-e2e-data.git data\nnpm run test:e2e -- --tags dev\n```\n\n`home-gallery-e2e-data` contains test files using [Git LFS](https://git-lfs.github.com).\n\nThe e2e test output data are stored in `/tmp/gallery-e2e` directory. The latest test run is symlinked into the directory `latest-e2e-test` within the HomeGallery working directory. Check the `cli.log` and `e2e.log` ([ndjson](http://ndjson.org) format) in each test directory.\n\n### Bundle\n\nCreate local binary bundle from a feature branch\n\n```\nnode scripts/bundle.js --version=1.3 --snapshot=-feature-test --filter=linux-x64 --no-before --no-run\n```\n\nCreate local native bundle which excludes binaries via npm like sharp, ffmpeg and ffprobe. It should contain only js code which should run everywhere. It requires external binaries vipsthumbnail, ffmpeg and ffprobe in the `PATH` environment to work properly.\n\n```\nnode scripts/bundle.js --version=1.3 --snapshot=-feature-test --filter=linux-native --no-before --no-run\n```\n\n### Development Reset\n\nTo reset the current development state and start fresh on any very strange error behavior, you might run:\n\n```\nrm -rf package-lock.json node_modules e2e/node_modules packages/*/node_modules\nnpm install \u0026\u0026 npm run clean \u0026\u0026 npm run build\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxemle%2Fhome-gallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxemle%2Fhome-gallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxemle%2Fhome-gallery/lists"}