Skip to content

Pastebox

A lightweight, self-hostable alternative to Pastebin for sharing text and files on your local network. Perfect for quick file transfers and text sharing between devices without leaving your network.

References


Make directory

Terminal window
mkdir -p {{DOCKER_PATH_VAR}}/pastebox && cd {{DOCKER_PATH_VAR}}/pastebox

docker-compose.yml

Terminal window
nano docker-compose.yml
docker-compose.yml
services:
pastebox:
image: huffmanks/pastebox
container_name: pastebox
ports:
- "3000:3000"
volumes:
- uploads:/app/uploads
- data:/app/data
environment:
NODE_ENV: production
DATABASE_URL: ${DATABASE_URL}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL}
restart: unless-stopped
volumes:
uploads:
data:

.env

Terminal window
nano .env
.env
NODE_ENV=production
DATABASE_URL=file:./data/prod.db
NEXT_PUBLIC_APP_URL=http://localhost:3000

Start container

Terminal window
docker compose up -d

Open web ui

http://localhost:3000 or http://{{SERVER_IP_VAR}}:3000