Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LANBin

A simple pastebin + file sharing server for your local network. No accounts, no auth, no cloud — just paste text or toss files between your devices.

What is it

I wanted something like Pastebin for quick sharing between my various devices — my phone, a guest's laptop, my desktop, the kitchen computer. Something I could just fire up and immediately start tossing links and snippets around without signing into anything.

It is evolving into a kind of dashboard for my LAN.

It goes without saying but I need to really underline that there is NO AUTHENTICATION — that's kind of the idea, quick and dirty to share links and stuff back and forth without having to create user accounts and permissions. Furthermore, it includes file upload and a remote file browser, and would be trivial to exploit for arbitrary code execution. This is a LAN tool. Don't expose it to the internet unless you enjoy chaos.

Features

Snippet Pasting

  • Create and share text snippets from any device on the network
  • Syntax highlighting for 15+ languages (Python, JS, Bash, SQL, Go, Rust, etc.)
  • URLs are automatically clickable
  • Pin important snippets to the top
  • Set expiration (1 hour, 1 day, 1 week, or never)
  • Copy to clipboard
  • Source IP and timestamp on each snippet

File Sharing

  • Upload any file type — drag and drop or click to browse, multiple files at once
  • Download files from any device on the LAN
  • Image thumbnails with gallery view
  • File size display
  • Delete files when you're done with them

Remote File Browser

  • Browse the host filesystem from any device on the network
  • Navigate with breadcrumbs or type an absolute path
  • Create new folders
  • Upload files to any directory
  • Rename files and directories inline
  • Delete files and directories (root-level paths like /home or C:\Users are protected from deletion and rename)
  • Back up files before replacing them (creates a .bak copy, won't recursively back up .bak files)
  • Multi-file drag-and-drop upload
  • Windows drive letter support

Custom Nav Links

  • Hit the + button in the navbar to add your own bookmarks
  • Links persist across restarts (stored in navlinks.json)
  • Each link gets a tiny × to remove it when you're done
  • Handy for linking to other services on your LAN

System Stats

  • Live CPU, memory, and disk I/O meters in the navbar
  • Color-coded bars — green under 70%, orange 70-90%, red over 90%
  • Polls every 2 seconds via a background sampler thread

UI

  • Dark theme with purple accents (light mode is for psychopaths)
  • QR code so you can pull it up on your phone instantly
  • Random ASCII art banner on each page load (pretty 1337)
  • Responsive layout for mobile
  • Toast confirmations before destructive actions

Setup

You'll need Python 3 with Flask and psutil:

pip install flask psutil
python3 LANBin.py

executing the python code

It'll tell you the IP and port in the terminal. Default is port 5000.

Configuration

Environment Variable Default What it does
LANBIN_PORT 5000 Port to serve on
LANBIN_BROWSER_ROOT / (Linux) or C:/ (Windows) Root directory for the file browser

File Structure

LANBin.py          — the whole server
templates/
  home.html        — main paste + file upload page
  snippet.html     — individual snippet view
  browser.html     — remote file browser
banner.txt         — ASCII art banners (separated by ---)
files/             — uploaded files live here
snippets.json      — created at runtime, stores your snippets
navlinks.json      — created at runtime, stores your custom nav bookmarks

Fair Warning

This thing has zero access control by design. Anyone on your network can read, write, upload, and browse. That's a feature, not a bug — but it does mean you should only run this on networks you trust.

About

A simple pastebin style python server that lets you write over http without authentication

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages