This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== HomeGallery ====== **Note:** since i don't use this service anymore, this page might be not updated. [[https://home-gallery.org|HomeGallery]] is a nice photo gallery to be self-hosted. It support AI and many other features. It comes with Docker and bare-metal instructions, which i like very much. Also it supports base-url's too. The reverse-geocoding and AI stuff is accessed via public APIs on //api.home-gallery.org// specially for low-powered devices, but if your server can support it, you can also self host this part using Docker/Podman. ===== Installation ===== Full documentation is well maintained and csan be found [[https://docs.home-gallery.org/install/index.html|here]]. Create a **homegallery** user as a memeber of the **photos** group: <code bash> useradd -d /deposito/daemons/homegallery -m -g photos homegallery su - homegallery curl -sL https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64 -o gallery chmod 755 gallery </code> Installing the API server is ismpler using a container, do use the following **docker-compose.yml**: <file - docker-compose.yml> version: "3.9" services: api: # custom build via #build: packages/api-server image: xemle/home-gallery-api-server environment: # TensorflowJS backends # - cpu: slowest and best support # - wasm: good perfromance for arm64 and amd64 platforms # - node: best performance on amd64 platform #- BACKEND=cpu #- BACKEND=wasm - BACKEND=node ports: - "3023:3000" </file> Note that you should not create a specific network for the API server to ensure it works with the non-containerized server. Then the usual: <code bash> podman compose pull </code> ===== Configuration ===== Full configuration is [[https://docs.home-gallery.org/configuration/index.html#configuration|here]]. First of all, run //HomeGallery// to let it initialize the configiuration: <code bash> ./gallery run init --source ~/Pictures </code> Now you can edit the **/data/daemons/homegallery/.config/home-gallery/gallery.config.yml**. In detail, you will want to edit at least the following values: <file - gallery.config.yml> extractor: apiServer: url: http://localhost:3023 timeout: 30 concurrent: 5 server: port: 3022 host: '127.0.0.1' BasePath: /gallery/ </file> Please note that for **BasePath** to work, the trailing **/** is required! ===== Reverse Proxy ===== Example NGINX configuration: <file - gallery.conf> location /gallery/ { proxy_pass http://127.0.0.1:3022/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } </file> Refer to [[selfhost:nginx|The Reverse Proxy concept]] for more details. ===== Autostart ===== For the API container, to start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script: <code> ln -s /etc/init.d/user-containers /etc/init.d/user-containers.homegalleryapi </code> and create the following config file: <file - /etc/conf.d/user-containers.homegalleryapi> USER=homegalleryapi DESCRIPTION="The homegallery APIs" </file> Add the service to the default runlevel and start it now: <code bash> rc-update add user-containers.homegalleryapi default rc-service user-containers.homegalleryapi start </code> For the web part, following my [[gentoo:locald|Custom User Services]], in e you need symlinks for the server: <code bash cd /etc/local.d ln -s _servicer.sh 44-homegallery--service.start ln -s _servicer.sh 44-homegallery--service.stop </code> And the associated service support file **/data/daemons/homegallery/service_homegallery_start**: <file - service_homegallery_start> COMMAND="/data/daemons/homegallery/gallery" ARGUMENTS=(run server) </file> Ensure the server starts after the container. ===== Upgrade ===== See [[https://docs.home-gallery.org/install/index.html#upgrade-the-gallery|here]]: <code bash> kill gallery podman compose down podman compose pull mv gallery gallery.old curl -sL https://dl.home-gallery.org/dist/latest/home-gallery-latest-linux-x64 -o gallery chmod 755 gallery podman compose up -d ./gallery run import ./gallery run server & </code>