Get up and running with Pastebox in 5 minutes!
# Start MongoDB
brew services start mongodb-community
# Start Redis
brew services start redis
# Verify they're running
mongosh --eval "db.version()" # Should show version
redis-cli ping # Should return "PONG"cd /Users/xcode/Desktop/test/pastebox
make build# In a new terminal window:
./bin/router --config config.yamlYou should see:
✓ MongoDB connected
✓ Redis connected
✓ HTTP server listening on :8080
✓ SSH server listening on :2222
# In another terminal:
# 1. Get authentication token
./bin/pasteboxctl auth --user alice
export PASTEBOX_TOKEN="<paste-the-token-here>"
# 2. Create an encrypted box (expires in 1 hour)
./bin/pasteboxctl create --encrypt --passphrase "my-secret" --ttl 3600
# Note the box ID from the output (e.g., box-1704384000)# Create a test file
echo "Hello from Pastebox!" > test.txt
# Connect via SFTP (replace box-ID with your actual box ID)
sftp -P 2222 box-1704384000@localhost
# Upload the file
sftp> put test.txt
sftp> ls
sftp> bye# Connect again
sftp -P 2222 box-1704384000@localhost
# Download the file
sftp> get test.txt downloaded_test.txt
sftp> bye
# Verify
cat downloaded_test.txtYou've just:
✅ Created an encrypted pastebox
✅ Uploaded a file
✅ Downloaded a file
- Read the Complete Tutorial
- Try different encryption algorithms
- Explore the HTTP API
- Set up monitoring with Prometheus
# List all boxes
./bin/pasteboxctl list
# Check box status
./bin/pasteboxctl status box-ID
# Delete a box
./bin/pasteboxctl kill box-ID
# Check system health
./bin/pasteboxctl healthCan't connect?
- Make sure router daemon is running
- Check MongoDB and Redis are running
Authentication failed?
- Get a new token:
./bin/pasteboxctl auth --user alice - Export it:
export PASTEBOX_TOKEN="token"
Box not found?
- Check if it expired (TTL)
- List active boxes:
./bin/pasteboxctl list
For detailed documentation, see the Complete Tutorial