SPIS
This project is called "Simple Private Image Server" or SPIS
for short. It's purpose is to be a lightweight and fast server to display media hosted on a private server. This project came about when I was searching for a solution like this and found nothing. Everything seemed way too feature heavy and slow, requiring you to setup databases and other unnecessary components.
The goals for this project are:
- Simple to setup 🏝️
- Flexible to operate ➰
- Lightweight, multi-threaded and fast 🚀
- Minimalistic GUI 🤩
- Easy to use on mobile 📱
Some features worth mentioning:
- Endless scrolling 📜
- Mark favorites ❤️
- Filter by year, month, favorites 🎚️
- Is a progressive web app 📲
I personally use this project to host around 40.000
images on a Raspberry Pi CM4 🤯
If this project is just what you needed and/or has been helpful to you, please consider buying me a coffee ☕
Table of contents
Screenshots
This is how the GUI looks on mobile!
Setup
Configuration
Everything is configured via environmental variables:
Variable Name | Required | Default | Description |
---|---|---|---|
SPIS_MEDIA_DIR |
Yes |
Where should the server look for media | |
SPIS_DATA_DIR |
Yes |
Where should the server store its data | |
SPIS_PROCESSING_SCHEDULE |
No |
0 0 2 * * * |
When should the server scan for new media (default is every night at 2) |
SPIS_PROCESSING_RUN_ON_START |
No |
false |
Should the server scan for media on startup |
SPIS_API_MEDIA_PATH |
No |
/assets/media |
Where will the media be served by the webserver |
SPIS_API_THUMBNAIL_PATH |
No |
/assets/thumbnails |
Where will the thumbnails be served by the webserver |
SPIS_SERVER_SOCKET |
No |
/var/run/spis.sock |
Path of the socket the server will listen to |
SPIS_SERVER_ADDRESS |
No |
Address to listen to rather than socket, i.e. 0.0.0.0:8000 |
|
RUST_LOG |
No |
Loglevels of the application, i.e. error,spis_server=info |
Docker
Easiest way to run SPIS
is with the docker image:
$ docker run -it \
-p 8080:8080 \
-v /path/to/your/media:/var/lib/spis/media \
-v /path/to/save/data:/var/lib/spis/data \
ghcr.io/gbbirkisson/spis:<version>
Binary
Just download a binary for your architecture and run it. Note that the spis-server
binary does not serve images. For that you can use something like nginx. See nginx config for an example.
Note: To get video support, both
ffmpeg
andffprobe
must be present in path!
Progressive Web App
If you have an Android mobile device, you can add SPIS
as a PWA
to it. Open up the SPIS
home page in the chrome browser on the device, open the top-right menu, and select Add to Home screen
.
Development
Setup dependencies
$ make setup
Get some test media
I leave it up do you to put some images/videos in the ./dev/api/media
folder.
Running
Run stack with:
$ make dev
Or alternatively open 3 terminals and run:
$ make dev-nginx
$ make dev-server
$ make dev-gui
And then open http://localhost:7000