https://github.com/chandlertee/htpiec
Scripts and config for a Raspberry Pi home media + ebook server (the HTPieC) — companion to a chandlerthompson.dev post
https://github.com/chandlertee/htpiec
calibre home-lab htpc media-server plex raspberry-pi self-hosting
Last synced: 15 days ago
JSON representation
Scripts and config for a Raspberry Pi home media + ebook server (the HTPieC) — companion to a chandlerthompson.dev post
- Host: GitHub
- URL: https://github.com/chandlertee/htpiec
- Owner: chandlertee
- License: mit
- Created: 2026-05-31T20:46:52.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2026-06-06T22:05:57.000Z (22 days ago)
- Last Synced: 2026-06-08T06:34:47.477Z (20 days ago)
- Topics: calibre, home-lab, htpc, media-server, plex, raspberry-pi, self-hosting
- Language: Shell
- Homepage: https://chandlerthompson.dev/posts/build-an-htpiec-home-theater-pc/
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# htpiec
The scripts and config behind my Raspberry Pi home media + ebook server — the "HTPieC."
Companion to the post: **[Build a HTPieC: your ultimate home theater Pie computer](https://chandlerthompson.dev/posts/build-an-htpiec-home-theater-pc/)**.
A low-power Pi 5 running:
- **Plex** for movies and shows
- a **Calibre** content server for an ebook library over HTTP
- external SSD/HDD mounts for media + backup
- a nightly `rsync` backup
These are samples to adapt, not a turnkey image. Device names (`/dev/sda1`), paths, and ports depend on your hardware — read each script before running it, since they use `sudo`.
## Hardware
- Raspberry Pi 5 (8GB); a Pi Zero 2 W works for lighter libraries
- 128GB microSD (OS)
- External SSD (media) + external HDD (backup)
- A power supply rated for the Pi 5's 5V/5A draw
## Quick start
```bash
git clone https://github.com/chandlertee/htpiec ~/htpiec
cd ~/htpiec
# 1. Install Plex, Calibre, and backup tooling
./scripts/install.sh
# 2. Mount your drives (see config/fstab.sample), then create the library dirs
sudo mkdir -p /mnt/media /mnt/backup
# 3. Run the Calibre content server as a managed service
sudo cp systemd/calibre-server.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now calibre-server
# 4. Schedule the nightly backup
crontab config/htpiec-backup.cron
```
## What's here
| Path | What it does |
|---|---|
| `scripts/install.sh` | Installs Plex (current signing-key method), Calibre, rsync, smartmontools; enables SSH |
| `scripts/backup.sh` | Incremental `rsync` of `/mnt/media` → `/mnt/backup` — defaults to a dry run, logs each run |
| `systemd/calibre-server.service` | Runs `calibre-server` as a managed service (the blog post starts it by hand) |
| `config/fstab.sample` | Example `/etc/fstab` entries for the media + backup drives |
| `config/htpiec-backup.cron` | The nightly 2 AM backup schedule |
## Notes
- **Expose it safely.** If you forward ports, terminate TLS (Let's Encrypt). Don't serve library contents or session credentials over plain HTTP.
- **Retro gaming.** The same Pi can host RetroPie — see [Networked retro gaming](https://chandlerthompson.dev/posts/networked-retro-gaming-retropie-arcade/).
## License
MIT — see [LICENSE](LICENSE).