diff --git a/home-server/.env b/.env similarity index 100% rename from home-server/.env rename to .env diff --git a/home-server/docker-compose.yml b/docker-compose.yml similarity index 100% rename from home-server/docker-compose.yml rename to docker-compose.yml diff --git a/home-server/home-assistant/home-assistant.Dockerfile b/dockerfiles/home-assistant.Dockerfile similarity index 100% rename from home-server/home-assistant/home-assistant.Dockerfile rename to dockerfiles/home-assistant.Dockerfile diff --git a/home-server/environment-variables/local.env b/environment-variables/local.env similarity index 100% rename from home-server/environment-variables/local.env rename to environment-variables/local.env diff --git a/home-server/readme.md b/home-server/readme.md deleted file mode 100644 index d46ff96..0000000 --- a/home-server/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# Server setup - -## Installation docker - -- See [Official Website](https://docs.docker.com/engine/install/ubuntu/) - -## Installation docker compose - -- See [This Website](https://nextgentips.com/2022/05/06/how-to-install-docker-compose-v2-on-ubuntu-22-04/) - -## Setup VPN client - -Follow [this tutorial](https://docs.pivpn.io/wireguard/) - -NOTE: on ubuntu, you need to add a symbolic link in order to enable the VPN ([source](https://superuser.com/a/1544697)) - -```bash -ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf -``` - -## Start docker-compose - -TODO add .sh script to start in production - -## Tips - -When database credentials are not updated after docker restart, consider using - -```bash -docker compose rm db -``` - - -## To Do - -- Start the VPN client automatically after reboot - -## Generate self signed certificates - -https://stackoverflow.com/questions/10175812/how-to-generate-a-self-signed-ssl-certificate-using-openssl - -> non-interactive and 10 years expiration - -```bash -openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=homeassistant/ST=Belgium/L=Deerlijk/O=Willem/OU=Willem/CN=willem" -subj '/CN=homeassistant.com' -``` diff --git a/home-server/install-docker.sh b/install-docker.sh similarity index 100% rename from home-server/install-docker.sh rename to install-docker.sh diff --git a/home-server/mosquitto/config/mosquitto.conf b/mosquitto/config/mosquitto.conf similarity index 100% rename from home-server/mosquitto/config/mosquitto.conf rename to mosquitto/config/mosquitto.conf diff --git a/home-server/mosquitto/config/pwfile b/mosquitto/config/pwfile similarity index 100% rename from home-server/mosquitto/config/pwfile rename to mosquitto/config/pwfile diff --git a/readme.md b/readme.md index 20b5729..d46ff96 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,46 @@ -# Home Automation project +# Server setup -This repo describes my setup for Home Assistant. +## Installation docker + +- See [Official Website](https://docs.docker.com/engine/install/ubuntu/) + +## Installation docker compose + +- See [This Website](https://nextgentips.com/2022/05/06/how-to-install-docker-compose-v2-on-ubuntu-22-04/) + +## Setup VPN client + +Follow [this tutorial](https://docs.pivpn.io/wireguard/) + +NOTE: on ubuntu, you need to add a symbolic link in order to enable the VPN ([source](https://superuser.com/a/1544697)) + +```bash +ln -s /usr/bin/resolvectl /usr/local/bin/resolvconf +``` + +## Start docker-compose + +TODO add .sh script to start in production + +## Tips + +When database credentials are not updated after docker restart, consider using + +```bash +docker compose rm db +``` + + +## To Do + +- Start the VPN client automatically after reboot + +## Generate self signed certificates + +https://stackoverflow.com/questions/10175812/how-to-generate-a-self-signed-ssl-certificate-using-openssl + +> non-interactive and 10 years expiration + +```bash +openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes -subj "/C=homeassistant/ST=Belgium/L=Deerlijk/O=Willem/OU=Willem/CN=willem" -subj '/CN=homeassistant.com' +``` diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/.gitignore b/systemd/recurring-tasks/homeassistant-backup/.gitignore similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/.gitignore rename to systemd/recurring-tasks/homeassistant-backup/.gitignore diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/README.md b/systemd/recurring-tasks/homeassistant-backup/README.md similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/README.md rename to systemd/recurring-tasks/homeassistant-backup/README.md diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/bun.lock b/systemd/recurring-tasks/homeassistant-backup/bun.lock similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/bun.lock rename to systemd/recurring-tasks/homeassistant-backup/bun.lock diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup b/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/homeassistant-backup rename to systemd/recurring-tasks/homeassistant-backup/homeassistant-backup diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/index.ts b/systemd/recurring-tasks/homeassistant-backup/index.ts similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/index.ts rename to systemd/recurring-tasks/homeassistant-backup/index.ts diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/package.json b/systemd/recurring-tasks/homeassistant-backup/package.json similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/package.json rename to systemd/recurring-tasks/homeassistant-backup/package.json diff --git a/home-server/systemd/recurring-tasks/homeassistant-backup/tsconfig.json b/systemd/recurring-tasks/homeassistant-backup/tsconfig.json similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-backup/tsconfig.json rename to systemd/recurring-tasks/homeassistant-backup/tsconfig.json diff --git a/home-server/systemd/recurring-tasks/homeassistant-cold-backup.service b/systemd/recurring-tasks/homeassistant-cold-backup.service similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-cold-backup.service rename to systemd/recurring-tasks/homeassistant-cold-backup.service diff --git a/home-server/systemd/recurring-tasks/homeassistant-cold-backup.timer b/systemd/recurring-tasks/homeassistant-cold-backup.timer similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-cold-backup.timer rename to systemd/recurring-tasks/homeassistant-cold-backup.timer diff --git a/home-server/systemd/recurring-tasks/homeassistant-hot-backup.service b/systemd/recurring-tasks/homeassistant-hot-backup.service similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-hot-backup.service rename to systemd/recurring-tasks/homeassistant-hot-backup.service diff --git a/home-server/systemd/recurring-tasks/homeassistant-hot-backup.timer b/systemd/recurring-tasks/homeassistant-hot-backup.timer similarity index 100% rename from home-server/systemd/recurring-tasks/homeassistant-hot-backup.timer rename to systemd/recurring-tasks/homeassistant-hot-backup.timer diff --git a/home-server/systemd/recurring-tasks/pull-zettelkasten.service b/systemd/recurring-tasks/pull-zettelkasten.service similarity index 100% rename from home-server/systemd/recurring-tasks/pull-zettelkasten.service rename to systemd/recurring-tasks/pull-zettelkasten.service diff --git a/home-server/systemd/recurring-tasks/pull-zettelkasten.timer b/systemd/recurring-tasks/pull-zettelkasten.timer similarity index 100% rename from home-server/systemd/recurring-tasks/pull-zettelkasten.timer rename to systemd/recurring-tasks/pull-zettelkasten.timer diff --git a/home-server/systemd/recurring-tasks/send-todo-mail.service b/systemd/recurring-tasks/send-todo-mail.service similarity index 100% rename from home-server/systemd/recurring-tasks/send-todo-mail.service rename to systemd/recurring-tasks/send-todo-mail.service diff --git a/home-server/systemd/recurring-tasks/send-todo-mail.timer b/systemd/recurring-tasks/send-todo-mail.timer similarity index 100% rename from home-server/systemd/recurring-tasks/send-todo-mail.timer rename to systemd/recurring-tasks/send-todo-mail.timer