LogPaste logo

LogPaste

  •  0 ratings
In category: Pastebins

About LogPaste

Minimal pastebin web app that's easy to self-host and persists data to any S3-compatible backend.

  •   434  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: N/A  
  •   N/A  
  •   N/A  
  •  Latest commit: N/A  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about LogPaste

logpaste

CircleCI Docker Pulls License

A minimalist web service for uploading and sharing log files.

LogPaste animated demo

Features

  • Accept text uploads from command-line, JavaScript, and web UI
  • Simple to deploy
  • Runs in a single Docker container
  • Fits in the free tier of Heroku
  • Easy database management
  • Syncs persistent data to any S3-compatible cloud storage provider
  • Customizable UI without changing source code

Demo

Run LogPaste

From source

PORT=3001 go run cmd/logpaste/main.go

From Docker

To run LogPaste within a Docker container, mount a volume from your local system to store the LogPaste sqlite database.

docker run \
  -e "PORT=3001" \
  -p 3001:3001/tcp \
  --volume "${PWD}/data:/app/data" \
  --name logpaste \
  mtlynch/logpaste

From Docker + cloud data replication

If you specify settings for an S3 bucket, LogPaste will use Litestream to automatically replicate your data to S3.

You can kill the container and start it later, and it will restore your data from the S3 bucket and continue as if there was no interruption.

LITESTREAM_ACCESS_KEY_ID=YOUR-ACCESS-ID
LITESTREAM_SECRET_ACCESS_KEY=YOUR-SECRET-ACCESS-KEY
LITESTREAM_REGION=YOUR-REGION
DB_REPLICA_URL=s3://your-bucket-name/db

docker run \
  -e "PORT=3001" \
  -e "LITESTREAM_ACCESS_KEY_ID=${LITESTREAM_ACCESS_KEY_ID}" \
  -e "LITESTREAM_SECRET_ACCESS_KEY=${LITESTREAM_SECRET_ACCESS_KEY}" \
  -e "LITESTREAM_REGION=${LITESTREAM_REGION}" \
  -e "DB_REPLICA_URL=${DB_REPLICA_URL}" \
  -p 3001:3001/tcp \
  --name logpaste \
  mtlynch/logpaste

Some notes:

  • Only run one Docker container for each S3 location
  • LogPaste can't sync writes across multiple instances.

With custom site settings

LogPaste offers some options to customize the text for your site. Here's an example that uses a custom title, subtitle, and footer:

SITE_TITLE="My Cool Log Pasting Service"
SITE_SUBTITLE="Upload all your logs for FooBar here"
SITE_FOOTER="<h2>Notice</h2><p>Only cool users can share logs here.</p>"
SITE_DARK_MODE="true"
SITE_SHOW_DOCUMENTATION="false" # Hide usage information from homepage
PER_MINUTE_LIMIT="5" # Allow only 5 pastes per minute per IP

docker run \
  -e "PORT=3001" \
  -e "SITE_TITLE=${SITE_TITLE}" \
  -e "SITE_SUBTITLE=${SITE_SUBTITLE}" \
  -e "SITE_FOOTER=${SITE_FOOTER}" \
  -e "SITE_DARK_MODE=${SITE_DARK_MODE}" \
  -e "SITE_SHOW_DOCUMENTATION=${SITE_SHOW_DOCUMENTATION}" \
  -e "PER_MINUTE_LIMIT=${PER_MINUTE_LIMIT}" \
  -p 3001:3001/tcp \
  --name logpaste \
  mtlynch/logpaste

Parameters

Command-line flags

Flag Meaning Default Value
-title Title to display on homepage "LogPaste"
-subtitle Subtitle to display on homepage "A minimalist, open-source debug log upload service"
-footer Footer to display on homepage (may include HTML)
-darkmode Whether to use dark mode theme on homepage false
-showdocs Whether to display usage documentation on homepage true
-perminutelimit Number of pastes to allow per IP per minute 0 (no limit)

Docker environment variables

You can adjust behavior of the Docker container by passing these parameters with docker run -e:

Environment Variable Meaning
PORT TCP port on which to listen for HTTP connections (defaults to 3001)
PS_BEHIND_PROXY Set to y if running behind an HTTP proxy to improve logging
SITE_TITLE Value to set the -title command-line flag
SITE_SUBTITLE Value to set the -subtitle command-line flag
SITE_FOOTER Value to set the -footer command-line flag
SITE_DARK_MODE Value to set the -darkmode command-line flag
SITE_SHOW_DOCUMENTATION Value to set the -showdocs command-line flag
PER_MINUTE_LIMIT Value to set the -perminutelimit command-line flag
DB_REPLICA_URL S3 URL where you want to replicate the LogPaste datastore (e.g., s3://mybucket.mydomain.com/db)
LITESTREAM_REGION AWS region where your S3 bucket is located
LITESTREAM_ACCESS_KEY_ID AWS access key ID for an IAM role with access to the bucket where you want to replicate data.
LITESTREAM_SECRET_ACCESS_KEY AWS secret access key for an IAM role with access to the bucket where you want to replicate data.

Docker build args

If you rebuild the Docker image from source, you can adjust the build behavior with docker build --build-arg:

Build Arg Meaning Default Value
litestream_version Version of Litestream to use for data replication v0.3.9

Deployment

LogPaste is easy to deploy to cloud services. Here are some places it works well:

Further reading

Comments (0)

Please login to join the discussion on this project.

LogPaste Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

Hastebin logo
Hastebin cover

Hastebin

Open source pastebin. (This is a fork with extended mainten…

MokinToken logo
MokinToken cover

MokinToken

Clientside encrypted pastebin using tweetnacl.

pb logo
pb cover

pb

Lightweight pastebin (and url shortener) built using flask.