Homelab Troubleshooting

Tips on running a Linux server and docker.

User Tools

Site Tools


photosalts

Alternatives to Google Photos

Librephotos

Imagestore

Librephotos Setup

Clone the repo: git clone git@github.com:LibrePhotos/librephotos-docker.git

cp librephotos.env .env

Open .env in your favorite text editor and make the required changes.

Do not forget to create the directories you specified in the .env file if they do not exist.

Run

docker-compose up -d

You should have librephotos accessible after a few minutes of boot-up on: localhost:3000 unless you changed it in the .env file. User is admin, password is admin unless you changed it in the .env file. It is recommended you change the admin username and password if Libre Photos is going to be publicly accessible via the .env file.

First steps after setting up

  1. You need to log in as the admin user, and set up the directory for the users. To do this, click the top right button, and go to Admin Area. On this page, it will show a list of users. Manually set the Scan Directory for the desired user. Only an admin can do this.
  2. Then, go to Dashboard > Library and click the green Scan photos (file system) button.
  3. If you have a Nextcloud instance, you can also input login details for it in the Dashboard > Library page. Once logged in (the little circle next to Nextcloud Scan Directory will be green), you can choose a top level directory in your logged in Nextcloud account. Once this has been configured, you can click the blue Scan photos (Nextcloud) button. This will copy the contents of the specified Nextcloud directory to the local filesystem.

The basic idea is this:

  1. For scanning photos that reside in the local file system. Only the admin user can change the “scan directory” of the users, including the admin itself. Normal users cannot change his/her own “scan directory”. Only the admin can find the page to control this under the “user icon (top right) - admin area”
  2. For scanning photos that reside in external Nextcloud instances. Any user can change his/her own Nextcloud endpoint, and choose a top level directory in the Nextcloud account.

Auto scan all folders

You can start a scan with the following command:

sudo docker exec --user root CONTAINER_NAME python3 manage.py scan

You can just create a cron job to regularly call this command

# Every day at 3 AM
0 3 * * * sudo docker exec --user root CONTAINER_NAME python3 manage.py scan >/dev/null 2>&1

Imagestore setup

Installation instructions: Docker prebuilt images

Requirements:

Docker
Docker-compose
For automatic labeling: x86_64 CPU (also known as x64, x86_64, AMD64 and Intel 64)

Download the docker-compose.yml: wget https://raw.githubusercontent.com/gregordr/ImageStore/main/docker-compose.yml.

Edit it according to your liking, then run docker-compose up. Note that you need to comment back in one of the two labelers, in case you want automatic image labeling.

Go to http://localhost:3000, or alternatively the port you have chosen to use.

docker-compose.yml
---
services:
    nginx:
        image: imagestored/nginx
        ports:
            - "3000:8080" #Change to X:8080 to access on port X
        depends_on:
            - frontend

    frontend:
        image: imagestored/frontend
        depends_on:
            - backend

    backend:
        image: imagestored/backend
        restart: always
        environment:
            PGSTRING: postgres://postgres:example@db:5432/postgres # This string has to resolve to a Postgres database on version 11
        volumes:
            - ./media/:/code/media/
        depends_on:
            - db

    db:
        image: postgres:11
        restart: always
        environment:
            POSTGRES_PASSWORD: example
        volumes:
            - ./data/:/var/lib/postgresql/data/
 
    # detectron2: # You can use either detectron2, which is slower but more accurate, or yolo, which is faster but has less accurate results, and is very lightweight. Check yourself how much load detectron2 puts on your device, and if it's too much, switch to yolo. Comment out the model you want to use back in, but never comment out both.
    #     image: imagestored/detectron2
    #     environment:
    #         BASE_ADDRESS: backend:4000 # Set this to the address the backend will be accessible on
    #         FETCH_INTERVAL: 10 # This is the interval the labeler will poll for new images in seconds
 
    # yolo: # You can use either detectron2, which is slower but more accurate, or yolo, which is faster but has less accurate results, and is very lightweight. Check yourself how much load detectron2 puts on your device, and if it's too much, switch to yolo. Comment out the model you want to use back in, but never comment out both.
    #     image: imagestored/yolo
    #     environment:
    #         BASE_ADDRESS: backend:4000 # Set this to the address the backend will be accessible on
    #         FETCH_INTERVAL: 10 # This is the interval the labeler will poll for new images in seconds
version: "3.9"
photosalts.txt · Last modified: 2021/08/28 11:42 by alexk7110