{"id":17191964,"url":"https://github.com/kpeeters/shotweb","last_synced_at":"2025-10-13T05:35:23.637Z","repository":{"id":87655180,"uuid":"254691361","full_name":"kpeeters/shotweb","owner":"kpeeters","description":"Web server for Shotweb photo databases","archived":false,"fork":false,"pushed_at":"2023-08-16T18:40:22.000Z","size":966,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-26T10:01:46.737Z","etag":null,"topics":["photo-gallery","server","sharing","shotwell"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kpeeters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-10T17:10:16.000Z","updated_at":"2023-08-16T20:03:26.000Z","dependencies_parsed_at":"2025-04-13T20:20:23.834Z","dependency_job_id":null,"html_url":"https://github.com/kpeeters/shotweb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kpeeters/shotweb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpeeters%2Fshotweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpeeters%2Fshotweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpeeters%2Fshotweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpeeters%2Fshotweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kpeeters","download_url":"https://codeload.github.com/kpeeters/shotweb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kpeeters%2Fshotweb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013705,"owners_count":26085393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["photo-gallery","server","sharing","shotwell"],"created_at":"2024-10-15T01:27:52.186Z","updated_at":"2025-10-13T05:35:23.632Z","avatar_url":"https://github.com/kpeeters.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nShotweb: web server for shotwell photo databases\n================================================\n\nKasper Peeters \u003ckasper.peeters@phi-sci.com\u003e\n\nLicensed under the GPL.\n\n**WARNING** **This is not yet feature-complete**\n\nShotweb is a simple, modern and compact C++ server for Linux to share\nShotwell [https://wiki.gnome.org/Apps/Shotwell] photo albums via the\nweb. I have a large collection of photos and videos which I do not\nwant to store in a cloud service, but still want to share with friends\nand family. The master copy lives on my laptop and is\ncategorised/labelled with Shotwell. I thus simply wanted to share\nindividual Shotwell events with other people. Because I could not find\nanything suitable (most photo sharing server software, such as Piwigo\nor Nextcloud, is *far* to complex while still not serving my basic\nneeds), I decided to write one myself.\n\nFeatures:\n\n* Serve directly from the shotwell database and photo folders.\n* Photos as well as videos.\n* Multiple user accounts.\n* Each user can be given access to individual events.\n* Events can be shared by sending a link with a token, does not\n  require guest to register an account.\n* Generates thumbnails for photos and videos on the fly.\n* Thumbnail caching.\n* Clean compact C++ with handcoded HTML/CSS/JS.\n\nIn the pipeline:\n\n* Photo pre-loading for quick browsing.\n* Download single photos or entire events as zip files.\n\n\nThere are a few related projects, mostly unmaintained, which inspired\nShotweb::\n\n* [http://www.jonh.net/~jonh/shotgo/README.html]\n* [https://github.com/vmassuchetto/shotwell-web-client/tree/master/shotwell_web_client]\n\n\n\n\nBuilding\n--------\n\nThese are instructions for Debian/Ubuntu, adjust the build\nprerequisites appropriately for other distros. First install the\nprerequisites with::\n\n    sudo apt install cmake g++ libopencv-dev libboost-all-dev \\\n                     libsqlite3-dev libscrypt-dev ffmpegthumbnailer \n    \nYou need a fairly decent C++ compiler, so on e.g. Ubuntu 18.04 you\nwill need to install clang and then do e.g.::\n\n    export CXX=/usr/bin/clang++-7\n    export CC=/usr/bin/clang-7    \n    \nWith gcc 7.4.0 (and possibly others) you will get errors about\n`std::experimental::optional\u003cT\u003e`.\n\nMake sure you checkout the git submodules:\n\n    cd shotweb\n    git submodule update --init --recursive\n\nThen build and install with::\n\n    cd shotweb\n    mkdir build\n    cd build\n    cmake ..\n    make\n    sudo make install\n\n\n\nRunning\n-------\n\nRun the shotweb server with::\n\n    shotweb [path-to-config-file]\n\nThe configuration file is a JSON file with the following content::\n\n    {\n        \"photo.db\":        \"/path/to/photo.db\",\n        \"auth.db\":         \"/path/to/auth.db\",\n        \"html_css_js_dir\": \"/usr/local/share/shotweb/\",\n        \"thumb_cache_dir\": \"/path/to/thumbnails/\",\n        \"old_root\":        \"\",\n        \"new_root\":        \"\",\n        \"port\":            8123,\n        \"title\":           \"title of your gallery\"\n    }\n\nThe meaning of the parameters is::\n\n  * photo.db:   \n        \n       The full path to the 'photo.db' database, as generated by\n       Shotwell. Use a copy if you can.\n       \n  * auth.db:\n  \n       The full path of the authentication database file\n       'auth.db'. Can be empty on start, in which case the first\n       access to shotweb will ask for a new admin name and password.\n       \n  * html_css_js_dir:\n  \n       The directory in which the HTML/CSS/JS files are stored. This\n       is typically '/usr/local/share/shotweb/' or similar.\n\n  * thumb_cache_dir:\n  \n       A path where shotweb will cache thumbnail images. You can\n       re-use the thumbnails produced by shotwell if you want, in\n       which case you should set this to something like\n       \n         `${HOME}/.cache/shotwell/thumbs/thumbs360/`\n\n  * old_root:\n  * new_root:\n  \n       If the location of the pictures on the shotweb server is *not*\n       the same as the location of the pictures on your shotwell\n       installation, shotweb needs to rewrite the paths in `photo.db`\n       in order to find the picture files. The `old_root` and\n       `new_root` settings are respectively the root of the picture\n       storage on your shotwell setup, and the root of the picture\n       storage on your shotweb server. You could have e.g::\n       \n           \"old_root\":   \"/home/user/Pictures/\",\n           \"new_root\":   \"/var/shotweb/pictures/\"\n           \n  * port:\n  \n       The IP port on which to run the server. If you want to run it\n       over https, the best idea is to run it behind an apache or\n       nginx web server and let that one proxy the connection to\n       shotweb. \n    \nOnce the server is running, you can access the site and setup your\nadministrator password (do this immediately!).\n\n    \n    \nVideo re-encoding\n-----------------\n\nShotweb will automatically convert all videos so they adapt to the\navailable bandwidth of the viewer, using HLS; see\n\n  [https://www.exoscale.com/syslog/self-hosted-videos/]\n\nfor more info. This uses the `video2hls` script taken from\n\n  [https://github.com/vincentbernat/video2hls]\n  \nVideo conversion is triggered by the shotweb server automatically, \nand it keeps a queue of videos to convert.\n  \n**WARNING:** This is a new feature; if you click on a video the\nconversion will start in the background, but you will need to reload\nthe event page (after the conversion has completed) to be able to view\nthe video.\n\n\n\nUsed libraries \n--------------\n\n* OpenCV [https://opencv.org]\n  For image manipulation and photo/video thumbnail generation.\n\n* sqlite_modern_cpp [https://github.com/SqliteModernCpp/sqlite_modern_cpp] \n  Used to access e.g. shotwell's sqlite database.\n  \n* nlohmann/json [https://github.com/nlohmann/json]\n  For json manipulation.\n\n* httplib.h [https://github.com/yhirose/cpp-httplib] \n  For web server functionality.\n\n* miniz-cpp [https://github.com/tfussell/miniz-cpp.git] \n  To create zip files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpeeters%2Fshotweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkpeeters%2Fshotweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkpeeters%2Fshotweb/lists"}