Running LibrePhotos – Self-Hosted Google Photos Alternative – in Docker



Running LibrePhotos – Self-Hosted Google Photos Alternative – in Docker

Running LibrePhotos - Self-Hosted Google Photos Alternative - in Docker

#LibrePhotos #Docker #PhotoOrganizer

Full steps can be found at https://i12bretro.github.io/tutorials/0684.html

——————————————————————–
What is LibrePhotos?
——————————————————————–
A self-hosted Google Photos clone, with a slight focus on cool graphs. –  https://docs.librephotos.com/
 
——————————————————————–
Installing Docker
——————————————————————–
   01. Log into the Linux host and run the following commands in a terminal window
         # install prerequisites
         sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y
         # add docker gpg key
         curl -fsSL https://download.docker.com/linux/$(awk -F’=’ ‘/^ID=/{ print $NF }’ /etc/os-release)/gpg | sudo apt-key add –
         # add docker software repository
         sudo add-apt-repository “deb [arch=$(dpkg –print-architecture)] https://download.docker.com/linux/$(awk -F’=’ ‘/^ID=/{ print $NF }’ /etc/os-release) $(lsb_release -cs) stable”
         # install docker
         sudo apt install docker-ce docker-compose containerd.io -y
         # enable and start docker service
         sudo systemctl enable docker && sudo systemctl start docker
         # add the current user to the docker group
         sudo usermod -aG docker $USER
         # reauthenticate for the new group membership to take effect
         su – $USER
 
——————————————————————–
Running LibrePhotos Container
——————————————————————–
   01. Continue with the following commands in a terminal window
         # generate a random string
         superSecretKey=$(openssl rand -base64 32)
         # create working directories
         mkdir ~/docker/librephotos/{media,cache,logs} -p && mkdir ~/docker/postgresql -p
         # set owner of docker directory
         sudo chown “$USER”:”$USER” ~/docker -R
         # create containers network
         docker network create containers
         # run the postgesql container
         docker run -d –name postgres -e POSTGRES_USER=librephotos_rw -e POSTGRES_PASSWORD=Libr3Photo$ -e POSTGRES_DB=librephotos -v ~/docker/postgresql:/var/lib/postgresql/data –network=containers –restart=unless-stopped postgres:latest
         # run the librephotos backend container
         # change the admin email, username and password as needed
         docker run -d –name backend -v ~/Pictures:/data -v ~/docker/librephotos/media:/protected_media -v ~/docker/librephotos/logs:/logs -v ~/docker/librephotos/cache:/root/.cache -e SECRET_KEY=$superSecretKey -e BACKEND_HOST=librephotos_backend -e [email protected] -e ADMIN_USERNAME=i12bretro -e ADMIN_PASSWORD=SomethingSecure -e DB_BACKEND=postgresql -e DB_NAME=librephotos -e DB_USER=librephotos_rw -e DB_PASS=Libr3Photo$ -e DB_HOST=postgres -e DB_PORT=5432 -e REDIS_HOST=redis6 -e REDIS_PORT=6379 -e MAPBOX_API_KEY=” -e WEB_CONCURRENCY=2 -e SKIP_PATTERNS=” -e DEBUG=0 -e HEAVYWEIGHT_PROCESS=1 –network containers –restart=unless-stopped reallibrephotos/librephotos:latest
         # run the librephotos frontend container
         docker run -d –name frontend –network containers –restart=unless-stopped reallibrephotos/librephotos-frontend:latest
         # run the librephotos proxy container
         docker run -d –name librephotos_proxy -v ~/Pictures:/data -v ~/docker/librephotos/media:/protected_media -p 8088:80 –network containers –restart=unless-stopped reallibrephotos/librephotos-proxy:latest
         # run the redis 6 container
         docker run -d –name redis6 –network containers –restart=unless-stopped redis:6
   02. Open a web browser and navigate to http://DNSorIP:8088
   03. Login with the admin username and password set on the backend container
   04. Welcome to LibrePhotos
 
Documentation:  https://github.com/LibrePhotos/librephotos-docker
 

### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro

Comments are closed.