Skip to content

smkent/homelab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homelab

Self-hosted apps I run on my homelab and personal infrastructure. Deployments are managed by Ansible.

New machine first steps

Before using this repository, perform these steps on the target machine.

Select Debian 11 (or the current stable version) when creating a new Linode instance.

Home server

Install Debian stable using the netinst installer media.

  • In the disk partitioner, choose "encrypted LVM" to encrypt the entire disk.
  • The installer requires creation of an unprivileged user. This user should be manually deleted after installation, so choose a simple temporary username.

Boot into the new installation and perform these steps:

  1. Delete the unprivileged user created during installation: deluser --remove-all-files username
  2. Install basic packages: apt install -y sudo vim
  3. Create the root user's ssh directory: mkdir -m 0700 /root/.ssh
  4. Create /root/.ssh/authorized_keys with your ssh public key

Deployment

If not already present, add the target machine's hostname to ansible/hosts.yml.

Use ./deploy to set up one or more target machine(s). Arguments are passed through to ansible-playbook.

Configuration

Environment variables may be set for configuration:

  • ENV: Inventory file selection. Choices: live (default) or sandbox.
  • FQDN: Host suffix domain name, such as example.com

Invocation examples

  • Deploy to a single host (dry run): ./deploy -C -l target-host-name
  • Deploy to a single host: ./deploy -l target-host-name
  • Deploy to all configured hosts (dry run): ./deploy -C
  • Deploy to all configured hosts: ./deploy