Turn your Raspberry Pi into a powerful private server!
This repository provides a ready-to-use setup to host databases, storage services, and applications using Docker.
docker-compose.yml
— Main Docker Compose file to launch servicesscripts/
— Helper scripts (Docker installation, start/stop containers)services/
— Custom applications and microservices (empty for now)infra/
— Configuration files for reverse proxy, Pi-hole, etc..env.example
— Template for environment variables.gitignore
— To protect sensitive files from being pushed
- Flash Raspberry Pi OS Lite (64-bit) onto your SD card.
- Enable SSH before first boot (add an empty file named
ssh
in the boot partition). - Connect to your Pi via SSH.
ssh pi@your-raspberry-pi-ip
Update your system:
sudo apt update && sudo apt upgrade -y
Run the provided installation script:
./scripts/install_docker.sh
This script will:
- Install Docker
- Install Docker Compose plugin
- Add your user to the
docker
group
Reboot your Raspberry Pi after running the script.
After rebooting, navigate to your project folder:
cd ~/raspberry-pi-server
Start all services:
docker compose up -d
- PostgreSQL (database) — port
5432
- MongoDB (database) — port
27017
- MinIO (S3 compatible storage) — ports
9000
(API) and9001
(Console)
- Copy
.env.example
to.env
and adjust your secrets. - Protect your Raspberry Pi (SSH keys, firewall, fail2ban).
- Never expose database ports to the internet without reverse proxy and authentication.
- Add Nginx Proxy Manager or Traefik as reverse proxy
- Deploy custom applications
- Add Pi-hole for network-wide ad blocking
- Set up automated backups and monitoring
This project is open source and available under the MIT License.
Happy Coding!