A comprehensive guide for setting up a production-ready Raspberry Pi server with Docker, nginx, SSL, and application deployment capabilities. This repository includes both detailed documentation and an interactive frontend showcase.
pi-server/
βββ docs/ # Original documentation
β βββ setup-guide.md # Complete step-by-step setup guide
β βββ pi-server-template.md # Server configuration template
β βββ full-stack-app-deployment-template.md # App deployment guide
β βββ wireguard-vpn-setup.md # VPN setup guide
β βββ server-docs/ # Application-specific guides
βββ frontend/ # Interactive showcase (React + TypeScript)
β βββ src/ # React application source
β βββ public/ # Static assets
β βββ package.json # Frontend dependencies
β βββ ... # Frontend configuration files
βββ template-files/ # Configuration templates
β βββ docker-compose.yml # Docker configuration
β βββ nginx-default.conf # Nginx configuration
β βββ wireguard-*.conf # VPN configurations
β βββ ... # Other templates
βββ README.md # This file
Experience the guide through a modern, interactive web interface:
cd frontend
npm install
npm run devRead the comprehensive markdown documentation:
- Setup Guide - Complete step-by-step server setup (5 phases)
- Server Template - Reusable template for new servers
- Full-Stack App Template - Deploy Vite/React + Node.js apps
- WireGuard VPN Setup - Secure remote access for Git operations
- π Remote Access: HTTPS via DuckDNS dynamic DNS
- π Security: Production-ready with firewall, SSL, and intrusion prevention
- π³ Containerization: Docker with Portainer management interface
- π¦ Application Hosting: Ready for portfolio applications
- π Automated Maintenance: Daily backups, weekly updates
- π SSH Authentication: Key-based authentication for GitHub and server access
- π VPN Access: WireGuard VPN for secure remote Git operations
- OS: Raspberry Pi OS Lite (64-bit)
- Containerization: Docker + Docker Compose
- Web Server: nginx with SSL termination
- Management: Portainer for Docker management
- Security: UFW firewall, fail2ban, Let's Encrypt SSL
- Applications: Node.js, React, Vite, TypeScript support
- Raspberry Pi 4 Model B (4GB+ RAM recommended)
- 64GB+ microSD card
- External storage drive (500GB+ recommended)
- Case with cooling (optional but recommended)
- Raspberry Pi Imager
- SSH client
- Basic command line knowledge
The setup is organized into 5 logical phases:
- Flash Raspberry Pi OS
- Configure SSH and WiFi
- Install Docker and Docker Compose
- Mount external drive
- Set up basic services
- Configure DuckDNS dynamic DNS
- Set up router port forwarding
- Install SSL certificates with Let's Encrypt
- Configure nginx for HTTPS
- Set up firewall and security measures
- Deploy portfolio applications
- Set up monitoring and logging
- Configure application-specific settings
- Disable unnecessary services
- Set up fail2ban for intrusion prevention
- Configure automated security updates
- Set up automated backups
- Configure maintenance scripts
- Test backup and restore procedures
- Configure router port forwarding for VPN access
- Install and configure WireGuard server on Pi
- Set up WireGuard client on local machine
- Test VPN connection and remote Git operations
- Read the Setup Guide for complete instructions
- Follow each phase in order for best results
- Use the templates for deploying your own applications
- Reference the troubleshooting guides if you encounter issues
After setup, you'll have a server accessible at:
- Main Site:
https://yourdomain.duckdns.org - Portainer:
https://yourdomain.duckdns.org:9000 - Applications:
https://yourdomain.duckdns.org/your-app/
Use the Full-Stack App Template which includes:
- Multi-stage Docker builds
- nginx proxy configuration
- Static file serving
- API endpoint routing
- Health check endpoints
- Weekly: Automated system updates
- Daily: Automated backups
- As needed: Application updates and deployments
- Portainer: Docker container management
- Health checks: Built-in application monitoring
- Logs: Centralized logging via Docker
- Docker containers not starting: Check logs with
docker logs [container-name] - SSL certificate issues: Verify DuckDNS and port forwarding
- Application not accessible: Check nginx configuration and proxy settings
- Build failures: Ensure all dependencies are installed in Dockerfile
- Check the troubleshooting sections in each guide
- Review the common issues and solutions
- Verify your configuration matches the examples
- Check Docker and nginx logs for specific errors
This setup has been successfully used to deploy:
- Progressive Web Applications (PWAs): React/Vue/Angular with offline capabilities
- Full-stack applications: Frontend + Backend with API integration
- Portfolio websites: Static and dynamic content
- API services: Node.js backends with database integration
- Development environments: Isolated development containers
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to:
- Report issues
- Suggest improvements
- Add new application deployment guides
- Improve documentation
For questions or issues:
- Check the troubleshooting guides
- Review the common issues sections
- Open an issue in this repository
Happy Server Building! π
Last updated: October 7, 2025
- Update
src/data/phases.tswith new phase data - Add route in
src/App.tsx - Update navigation in
src/components/Sidebar.tsx
- Modify
tailwind.config.jsfor theme customization - Update
src/index.cssfor global styles - Use Tailwind utility classes for component styling
- Edit phase content in
src/data/phases.ts - Update metadata in
index.html - Modify component text in respective files
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- ESLint configuration for consistent code style
- Prettier for code formatting
- TypeScript for type safety
The site is fully responsive with breakpoints:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
- WCAG 2.1 AA compliant
- Keyboard navigation support
- Screen reader friendly
- High contrast color scheme
- Focus indicators
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source and available under the MIT License.
- Raspberry Pi Foundation for the hardware
- Tailwind CSS for the utility-first CSS framework
- Lucide for the icons
- Prism.js for syntax highlighting