1b4b497fdf
Mirror to GitHub / mirror (push) Successful in 44s
Test and Lint / backend-test (push) Successful in 1m42s
Test and Lint / frontend-test (push) Has been cancelled
Version and Release / version-bump (push) Has been cancelled
Version and Release / trigger-drone (push) Has been cancelled
- Remove all console.log/debug statements from production code - Add NODE_ENV checks for development-only logging - Remove test scripts (test-feedback, test-image-security, test-backup-*, test-restore) - Remove one-time fix scripts (fix-temp-photos, fix-migration-state, mark-migration-applied) - Remove sensitive files (.env.backup, ADMIN_CREDENTIALS.txt) - Update package.json to remove references to deleted scripts - Replace console statements with logger utility in backend - Secure error boundaries to not expose stack traces in production This makes the codebase production-ready with no debug output or test scripts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7.3 KiB
7.3 KiB
🚀 PicPeak Beta Setup Guide
This guide helps non-technical users install PicPeak on Raspberry Pi or VPS systems using the automated setup script.
📋 Quick Setup
Step 1: Download and Run Setup Script
# Download PicPeak
wget -O setup-picpeak.sh https://raw.githubusercontent.com/the-luap/picpeak/main/setup-picpeak.sh
# Make it executable
chmod +x setup-picpeak.sh
# Run the setup
bash setup-picpeak.sh
Or in one command:
curl -fsSL https://raw.githubusercontent.com/the-luap/picpeak/main/setup-picpeak.sh | bash
Step 2: Follow the Interactive Prompts
The script will guide you through:
- ✅ System requirements check
- 🐋 Docker installation (if needed)
- 🌐 Domain/IP configuration
- 📧 Email setup (optional)
- 🔐 Automatic password generation
- 📦 PicPeak download and configuration
- 🚀 Service startup
📋 Prerequisites
Minimum System Requirements
- OS: Ubuntu, Debian, Raspberry Pi OS, CentOS, or Fedora
- RAM: 2GB minimum (script will warn if less)
- Storage: 20GB free space minimum
- Network: Internet connection for downloads
Supported Systems
- ✅ Ubuntu 20.04+
- ✅ Debian 11+
- ✅ Raspberry Pi OS (32-bit and 64-bit)
- ✅ CentOS 7+
- ✅ Fedora 30+
🛠️ What the Script Does
Automatic Installation
- System Check: Verifies RAM, disk space, and architecture
- Docker Setup: Installs Docker and Docker Compose if missing
- Network Configuration: Helps configure domain/IP access
- Email Configuration: Optional setup for Gmail, SendGrid, or custom SMTP
- Security: Generates secure passwords automatically
- Service Deployment: Downloads, builds, and starts PicPeak
- SSL Support: Optional Let's Encrypt SSL setup
Generated Configurations
- Secure JWT secret (64 hex characters)
- Database password (PostgreSQL)
- Redis password
- Environment configuration file
- Docker Compose setup
🌐 Network Configuration Options
1. Local Network Access (Default)
- Uses your local IP address
- Accessible only on your local network
- Perfect for home/office use
2. Public IP Access
- Uses your server's public IP
- Accessible from the internet
- Requires firewall configuration
3. Domain Name
- Uses your custom domain (e.g., photos.mydomain.com)
- Supports SSL/HTTPS with Let's Encrypt
- Professional setup
4. Development Mode
- Uses localhost
- Only accessible from the same machine
- Good for testing
📧 Email Configuration
Gmail (Recommended for Beginners)
- Enable 2-Factor Authentication on your Google account
- Generate an App Password for PicPeak
- Use your Gmail address and the App Password
SendGrid (Recommended for Production)
- Sign up at sendgrid.com (free tier: 100 emails/day)
- Create an API key
- Verify your sender email address
Custom SMTP
- Use any SMTP server
- Configure host, port, security, and credentials
Skip Email Setup
- Configure later in the admin panel
- PicPeak works without email but notifications won't be sent
🔐 Security Features
Automatic Password Generation
- JWT secret: 64 hex characters
- Database password: 32 base64 characters (no $ symbols)
- Redis password: 32 base64 characters (no $ symbols)
First Login Security
- Auto-generated admin password shown in setup
- Mandatory password change on first login
- Strong password requirements enforced
SSL/HTTPS Support
- Optional Let's Encrypt integration
- Automatic nginx reverse proxy setup
- Forced HTTPS redirects
📍 Access Information
After successful installation, you'll get:
Access URLs
- Gallery:
http://your-domain:3000(orhttps://your-domainwith SSL) - Admin Panel:
http://your-domain:3001/admin(orhttps://your-domain/adminwith SSL)
Admin Credentials
- Email:
admin@example.com - Password: Auto-generated (shown during setup)
🚨 Important First Steps
1. Change Admin Password
- The password change is mandatory for security
- You cannot skip this step
- New password requirements:
- Minimum 12 characters
- Mixed case letters
- Numbers and special characters
2. Configure Email (if skipped)
- Login to admin panel
- Go to Settings → Email Configuration
- Enter your SMTP details
- Test email sending
3. Create Your First Gallery
- Go to Admin Panel → Events
- Click "Create New Event"
- Upload photos to the generated folders
- Share the gallery URL and password
🛠️ Management Commands
Service Management
# View logs
cd ~/picpeak && docker compose logs -f
# Stop services
cd ~/picpeak && docker compose down
# Start services
cd ~/picpeak && docker compose up -d
# Restart services
cd ~/picpeak && docker compose restart
Admin Password Reset
# Reset admin password
docker exec picpeak-backend node scripts/show-admin-credentials.js --reset
Updates
cd ~/picpeak
git pull
docker compose down
docker compose build
docker compose up -d
🐛 Troubleshooting
Common Issues
"Permission denied" when running script
chmod +x setup-picpeak.sh
"Docker command not found" after installation
# Log out and back in, or run:
newgrp docker
Can't access web interface
- Check if services are running:
docker compose ps - Check firewall:
sudo ufw allow 3000andsudo ufw allow 3001 - Verify URLs in browser match the setup configuration
502 Bad Gateway
- Wait 60 seconds for services to fully start
- Check backend logs:
docker compose logs backend - Restart frontend:
docker restart picpeak-frontend
Email not working
- Verify SMTP settings in admin panel
- Check email queue: Admin Panel → Settings → Email
- Test with a simple service like Gmail first
Getting Help
- Check the logs:
docker compose logs -f - Review this guide and the main deployment guide
- Search existing GitHub issues
- Create a new issue with:
- Error messages
- System information (
uname -a) - Setup choices made
📁 File Locations
After installation:
- Installation directory:
~/picpeak - Photos:
~/picpeak/storage/events/ - Logs:
~/picpeak/logs/ - Database: Docker volume
picpeak_postgres-data - Backups:
~/picpeak/backup/
🔒 Security Recommendations
For Internet-Facing Installations
- Use HTTPS: Enable SSL during setup
- Firewall: Only open ports 80 and 443
- Updates: Keep system and Docker updated
- Backups: Configure automatic backups in admin panel
- Monitoring: Regularly check logs for suspicious activity
For Local Network Use
- Strong passwords: Use the auto-generated passwords
- Network security: Secure your local network
- Regular backups: Even for local use
- Access control: Only share admin credentials with trusted users
🎯 Next Steps
After installation:
- Complete admin setup (change password)
- Configure email notifications
- Create your first test gallery
- Set up automated backups
- Customize themes and branding
- Configure analytics (optional)
📞 Support
- Documentation: Check the main deployment guide
- Issues: GitHub Issues page
- Community: GitHub Discussions
- Updates: Star the repository for notifications
PicPeak Beta Setup Script v1.0 - Making photo sharing simple for everyone! 📸