Skip to content

michaelherold/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Home Lab Setup

Introduction

This is a fledgling setup for my Home Lab. As I grow my personal server setup — or if I do, if I’m being honest — I will store the configuration in this repository. I mainly use it as practice for tools that I use.

Usage

There are a few prerequisites you will need to run these scripts yourself.

  1. direnv
  2. Terraform v0.14+
  3. A DigitalOcean account and API key
  4. A Cloudflare account, zone, and API key

Once you have those set up, you can copy the .envrc.tpl file to .envrc and fill it out.

Valheim

My friends and I recently purchased Valheim, an early-access survival game with a Nordic mythology gimmick. In order to easily play together, I use Terraform to set up a dedicated server using a Docker image on DigitalOcean.

To provision one, change to the terraform directory and ensure you have filled out the .envrc file from Usage. Then you’ll need to create an SSH key for the purposes of managing this server:

ssh-keygen -t ed25519 -f ~/.ssh/id_valheim

Then, you can plan out the deployment and apply it:

terraform plan -out plan
terraform apply

In roughly two minutes, you will have a server running on a $20/mo DigitalOcean droplet.

The Docker image takes regular backups, but I have not automated a way to store those anywhere. So before you destroy it, make sure to upload a backup to an object store like Wasabi or Amazon S3.

To destroy the server, run:

terraform destroy

Then answer the prompt.

About

An experiment with infrastructure-as-code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published