1
Fork 0
Photo gallery for self-hosted personal servers
Go to file
stz184 85a8dbedb0 Fixes viktorstrate/photoview#6
- Fixed issue that prevented favorites toggle to switch on on the Photos page
- The favorites toggle is moved on left
2020-09-26 02:18:30 +03:00
.github/workflows Fix small mistake in github builds 2020-08-15 15:41:05 +02:00
.vscode General cleanup 2020-08-15 13:00:46 +02:00
api Merge branch 'master' of github.com:viktorstrate/photoview into favorites-checkobox-on-photos-and-album-page-viktorstrate/photoview#6 2020-09-11 22:00:27 +03:00
screenshots Add logo to readme 2020-05-10 15:20:44 +02:00
ui Fixes viktorstrate/photoview#6 2020-09-26 02:18:30 +03:00
.dockerignore Rewrite environment variable configurations 2020-04-06 22:16:25 +02:00
.gitignore make SetupDatabase returns an error and use PingContext with timeout 2020-04-15 16:18:51 +02:00
.prettierrc Move old api folder 2020-01-30 13:49:28 +01:00
Dockerfile Fix docker build errors 2020-08-09 20:57:28 +02:00
LICENSE.txt Change license to GPL v3 2019-08-12 16:22:54 +02:00
README.md Update "Main features" in readme 2020-08-11 23:27:17 +02:00
docker-compose.example.yml Update docker compose example to use image 2020-04-30 15:57:08 +02:00

README.md

photoview logo

License GitHub contributors Docker Pulls Docker Build Status

screenshot

Photoview is a simple and user-friendly photo gallery that can easily be installed on personal servers. It's made for photographers and aims to provide an easy and fast way to navigate directories, with thousands of high resolution photos.

Demo site

Visit https://photos.qpqp.dk/

Username: demo Password: demo

Contents

Main features

  • Closely tied to the file system. The website presents the images found on the local filesystem of the server, directories are mapped to albums.
  • User management. Each user is created along with a path on the local filesystem, photos within that path can be accessed by that user.
  • Sharing. Albums, as well as individual media, can easily be shared with a public link, the link can optinally be password protected.
  • Made for photography. Photoview is built with photographers in mind, and thus supports RAW file formats, and EXIF parsing.
  • Video support. Many common video formats are supported. Videos will automatically be optimized for web.
  • Performant. Thumbnails are automatically generated and photos first load when they are visible on the screen. In full screen, thumbnails are displayed until the high resolution image has been fully loaded.
  • Secure. All media resources are protected with a cookie-token, all passwords are properly hashed, and the API uses a strict CORS policy.

There exists a lot of open-source self-hosted photo galleries already. Here are some, just to mention a few.

So why another one? I love taking photos, and I store all of them on my local fileserver. This is great because I can organize my photos directly on the filesystem so it's easy to move them or take backups. I want to be able to control where and how the photos are stored.

The problem is however that RAW images are extremely tedious to navigate from a fileserver, even over the local network.

My server holds a lot of old family pictures, that I would like my family to have access to as well. And some of the pictures I would like to easily be able to share with other people without the hassle of them having to make an account first.

Thus I need a solution that can do the following:

  • A scan based approach that automatically organises my photos
  • Support RAW and EXIF parsing
  • Have support for multiple users and ways to share albums and photos also publicly
  • Be simple and fast to use

All of the photo galleries can do a lot of what I need, but no single one can do it all.

Getting started - Setup with Docker

This section describes how to get Photoview up and running on your server with Docker. Make sure you have Docker and docker-compose installed and running on your server

  1. Make a new docker-compose.yml file on your computer, and copy the content of docker-compose.example.yml to the new file.
  2. Edit docker-compose.yml, find the comments starting with Change This:, and change the values, to properly match your setup. If you are just testing locally, you don't have to change anything.
  3. Start the server by running the following command
$ docker-compose up -d

If the endpoint or the port hasn't been changed in the docker-compose.yml file, Photoview can now be accessed at http://localhost:8000

Initial Setup

If everything is setup correctly, you should be presented with an initial setup wizard, when accessing the website the first time.

Initial setup

Enter a new username and password.

For the photo path, enter the path in the docker container where your photos are located. This can be set from the docker-compose.yml file under api -> volumes. The default location is /photos

A new admin user will be created, with access to the photos located at the path provided under the initial setup.

The photos will have to be scanned before they show up, you can start a scan manually, by navigating to Settings and clicking on Scan All

Setup development environment

Local setup

  1. Install a local mysql server, and make a new database
  2. Rename /api/example.env to .env and update the MYSQL_URL field
  3. Rename /ui/example.env to .env

Start API server

Make sure golang is installed. Then run the following commands:

cd ./api && go run server.go

Start UI server

Make sure node is installed. In a new terminal window run the following commands:

cd ./ui && npm start

The site can now be accessed at localhost:1234. And the graphql playground at localhost:4001