LocalBin is a lightweight, self-hosted, file-based pastebin designed for speed and simplicity. Perfect for sharing code snippets securely within a local network or as a private instance.
- 🚀 Lightning Fast: Built with Express.js for minimal overhead.
- 📂 No Database Required: Uses simple JSON files for storage.
- 🔐 Secure: Optional password protection using
bcrypthashing. - 🕒 Auto-Cleanup: Set expiration times for pastes (1h, 24h, 7d, 30d).
- 🎨 Syntax Highlighting: Supports 30+ languages out of the box.
- 📱 Mobile Friendly: Fully responsive UI with a modern dark mode.
-
Clone the repository:
git clone https://github.com/moterrry/localbin.git cd localbin -
Install dependencies:
npm install
-
Configure Environment: Copy the example environment file and adjust variables if needed:
cp .env.example .env
-
Start the server:
npm start
The app will be running at
http://localhost:3000.
You can configure LocalBin using environment variables:
| Variable | Description | Default |
|---|---|---|
PORT |
The port the server listens on | 3000 |
PASTE_DIR |
Directory where paste files are stored | ./pastes |
- Paste your code into the editor.
- Select the syntax highlighting language.
- (Optional) Set an expiration time.
- (Optional) Set a password to protect the paste.
- Click Share to get a unique URL.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Terry
