Sign inSign up

sitegui/nidimages

By sitegui

Updated 18 days ago

A photo sharing web app to keep your family and friends connected with your adventures and memories

Image
Web servers
0

457

sitegui/nidimages repository overview

Nidimages

An open-source photo sharing web app to keep your family and friends connected with your adventures and memories.
Easy to host: keep your data in your control!

Features

Nidimages aims to be simple, yet effective. Here's a list of its main features:

  • create albums with photos, videos and text
  • the album shows as a timeline, using the creation date of the photos when present in the file
  • share and invite people to your albums
  • connected users can comment on photos and videos
  • optionally, be notified of activity with push notifications
  • customise album name, URL, description, cover photo and appearance
  • share the right to post new content with others
  • original file quality is preserved for download
  • fast and clean web navigation, light on Javascript usage
  • accessible interface: supports keyboard navigation and screen reader
  • multiple language support: English, French and Portuguese
  • download multiple files as a single archive
  • mark an album as archived to keep it around without clobbering the home page
  • no tracking, no external connections nor dependencies
  • it can be installed as a home shortcut in Android and iOS
  • as the instance administrator, you can see all albums and users and edit user permissions
  • easy to host, check the installing instructions:
    • very lean on CPU and memory: uses less than 100 MiB
    • simple on-disk file structure
    • one binary with few system dependencies
    • available as a container image for Podman or Docker

Try it for yourself

You can visit the demo instance at https://demo.nidimages.sitegui.dev to browse the photos and add comments. You can also create a new album and upload your own photos.

Note: this is an ephemeral test instance. All data is erased after 15 minutes.

Installing

The two recommended ways to run Nidimages are: container image or compiling from source.

To easy user account management, user accounts do not have passwords. Instead, Nidimages sends a single-use login token for returning users. However, this requires a third-party service capable of sending transactional emails like Scaleway TEM, AWS SES, etc. You probably want to generate the credentials (host, username and password) in the external service before continuing.

Container image

You can run the image sitegui/nidimages with Docker or Podman.

First, create a local directory to store all the data:

mkdir data

Then write the email sending password service in data/smtp-password.txt.

Then run the container with Podman:

podman run \
    --volume ./data:/data \
    --userns keep-id:uid=1001,gid=1001 \
    --publish 8080:8080 \
    --env SERVER_URL=https://yourdomain.example.com \
    --env SMTP_FROM_EMAIL="Nidimages <[email protected]>" \
    --env SMTP_SERVER=smtp.example.com \
    --env SMTP_USERNAME=nidimages \
    --env SMTP_PASSWORD_FILE=/data/smtp-password.txt \
    docker.io/sitegui/nidimages:v1

or Docker:

docker run \
    --volume ./data:/data \
    --user $(id -u):$(id -g) \
    --publish 8080:8080 \
    --env SERVER_URL=https://yourdomain.example.com \
    --env SMTP_FROM_EMAIL="Nidimages <[email protected]>" \
    --env SMTP_SERVER=smtp.example.com \
    --env SMTP_USERNAME=nidimages \
    --env SMTP_PASSWORD_FILE=/data/smtp-password.txt \
    docker.io/sitegui/nidimages:v1

Replace https://yourdomain.example.com with the URL that hosts this instance. This is used to generate absolute links in different parts of the project.

The major version tags like v1, v2, etc are references that point to the latest minor version. Minor version tags like v1.1 are immutable tags. While data migration is handled automatically between version updates, it's always best to have a backup before updating.

Compile from source

This project uses Rust, Openssl, ffmpeg and exiftool.

  1. clone this repo
  2. install Rust
  3. install system dependencies, for example, in Ubuntu sudo apt-get install pkg-config libssl-dev ffmpeg libimage-exiftool-perl
  4. compile with cargo build --release
  5. create a .env file with
    BIND=0.0.0.0
    SERVER_URL=https://yourdomain.example.com
    SMTP_FROM_EMAIL="Nidimages <[email protected]>"
    SMTP_SERVER=smtp.example.com
    SMTP_USERNAME=nidimages
    SMTP_PASSWORD=verystrongpassword
    
  6. run ./target/release/nidimages

Migrating from PhotoCircle

I've initially created this app inspired by the commercial PhotoCircle service. It's possible (but a bit cumbersome) to migrate an existing circle from PhotoCircle to Nidimages, including all comments and reactions.

First, you need to get the circle id and your login credentials:

  1. log in to https://photocircle.app/
  2. open the network inspector tab and navigate to the page of the "circle" album to import
  3. search for the request to /GetCircleData and copy the circle id present in the request body and the prod_auth_token present in the Cookie header

Then, assuming that you are the admin of your Nidimages instance:

  1. go to your deployment and turn off the nidimages process/container
  2. run this command replacing CIRCLE_ID, TOKEN, NAME, EMAIL, SLUG
    cargo run --release --features photo_circle_importer -- \
    import-photo-circle \
    --circle CIRCLE_ID \
    --token TOKEN \
    --owner "NAME <EMAIL>" \
    --album SLUG
    
  3. this can take a while and may ask more command options to be provided
  4. once finished with success, you can remove the folder data/photo_circle_cache and restart the server

If you are interested in this migration, shoot me an email and I can make this process easier.

Tag summary

Content type

Image

Digest

sha256:1aec7f9a5

Size

322.6 MB

Last updated

18 days ago

docker pull sitegui/nidimages