90 lines
3.0 KiB
Markdown
90 lines
3.0 KiB
Markdown
# Michael's Homelab
|
|
|
|
Welcome to the container farm...
|
|
|
|
## Host List
|
|
|
|
### Devices
|
|
|
|
| Host | OS | Purpose / Services |
|
|
| :--- | :--- | :----------------- |
|
|
| [Thonkpad](thonkpad/) (portable) |  | Misc. Projects |
|
|
| [Cuddlefish](cuddlefish/) |  | Gitea |
|
|
| [Rocktiplex](rocktiplex/) |  | Fathom, Status Proxy, [RSF Analytics](https://rsf.michaellisano.com), [ytpod](https://ytpod.michaellisano.com/) |
|
|
| Cloud8 (under repair) |  | NextCloud |
|
|
|
|
### Virtualized Hosts
|
|
|
|
| VM | Kind | Access | Machine | OS | Purpose / Services |
|
|
| :--- | :--- | :----- | :------ | :--- | :----------------- |
|
|
| [NixHost](thonkpad/nixhost/) | KVM | SSH | Thonkpad |  | NixOS Testbed |
|
|
| [WinHost](thonkpad/winhost/) | KVM | RDP | Thonkpad |  | Altium Designer |
|
|
|
|
### Off-site
|
|
|
|
| Host | Provider | OS | Purpose / Services |
|
|
| :--- | :------- | :--- | :----------------- |
|
|
| Backup1 | [TNAHosting](https://tnahosting.net/) |  | Docker Volume Backups |
|
|
|
|
## Docker
|
|
|
|
Most services are run as Docker containers.
|
|
|
|
### Volume Permission Notes
|
|
|
|
In a standard setup, we will have a `docker` usergroup. To make a *user-created directory* usable as a volume, run the following:
|
|
|
|
```bash
|
|
sudo chown -R my-user:docker my-dir
|
|
```
|
|
|
|
### SELinux Notes
|
|
|
|
Docker volumes violate some SELinux policies. Use `setenforce 0` to disable it temporarily, or make the following permanent change to `/etc/sysconfig/selinux`:
|
|
|
|
```bash
|
|
# SELINUX=enforcing
|
|
SELINUX=permissive
|
|
```
|
|
|
|
### Dockerized Cloudflared Notes
|
|
|
|
If a docker-compose file looks like this:
|
|
|
|
```yaml
|
|
services:
|
|
gitea-server:
|
|
image: gitea/gitea:1.19.3
|
|
# ...
|
|
gitea-cloudflared:
|
|
image: cloudflare/cloudflared
|
|
# ...
|
|
```
|
|
|
|
Then in this case the name of the target service is `gitea-server`, and (per Docker's networking shenanigans), should be specified **directly by service name,** e.g.
|
|
|
|
```
|
|
https://git.michaellisano.com -> http://gitea-server:3000
|
|
```
|
|
|
|
## Backups
|
|
|
|
Everything is encrypted with [age](https://github.com/FiloSottile/age).
|
|
|
|
All keys are generated using age-keygen and stored in a text file, e.g.
|
|
|
|
**backup-key.txt**
|
|
|
|
```
|
|
# created: 2023-06-24T18:01:36-07:00
|
|
# public key: age12345...
|
|
AGE-SECRET-KEY-xyz123...
|
|
```
|
|
|
|
Decrypting a file:
|
|
|
|
```
|
|
age -d -i backup-key.txt -o NAME.tar.gz NAME.tar.gz.enc
|
|
```
|
|
|