From e545a7d823c89a247d2163a5a0ffd6668f831b17 Mon Sep 17 00:00:00 2001 From: willemserruys Date: Thu, 17 Nov 2022 23:57:30 +0100 Subject: [PATCH] added eclipse-mosquitto --- VPN/openvpn/readme.md | 9 +++++++++ VPN/readme.md | 5 +++-- configurations/eclipse-mosquitto/mosquitto.conf | 9 +++++++++ .../home-assistant}/configuration.yaml | 0 .../traefik}/traefik.1.7.10.toml | 0 home-server/docker-compose.yml | 2 +- raspberrypi/docker-compose.yml | 10 +++++++++- raspberrypi/log/.gitkeep | 0 8 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 configurations/eclipse-mosquitto/mosquitto.conf rename {home-assistant => configurations/home-assistant}/configuration.yaml (100%) rename {traefik => configurations/traefik}/traefik.1.7.10.toml (100%) create mode 100644 raspberrypi/log/.gitkeep diff --git a/VPN/openvpn/readme.md b/VPN/openvpn/readme.md index fe4389a..488d821 100644 --- a/VPN/openvpn/readme.md +++ b/VPN/openvpn/readme.md @@ -1,6 +1,15 @@ # Setup OpenVPN +## Intro + OpenVPN is used for the connection between the home-server and the home network. It can be easily set up using [this link](https://pivpn.io/) + +OpenVPN3 clients can easily be downloaded and installed using the +[following link](https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/) + +## To Do + +Make sure that the home-server is always reconnecting to the VPN when starting up. diff --git a/VPN/readme.md b/VPN/readme.md index 6699350..7bc554a 100644 --- a/VPN/readme.md +++ b/VPN/readme.md @@ -3,6 +3,7 @@ I used 2 VPNs in my home setup 1. Unify VPN -2. WireGuard VPN +2. OpenVPN (= PiVPN) -Reason being that Unify VPN is not easy to set up for an ubuntu machine, and I was not able to configure my VPS with it. That is why I set up a wireguard VPN to connect my local network to the VPS. +Reason being that Unify VPN is not easy to set up for an ubuntu machine, and I was unable to configure my VPS with it. +That is why I set up an openVPN to connect my local network to the home-server. diff --git a/configurations/eclipse-mosquitto/mosquitto.conf b/configurations/eclipse-mosquitto/mosquitto.conf new file mode 100644 index 0000000..409b5f8 --- /dev/null +++ b/configurations/eclipse-mosquitto/mosquitto.conf @@ -0,0 +1,9 @@ +listener 1883 +persistence false +# persistence_location /mosquitto/data/ +log_dest file /mosquitto/log/mosquitto.log + +## Authentication ## +# By default, Mosquitto >=2.0 allows only authenticated connections. Change to true to enable anonymous connections. +allow_anonymous true +# password_file /mosquitto/config/password.txt diff --git a/home-assistant/configuration.yaml b/configurations/home-assistant/configuration.yaml similarity index 100% rename from home-assistant/configuration.yaml rename to configurations/home-assistant/configuration.yaml diff --git a/traefik/traefik.1.7.10.toml b/configurations/traefik/traefik.1.7.10.toml similarity index 100% rename from traefik/traefik.1.7.10.toml rename to configurations/traefik/traefik.1.7.10.toml diff --git a/home-server/docker-compose.yml b/home-server/docker-compose.yml index 87092a0..d83455f 100644 --- a/home-server/docker-compose.yml +++ b/home-server/docker-compose.yml @@ -6,7 +6,7 @@ services: - 10.55.8.3:8123:8123 volumes: - /home/willem/homeassistant:/config - - /home/willem/repos/homeAutomation/home-assistant/configuration.yaml:/config/configuration.yaml + - /home/willem/repos/homeAutomation/configurations/home-assistant/configuration.yaml:/config/configuration.yaml restart: unless-stopped syncthing: image: lscr.io/linuxserver/syncthing:latest diff --git a/raspberrypi/docker-compose.yml b/raspberrypi/docker-compose.yml index 41e8f78..ba778ad 100644 --- a/raspberrypi/docker-compose.yml +++ b/raspberrypi/docker-compose.yml @@ -9,4 +9,12 @@ services: network_mode: "host" image: "traefik:1.7.10" volumes: - - /home/pi/repos/homeAutomation/traefik/traefik.1.7.10.toml:/etc/traefik/traefik.toml + - /home/pi/repos/homeAutomation/configurations/traefik/traefik.1.7.10.toml:/etc/traefik/traefik.toml + mosquitto: + image: eclipse-mosquitto:2 + volumes: + - /home/pi/repos/homeAutomation/configurations/eclipse-mosquitto/:/mosquitto/config/:ro + - ./log/:/mosquitto/log/ + ports: + - 1883:1883 + - 9001:9001 diff --git a/raspberrypi/log/.gitkeep b/raspberrypi/log/.gitkeep new file mode 100644 index 0000000..e69de29