Ankündigung

Einklappen
Keine Ankündigung bisher.

SmarthomeNG v1.11.0 Image für Raspberry Pi

Einklappen
Das ist ein wichtiges Thema.
X
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #31
    In den nginx configs habe ich nichts mit 8.2 gefunden.
    Diese Dateien habe ich benutzt: https://github.com/smarthomeNG/raspb...tag/13.1.11dev
    Aber jetzt auch schon mehrfach runtergeladen und entpackt.

    Kommentar


      #32
      Onkelandy ich hab da mal eine Frage / Anregung…
      Ich habe jetzt durch das öfter aufsetzen von dem Image auf den Raspis mal den Nginx Proxy Manager getestet.
      Das ist eigentlich eine schöne Lösung mit Web Oberfläche und diversen Vorteilen von Zertikatserneuerung bis Übersicht der Server und einfache Installation.
      Nachteil wäre nur das die „Nginx“ auf einem anderen Port (z.B. 8080) laufen müsste.
      Wenn man nicht auch noch McVlan nutzen möchte.
      Ich finde aber, das ist gut zu verkraften.

      Wäre das nichts für ein kommendes Image?

      Kommentar


        #33
        Hm, wenn ich das richtig sehe, braucht es da zwingend docker.. gefällt mir jetzt auf die Schnelle nicht so richtig, dann wird das Image noch größer und aufgeblasener.
        Ich würde eher versuchen, das script wie es aktuell ist noch zu fixen und zu optimieren. Bisher hat es imho ja auch geklappt, vermutlich hab ich da nur beim Update auf Trixie was übersehen..?
        So generell wäre es natürlich toll, wenn das Setup fürs Image über ein GUI laufen würde und flexibler und error-proof wäre. Das könnte man mal angehen... wenn Zeit ist

        Kommentar


          #34
          OK, ja das ist richtig Docker -> Docker-Compose.

          Als Hinweis noch bei dem Image davor, also nicht das DEV Image hat es glaube ich auch schon nicht geklappt. Soweit ich das in Erinnerung habe war das vorvorletzte irgendwas mit 9.xxx das wo die Reverse Proxy Geschichte inklusive der Zertifikate durchgelaufen ist. Da hatte dann nur die Authentifizierung für Alexa gefehlt.

          Ich denke, da hat sich irgendwann etwas in einer Nginx Version geändert was jetzt nicht mehr zu den Einstellungen passt. Ist aber nur so ein Gefühl.

          Kommentar


            #35
            kannst du mal die files im verzeichnis /opt/imagesetup durch die ersetzen und nochmals probieren?
            https://github.com/smarthomeNG/ansib...les/imagesetup

            Wichtig ist, dass zuerst mal nginx per se wieder läuft. Dazu sollte die Datei /etc/nginx/conf.d/https.conf
            mit der identisch sein https://github.com/smarthomeNG/ansib...inx_https.conf
            (wichtig ist das Auskommentieren der 3 SSL Zeilen)

            dann also mal systemctl restart nginx und dann das setup serup_nginx.sh checken.

            Kommentar


              #36
              Also, was ich gemacht habe:

              - Image neu geflasht.
              - Die Dateien in /opt/setup ausgetauscht (/opt/imagesetup gibt es nicht)
              - setup_all ausgeführt -> Dort gibt es jetzt aber keine nginx config mehr.

              Hier komme ich nicht weiter...

              übrigens ist das root Passwort nicht root wie in der doku beschrieben.

              Grüße, Marc

              Kommentar


                #37
                Bin verwirrt. Im verlinkten Ordner gibt es ein setup_nginx.sh und das ist überarbeitet. Am besten führst du auch nur direkt das aus, ohne setup_all

                oder meinst die Datei /etc/nginx/conf.d/https.conf fehlt im Image? Die hab ich oben auch verlinkt
                Zuletzt geändert von Onkelandy; 20.01.2026, 07:47.

                Kommentar


                  #38
                  Ok, teste ich heute Abend nochmal…

                  Kommentar


                    #39
                    so, jetzt habe ich es....

                    Bis zum Zertifikat hat alles geklappt dann kam das hier:

                    Code:
                    Please define your email (name@domain.tld): ----------------@gmx.de
                    Unable to find pre-hook command ufw in the PATH.
                    (PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
                    See also the --disable-hook-validation option.
                    Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-7vqfw3m9/log or re-run Certbot with -v for more details.
                    Done:
                    
                    Now change the port forwarding from 80 to 443 on your router! Restarting nginx now.
                    
                    Copy certificates to your client.
                    If you also want to use OpenVPN, just import the copied conf file to your favourite OpenVPN client (Tunnelblick, OpenVPN, etc.)
                    Start and enable openvpn (later in the setup process)
                    Job for nginx.service failed because the control process exited with error code.
                    See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
                    ​

                    Kommentar


                      #40
                      Okay das mit ufw wäre beim kommenden image gefixt aber ist auch egal.

                      Was sagt das nginx log?

                      Kommentar


                        #41
                        Hier das error.log:
                        Code:
                        2025/10/08 21:47:34 [notice] 17888#17888: using inherited sockets from "5;6;"
                        Oct  8 23:04:45 SmartHomeNG nginx[21997]: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.152, server: domain_here, request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1", upstream: "http://127.0.0.1:3000/api/users/lookup?loginOrEmail=smarthome", host: "10.0.0.152"
                        Oct  8 23:04:48 SmartHomeNG nginx[21996]: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.152, server: domain_here, request: "GET /grafana/api/datasources/name/smarthome HTTP/1.1", upstream: "http://127.0.0.1:3000/api/datasources/name/smarthome", host: "10.0.0.152"
                        Oct  8 23:04:51 SmartHomeNG nginx[21995]: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.152, server: domain_here, request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1", upstream: "http://127.0.0.1:3000/api/users/lookup?loginOrEmail=smarthome", host: "10.0.0.152"
                        Jan 20 17:05:12 SmartHomeNG nginx[4251]: 2026/01/20 17:05:12 [emerg] 4251#4251: cannot load certificate "/etc/letsencrypt/live/schuermann.hopto.org/fullchain.pem": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/live/schuermann.hopto.org/fullchain.pem, r) error:10000080:BIO routines::no such file)
                        Jan 20 17:05:12 SmartHomeNG nginx[4251]: configuration file /etc/nginx/nginx.conf test failed​
                        und das access.log:
                        Code:
                        Oct  8 23:04:45 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 502 - Bytes sent: 157 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:04:48 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/datasources/name/smarthome HTTP/1.1" - Status: 502 - Bytes sent: 157 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:04:51 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 502 - Bytes sent: 157 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:19 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 404 - Bytes sent: 28 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:20 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/admin/users HTTP/1.1" - Status: 200 - Bytes sent: 56 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:20 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 200 - Bytes sent: 369 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:20 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "PUT /grafana/api/admin/users/2/permissions HTTP/1.1" - Status: 200 - Bytes sent: 38 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:21 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "PUT /grafana/api/users/2 HTTP/1.1" - Status: 200 - Bytes sent: 26 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:21 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 200 - Bytes sent: 368 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:24 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/datasources/name/smarthome HTTP/1.1" - Status: 404 - Bytes sent: 35 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:27 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/datasources HTTP/1.1" - Status: 200 - Bytes sent: 453 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:30 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/users/lookup?loginOrEmail=smarthome HTTP/1.1" - Status: 200 - Bytes sent: 368 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:33 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "PUT /grafana/api/admin/users/2/permissions HTTP/1.1" - Status: 200 - Bytes sent: 38 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:35 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "PATCH /grafana/api/org/users/2 HTTP/1.1" - Status: 200 - Bytes sent: 39 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:40 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/dashboards/db HTTP/1.1" - Status: 200 - Bytes sent: 184 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:43 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "GET /grafana/api/datasources/name/Loki HTTP/1.1" - Status: 404 - Bytes sent: 35 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:45 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/datasources HTTP/1.1" - Status: 200 - Bytes sent: 419 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:49 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/dashboards/db HTTP/1.1" - Status: 200 - Bytes sent: 132 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:52 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/dashboards/db HTTP/1.1" - Status: 200 - Bytes sent: 192 Referrer: "-" - User Agent: "ansible-httpget"
                        Oct  8 23:32:55 SmartHomeNG nginx: local7.info 10.0.0.152 forwarded for - - Request: "POST /grafana/api/user/stars/dashboard/uid/6b266573-4ff8-47a7-abb6-d584963fd70b HTTP/1.1" - Status: 200 - Bytes sent: 32 Referrer: "-" - User Agent: "ansible-httpget"
                        Jan 19 18:43:26 SmartHomeNG nginx: local7.info 192.168.178.169 forwarded for - - Request: "GET / HTTP/1.1" - Status: 200 - Bytes sent: 409 Referrer: "-" - User Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
                        Jan 19 18:43:26 SmartHomeNG nginx: local7.info 192.168.178.169 forwarded for - - Request: "GET /favicon.ico HTTP/1.1" - Status: 200 - Bytes sent: 15086 Referrer: "http://192.168.178.153/" - User Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"
                        Jan 20 16:51:25 SmartHomeNG nginx: local7.info 204.76.203.212 forwarded for - - Request: "GET / HTTP/1.1" - Status: 200 - Bytes sent: 409 Referrer: "-" - User Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
                        Jan 20 17:05:12 SmartHomeNG nginx[4251]: daemon.info 2026/01/20 17:05:12 [warn] 4251#4251: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/https.conf:30
                        Jan 20 17:05:12 SmartHomeNG nginx[4251]: daemon.info 2026/01/20 17:05:12 [warn] 4251#4251: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/https.conf:31
                        ​
                        Service:
                        Code:
                        systemctl status nginx.service
                        × nginx.service - A high performance web server and a reverse proxy server
                             Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
                            Drop-In: /etc/systemd/system/nginx.service.d
                                     └─service_nginx_fix.conf
                             Active: failed (Result: exit-code) since Wed 2026-01-21 17:50:21 CET; 4min 1s ago
                         Invocation: a20183a9c90149dab12a0178c5d99032
                               Docs: man:nginx(8)
                            Process: 1254 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
                           Mem peak: 12.7M
                                CPU: 105ms
                        
                        Jan 21 17:50:21 SmartHomeNG systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
                        Jan 21 17:50:21 SmartHomeNG nginx[1254]: 2026/01/21 17:50:21 [warn] 1254#1254: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/https.c>
                        Jan 21 17:50:21 SmartHomeNG nginx[1254]: 2026/01/21 17:50:21 [warn] 1254#1254: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/https.c>
                        Jan 21 17:50:21 SmartHomeNG nginx[1254]: 2026/01/21 17:50:21 [emerg] 1254#1254: cannot load certificate "/etc/letsencrypt/live/schuermann.hopto.org/fullchain.pem": BIO_new_file() failed (SS>
                        Jan 21 17:50:21 SmartHomeNG nginx[1254]: nginx: configuration file /etc/nginx/nginx.conf test failed
                        Jan 21 17:50:21 SmartHomeNG systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
                        Jan 21 17:50:21 SmartHomeNG systemd[1]: nginx.service: Failed with result 'exit-code'.
                        Jan 21 17:50:21 SmartHomeNG systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
                        ​
                        Zuletzt geändert von schuma; 21.01.2026, 17:55.

                        Kommentar


                          #42
                          Offensichtlich hat das mit dem certbot wieder nicht geklappt. Vielleicht lag es doch am ufw.
                          Lösche bitte in der Datei
                          /etc/letsencrypt/cli.ini
                          die Pre-Hook und Post-Hook Zeilen.

                          DANN: von hier https://github.com/smarthomeNG/ansib...spbian/configs
                          die Datei https://github.com/smarthomeNG/ansib...ablesites.conf anstelle von /etc/nginx/sites-available/default
                          und die Datei https://github.com/smarthomeNG/ansib...inx_https.conf anstelle von /etc/nginx/conf.d/https.conf

                          dann bitte nochmals setup_nginx.sh ausführen.
                          Wenn das hier kommt: You have setup the variables for key generation like this:
                          abbrechen und grep "DOMAIN" /etc/ssl/easy-rsa/domain_name | cut -d'"' -f 2
                          Da sollte nun deine URL drin stehen. Wenn nicht, ham wir da das Problem gefunden. Wenn ja, bitte setup nochmals durchführen und durchziehen.


                          Sollte es dann immer noch nicht gehen...
                          schick mir doch bitte mal per PM diese zwei Dateien nach dem setup_nginx:
                          /etc/nginx/sites-available/default
                          /etc/nginx/conf.d/https.conf
                          gerne nachvollziehbar "geschwärzt" bei deinen Passwörtern und URLs

                          Kommentar


                            #43
                            Also was ich gemacht habe:
                            - cli.ini geändert.
                            - Die Datei nginx_availablesites.conf nach sites-available kopiert (später noch einmal mit umbenennen in default -> gleiches Ergebnis)
                            - default gelöscht
                            - nginx_https.conf nach conf.d/https.conf kopiert. (Name geändert auf https.conf)
                            - setup ausgeführt bis zu der Stelle.
                            - grep "DOMAIN" /etc/ssl/easy-rsa/domain_name | cut -d'"' -f 2 ergab als einzige Ausgabe meine Domain Adresse
                            - Dann durchgezogen

                            klappt nicht:
                            Code:
                            Please define your email (name@domain.tld): --------------------@gmx.de
                            Saving debug log to /var/log/letsencrypt/letsencrypt.log
                            Some challenges have failed.
                            Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
                            Done: Account registered.
                            Requesting a certificate for ------------.------.org
                            
                            Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
                              Domain: -------.--------.org
                              Type:   connection
                              Detail: --.--.--.--: Fetching http://---------.---------.org/.well-known/acme-challenge/nngfh7qoegJ5w2q8iB1rU5ABPdzIUO4ZJnANRwJpouE: Connection refused
                            
                            Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.
                            
                            Now change the port forwarding from 80 to 443 on your router! Restarting nginx now.
                            
                            Copy certificates to your client.
                            If you also want to use OpenVPN, just import the copied conf file to your favourite OpenVPN client (Tunnelblick, OpenVPN, etc.)
                            Start and enable openvpn (later in the setup process)
                            Job for nginx.service failed because the control process exited with error code.
                            See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
                            ​

                            Die beiden Dateien schicke ich dir...

                            Grüße, Marc
                            Zuletzt geändert von schuma; Gestern, 17:28.

                            Kommentar

                            Lädt...
                            X