Skip to content

Latest commit

 

History

History
131 lines (93 loc) · 2.54 KB

File metadata and controls

131 lines (93 loc) · 2.54 KB

🚀 Pastebox Quick Start Guide

Get up and running with Pastebox in 5 minutes!

Step 1: Start Required Services

# 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"

Step 2: Build Pastebox

cd /Users/xcode/Desktop/test/pastebox
make build

Step 3: Start the Router Daemon

# In a new terminal window:
./bin/router --config config.yaml

You should see:

✓ MongoDB connected
✓ Redis connected
✓ HTTP server listening on :8080
✓ SSH server listening on :2222

Step 4: Your First Pastebox

# 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)

Step 5: Upload Files

# 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

Step 6: Download Files

# Connect again
sftp -P 2222 box-1704384000@localhost

# Download the file
sftp> get test.txt downloaded_test.txt
sftp> bye

# Verify
cat downloaded_test.txt

🎉 Success!

You've just: ✅ Created an encrypted pastebox
✅ Uploaded a file
✅ Downloaded a file

Next Steps

  • Read the Complete Tutorial
  • Try different encryption algorithms
  • Explore the HTTP API
  • Set up monitoring with Prometheus

Common Commands

# 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 health

Troubleshooting

Can'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