Sign inSign up

tomi311/lan-paste

By tomi311

•Updated 2 days ago

A lightweight, self-hosted paste service for sharing text across your local network.

Image
0

62

tomi311/lan-paste repository overview

⁠LAN Paste

A lightweight, self-hosted paste service for your local network.

LAN Paste lets you quickly share text between devices using a web browser or HTTP API. Host it on your own machine, home server, or lab server, and access it from devices that can reach the host.

⁠Features

  • Self-hosted: Run the service on your own infrastructure.
  • Browser interface: Create and view pastes through the web UI.
  • HTTP API: Create pastes programmatically.
  • Persistent storage: Keep application data in a Docker volume.
  • Configurable expiration: Set the default paste lifetime.
  • Containerized deployment: Pull and run the published image without building from source.

⁠Quick start

⁠1. Prepare your admin token

Generate a strong random token:

openssl rand -hex 32

Copy the generated value and keep it somewhere secure.

⁠2. Start the container

Replace YOUR_GENERATED_TOKEN with the token you generated.

docker run -d \
  --name lan-paste \
  --restart unless-stopped \
  -p 8000:8000 \
  -e PASTE_ADMIN_TOKEN="YOUR_GENERATED_TOKEN" \
  -e DEFAULT_TTL_HOURS=24 \
  -v lan-paste-data:/data \
  tomi311/lan-paste:latest
⁠3. Open LAN Paste

Visit:

http://localhost:8000⁠

To access the service from another device, use the host machine's LAN IP address:

http://YOUR_SERVER_IP:8000

Ensure the host firewall and network configuration allow access from the intended devices.

For local-only access, change the port mapping to 127.0.0.1:8000:8000.

⁠Configuration

VariablePurpose
PASTE_ADMIN_TOKENRequired secret for administrative operations
DEFAULT_TTL_HOURSDefault paste lifetime in hours
DATA_DIRApplication data directory; defaults to /data

The named Docker volume lan-paste-data preserves application data across container restarts and replacements.

⁠Updating

Pull the latest published image and recreate the container using the same configuration and volume.

docker pull tomi311/lan-paste:latest

Back up important data before replacing containers or changing deployments.

⁠API and development

The project includes an HTTP API for creating pastes. Consult the GitHub repository for endpoint details, development instructions, configuration, and tests.

⁠Security

  • Use a strong, unique admin token.
  • Do not expose the service directly to the public internet without an appropriate security review and deployment configuration.
  • Use a reverse proxy with HTTPS if remote access requires it.
  • Restrict network access to trusted devices.
  • Keep the image updated and back up persistent data.

LAN Paste is designed for self-hosted use. Review the project's documentation before deploying it in a production environment.

Tag summary

Content type

Image

Digest

sha256:ef750d2ec…

Size

43.1 MB

Last updated

2 days ago

docker pull tomi311/lan-paste