Giter Site home page Giter Site logo

veerendra2 / raspberrypi-homeserver Goto Github PK

View Code? Open in Web Editor NEW
56.0 5.0 4.0 1.54 MB

A collection of applications and tools to make awesome Raspberry Pi homerserver

Home Page: https://veerendra2.github.io/posts/home-server-setup/

License: Apache License 2.0

Shell 42.84% Jinja 25.25% Python 31.91%
raspberry-pi ansible docker docker-compose homeserver pihole filebrowser grafana jellyfin nextcloud

raspberrypi-homeserver's Introduction

GitHub GitHub Repo stars GitHub forks GitHub issues GitHub release (release name instead of tag name)

Raspberry Pi Homeserver

A collection of self-host docker swarm stacks

PiHole
PiHole
Grafana
Grafana
Prometheus
Prometheus
Portainer
Portainer
Homer
Homer
ufw
ufw
Filebrowser
Filebrowser
Jellyfin
Jellyfin
Nextcloud
Nextcloud
Traefik
Traefik
Wireguard
Wireguard
qBittorrent
qBittorrent
Radarr
Radarr
Sonarr
Sonarr
Jackett
Jackett
SearXNG
SearXNG
Vaultwarden
Vaultwarden
rest-server
rest-server
(Restic)
IT-Tools
IT-Tools


Docker Swarm

Table of Contents

Features

  • Automated with Ansible
  • All services are deployable on docker swarm
  • Traefik reverse proxy
  • Grafana dashboards to view
    • System metrics
    • Internet speed everyone hour
    • Uptime with blackbox exporter
    • Docker container metrics
  • Homer dashboard to view all services
  • Uncomplicated firewall
  • qBittorrent with Wireguard proxy and kill switch with healthcheck

My Raspberry Pi Config

PiHole Grafana
Model Raspberry Pi 4 Model B Rev 1.4
CPU BCM2835 (4) @ 1.800GHz
Memory 8 GB
OS Ubuntu 22.04.2 LTS aarch64
Case Geekworm NASPi Gemini 2.5 V2.0 Dual 2.5 Inch SATA HDD/SSD
Disks - 1 TB Crucial SSD
- 1 TB Western Digital HDD
Docker Swarm Nodes 1 (Single node docker swarm cluster)

Dashboard

image

Architecture Diagram

Architecture

Getting Started

Refer Gitbook Docs for more details and how to deploy manually

Ansible automation works well, if all services are intended to deploy on single box. Since I have only one machine, don't have to worry about the docker volumes, all of my docker volumes stored on single SSD mounted to host.

$ git clone https://github.com/veerendra2/raspberrypi-homeserver.git
$ cd raspberrypi-homeserver
# review vars.yml and inventory.yml and run
$ ansible-playbook main.yml

NOTE

  • This setup is created to deploy all services on single node docker swarm cluster. If you want to use this setup on multi node swarm cluster, there are some additional tweaks required like
    • Change placement
      ...
        deploy:
          replicas: 1
          placement:
            constraints: [node.role == manager]
      ...
  • Currently I'm using duckdns sub-domain (Refer example -> services/traefik/docker-stack.yml#32). Refer my blog post to get more info.
  • Update docker volume mount paths.

Related Blogs

raspberrypi-homeserver's People

Contributors

veerendra2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

raspberrypi-homeserver's Issues

Wiki Pages

Write documentation in wiki pages for all apps

Make Anisible Role for each app

  • Review and create ansible role for each app
  • docker-compose.yml should generate from jinja template with variables like
    • docker image version
    • UID & GID
    • hostname and container_name

Ignore "Host not found" in nginx location

Ngnix is failing to start if any of specified location is down

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2022/12/27 20:36:03 [emerg] 1#1: host not found in upstream "pihole" in /etc/nginx/conf.d/locations/pihole.conf:2
nginx: [emerg] host not found in upstream "pihole" in /etc/nginx/conf.d/locations/pihole.conf:2
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh

Solutions

Miscellaneous bugs

  • * Generate ssh key pair
  • * become: yes for disabling bluetooth
  • * Fix traefik name while deploying
  • * Check apps are installed and then install
  • * Windows VS code ssh explorer

Test Pihole

  • Test Pihole in LAN
  • Configure devices to use PiHole in automated way or check for manual

NOTE

  • Our router doesn't support add DNS server
  • Does it required to DHCP server?

Review `vars` and `secrets`

  • Review vars and secrets.
  • Check which vars and secrets are moved and placed
  • Check directory structure, try to keep simple

pihole-FTL: no process found

veerendra@atom:~/projects/raspberrypi-homeserver/apps/pihole$ sudo docker-compose up
...
  [✓] Creating new gravity databases
pihole    |   [i] Storing downloaded domains in new gravity database...Stopping pihole-FTL
pihole    |
pihole    |   [✗] Unable to fill gravity table in database /etc/pihole/gravity.db_temp
pihole    |
  [✓] Cleaning up stray matter
pihole    |   [✗] DNS service is NOT running
pihole    | Stopping pihole-FTL
pihole    | pihole-FTL: no process found
pihole    | Stopping pihole-FTL
pihole    | pihole-FTL: no process found
...

Refactor repo

  • Rename repo
  • Make services generic(Remove hardcoded values and make genetric)
  • Change README.md and update documentation
  • Change ansible automation. Make genetric

Nextcloud

  • Nextcloud deployment with docker-compose
  • Test drive access with external USB HDD

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.