Skip to content

BipulRaman/LANPics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LANPics

A lightweight photo & video album viewer for your home network. Drop your folders of images/videos, start the server, and anyone on your WiFi can browse them from any device.

Node.js Express License

Features

  • Auto-discovers albums — scans your photos folder recursively; each leaf folder with images/videos becomes an album
  • Thumbnails — auto-generated and cached for fast loading
  • Video support — plays MP4, MKV, MOV, WebM and more right in the browser
  • Full-screen lightbox — keyboard arrows, swipe on mobile, click outside to close
  • LAN accessible — binds to 0.0.0.0 so any device on your WiFi can view
  • Responsive — works on phones, tablets, and desktops
  • Config file — change port and photos folder without touching code

Quick Start

1. Install dependencies

cd D:\Workbench\LANHub
npm install

2. Configure

Copy .env.example to .env and edit it:

PHOTOS_FOLDER=E:\YOUR_FOLDER
Setting Description
PHOTOS_FOLDER Absolute path to your root photos/videos folder

3. Run

npm start

Open http://localhost (or your LAN IP) in a browser.


Permanent Hosting with PM2

PM2 keeps LANPics running in the background and auto-starts it when your PC boots.

Install PM2 (one-time)

npm install -g pm2
npm install -g pm2-windows-startup

Start LANPics with PM2

cd D:\Workbench\LANHub
pm2 start server.js --name lanpics
pm2 save

Enable auto-start on Windows boot

pm2-startup install

Useful PM2 Commands

Command What it does
pm2 list Show running processes
pm2 logs lanpics View live logs
pm2 restart lanpics Restart (after config changes)
pm2 stop lanpics Stop the server
pm2 start lanpics Start it again
pm2 monit Real-time monitoring dashboard

Unhosting / Removing

Stop and remove from PM2

pm2 stop lanpics
pm2 delete lanpics
pm2 save

Remove auto-start on boot

pm2-startup uninstall

Fully uninstall PM2 (optional)

npm uninstall -g pm2
npm uninstall -g pm2-windows-startup

Finding Your LAN IP

Run this in a terminal to find the URL to share:

ipconfig | findstr "IPv4"

Share the IP with people on your WiFi, e.g. http://192.168.29.65

Since port 80 is the default HTTP port, no :port is needed in the URL.

Project Structure

LANHub/
├── config.json        # Port & folder settings
├── server.js          # Express server
├── package.json
├── public/
│   └── index.html     # Frontend (single-page app)
└── thumbcache/        # Auto-generated thumbnails (gitignored)

License

MIT

About

A lightweight photo & video album viewer for your home network. Drop your folders of images/videos, start the server, and anyone on your WiFi can browse them from any device.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors