Running terraform and docker on my home server ⚓09 Nov 2017
The last time I’d posted about my Home Server build in September, I’d just gotten it working. Since then, I’ve made a lot of progress. It is now running almost 10 services, up from just Kodi back then. Now it has a working copy of:
- I was running
kodi-standalone-service, set to run on boot, as per the ArchLinux Wiki, but switched in favor of openbox to a simple autorun.
- The current setup uses Steam as the application launcher. This lets me ensure that the Steam Controller works across all applications.
- Instead of running Kodi on xinit, I’m now running openbox with autologin against a non-privileged user.
- I tried fighting it, but it was slightly easier to configure compared to dmix. Might move to dmix if I get time.
- I now have the following disks:
- 128GB root volume. (Samsung EVO-850)
- 1TB volume for data backups
- 3TB RAID0 configuration across 2 disks. There are some btrfs subvolumes in the 3TB raid setup, including one specifically for docker volumes. The docker guide recommends running btrfs subvolumes on the block device, which I didn’t like, so I’m running docker volumes in normal mode on a btrfs disk. I don’t have enough writes to care much yet, but might explore this further.
- This has been an interesting experiment. Kodi is still installed natively, but I’ve been trying to run almost everything else as a docker container. I’ve managed to do the configuration entirely via terraform, which has been a great learning experience. I’ve found terraform much more saner as a configuration system compared to something like ansible, which gets quite crazy. (We have a much more crazy terraform config at work, though).
- I have a private repository on GitLab called
nebulawhich I use as the source of truth for the configuration. It doesn’t hold everything yet, just the following:
- Docker Configuration (not the docker service, just the container/volumes)
- CloudFlare - I’m using
bb8.funas the root domain, which is entirely managed using the CloudFlare terraform provider.
- MySQL - Running a MariaDB container, which has been configured by-hand till this PR gets merged.
- Running as a docker container, provisioned using terraform. Plan to proxy this using
- Docker Container. Nothing special. Plan to set this up as the Kodi backend.
- Experimental setup for now. Inside a docker container.
- I wish I knew how to configure this. Also inside docker.
- Running as a simple reverse proxy for most of the above services
- A simple OPDS server, which I use against my Kindle. If you don’t know what OPDS is, you should [check this out]. Running on a simple apache setup on the archlinux box for now. WIP for dockerization.
- Simple ebook server. Proxied over the internet. Has a online ebook reader, which is pretty cool.
- I set this up planning to shift Kodi’s data to this, but now that I have emby setup - I’m not so sure. Still, keeping this running for now.
- Hooked up to couchpotato,flexget, and sickrage so it can do things.
- Liking this more than flexget so far, much more easier to configure and use.
- This is the latest fork of libresonic, which was itself forked off subsonic. My attempt at getting off Google Play Music.
Moved these to a separate blog post
A few things off my TODO list:
- Create a Docker image for elibsrv that comes with both
Do the same for ubooquity as well(Using the
If you’re interested in my self-hosting setup, I’m using Terraform + Docker, the code is hosted on the same server, and I’ve been writing about my experience and learnings:
- Part 1, Hardware
- Part 2, Terraform/Docker
- Part 3, Learnings
- Part 4, Migrating from Google (and more)
- Part 5, Home Server Networking
- Part 6, btrfs RAID device replacement
If you have any comments, reach out to me
Published on November 09, 2017 in homeserver,archlinux,docker,terraform,selfhosted