Coder Social home page Coder Social logo

homeserver's Introduction

homeserver

This is my full homeserver setup.

Hardware

Backup HDD

This setup allows powering down both 12V and 5V lines of the HDD using a single smart plug. Both The 5V and the 12V power supplies are connected to it.

Smart Home

Operating system

Firmware

I'm using the internal MMC just for the firmware because:

  • mainline linux had IO errors with the MMC
  • The reserved partition of CoreOS is too small for rk3399

Installation:

  • compile u-boot with rock-pi-4-rk3399_defconfig
  • boot into any OS from the microSD so we can write to the MMC
  • dd if=u-boot-rockchip.bin of=/dev/mmcblk0 seek=64

CoreOS

Convert ignition config

podman run --interactive --rm quay.io/coreos/butane:release --pretty --strict < coreos/homeserver.bu > coreos/homeserver.ign

Download current OS image:

podman run --privileged --rm -v .:/data -w /data quay.io/coreos/coreos-installer:release download --architecture aarch64

Write to micro SD:

sudo podman run --privileged --rm -v /dev:/dev -v /run/udev:/run/udev -v .:/data -w /data quay.io/coreos/coreos-installer:release install --offline --image-file fedora-coreos-37.20221106.3.0-metal.aarch64.raw.xz --ignition-file coreos/homeserver.ign /dev/mmcblk0

Install additional packages

sudo rpm-ostree install htop inotify-tools python3
  • htop: it's just very useful
  • inotify-tools: required for my syncthing rsyncd setup
  • python3: for ansible

Network setup

These could be done with ansible but I found them a little too specific to my setup so I did them manually.

Ignore router DNS to prevent adding the search-domain to containers /etc/hosts:

nmcli con mod 'Wired connection 1' ipv4.ignore-auto-dns yes
nmcli con mod 'Wired connection 1' ipv6.ignore-auto-dns yes

Use the routers DNS server instead of pihole:

/etc/systemd/resolved.conf

[Resolve]
DNS=192.168.43.1

Trust my own CA

The gotify client needs this.

create /etc/pki/ca-trust/source/anchors/m1cha-main.pem
run update-ca-trust

ansible

Build dependencies

arp-reply:

git clone tools/arp-reply
sh -c 'cd tools/arp-reply && cross build --release --target aarch64-unknown-linux-gnu'

std2pipe:

./tools/std2pipe/build_release.sh linux/arm64

Run/Update

ansible-playbook main.yml

homeserver's People

Contributors

m1cha avatar

Stargazers

NetGuy avatar Robert Vitonsky avatar Brandon Kalinowski avatar Dennis avatar  avatar

Watchers

Lucian avatar  avatar  avatar

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.