Lesma
Self-HostedOpen-source self-hosted pastebin with syntax highlighting
Overview
Lesma is a lightweight, privacy-focused self-hosted pastebin for sharing code snippets and plain text. It supports syntax highlighting for over 100 programming languages, markdown rendering, and customizable expiration dates for pastes. Deployment is simple—use Docker for quick setup or run as a standalone binary. With Lesma, you retain full control over your data, avoiding third-party services. It offers optional password protection for sensitive content, a minimal interface to focus on content, and fast performance ideal for developers or anyone needing a private paste solution.
Self-Hosting Resources
Below is a reference structure for docker-compose.yml.
⚠️ Do NOT run blindly. Replace placeholders with official values.
version: '3'
services:
lesma:
image: <OFFICIAL_IMAGE_NAME>:latest
container_name: lesma
ports:
- "8080:<APP_INTERNAL_PORT>"
volumes:
- ./data:/app/data
restart: unless-stopped Key Features
- Syntax highlighting for 100+ programming languages
- Customizable paste expiration dates
- Easy deployment via Docker or standalone binary
Frequently Asked Questions
? Is Lesma hard to install?
No—Lesma offers straightforward deployment options: use a pre-built Docker image for one-click setup or download a standalone binary for direct execution. The official GitHub repo provides step-by-step instructions suitable for users with basic server experience.
? Is Lesma a good alternative to Pastebin.com?
Yes—Lesma delivers core pastebin functionality (syntax highlighting, text sharing) with the key advantage of self-hosting (data privacy). It lacks Pastebin’s public discovery or paid plans but is ideal for those prioritizing control over their content.
? Is Lesma completely free?
Yes—Lesma is open-source (MIT license) and 100% free to use, modify, and self-host. There are no subscription fees or restrictions on features.
Top Alternatives
People Also Ask about Lesma
Tool Info
Pros
- ⊕ Privacy-focused (self-hosted data control)
- ⊕ No subscription fees or hidden costs
- ⊕ Lightweight and fast performance
Cons
- ⊖ Lacks multi-user authentication (default single-user/private use)
- ⊖ Limited advanced features compared to enterprise pastebins
- ⊖ Requires basic server knowledge for self-hosting