Changing port
Deploy HEOS panel / deploy (push) Successful in 24s

This commit is contained in:
2026-09-15 00:46:41 +02:00
parent ce8596945e
commit d2d7677519
6 changed files with 124 additions and 71 deletions
+18 -9
View File
@@ -36,7 +36,7 @@ pip install -r requirements.txt
python3 app.py
```
Then open `http://<pi-ip>:5005/`.
Then open `http://<pi-ip>:5443/`.
The virtual environment is not optional on a current Raspberry Pi OS:
`pip install` straight into the system Python is refused there with
@@ -49,7 +49,7 @@ below calls the environment's Python directly, so it does not care.
## Configure
Open `http://<pi-ip>:5005/api/targets` and copy the exact `name` HEOS reports
Open `http://<pi-ip>:5443/api/targets` and copy the exact `name` HEOS reports
for each device into `TARGETS` in `config.py`. The names come from whatever
you typed in the HEOS app, so they rarely match the model names.
@@ -158,18 +158,27 @@ deployed copy.
## Behind a reverse proxy, at /heos
`deploy/heos.conf` reverse-proxies `/heos` to the panel with Apache:
`deploy/heos.apache.conf` reverse-proxies `/heos` to the panel with Apache:
```bash
sudo a2enmod proxy proxy_http headers
sudo cp deploy/heos.conf /etc/apache2/conf-available/heos.conf
sudo cp deploy/heos.apache.conf /etc/apache2/conf-available/heos.conf
sudo a2enconf heos
sudo apachectl configtest && sudo systemctl reload apache2
```
`deploy/heos.nginx.conf` is the same thing for nginx: copy it to
`/etc/nginx/snippets/heos.conf`, `include snippets/heos.conf;` inside the
`server` block, then `sudo nginx -t && sudo systemctl reload nginx`.
`deploy/heos.nginx.conf` is the same thing for nginx — a whole `server`
block for `rpioffice.nest.domain.com`, ready for `sites-available`:
```bash
sudo cp deploy/heos.nginx.conf /etc/nginx/sites-available/heos
sudo ln -s /etc/nginx/sites-available/heos /etc/nginx/sites-enabled/heos
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d rpioffice.nest.domain.com # optional, adds the 443 block
```
It serves the panel at `/heos` and refuses everything else on that host;
the file ends with the two-line change that puts it at the root instead.
Both ship restricted to the local network — this controls the speakers, and
it usually hangs off a host with a public certificate. Delete the
@@ -179,7 +188,7 @@ up.
The app works at either address without being told which. The proxy sends
`X-Forwarded-Prefix: /heos`, and every URL the app generates — stylesheet,
icons, the manifest's `start_url`, every `fetch` — picks up that prefix.
Serve it straight from port 5005 and the same URLs come out as `/...`.
Serve it straight from port 5443 and the same URLs come out as `/...`.
That header is what the `headers` module is for; without it the page loads
and nothing on it works.
@@ -187,7 +196,7 @@ Two things worth knowing:
- The proxy block takes `/heos` away from the filesystem, so the source
under `/var/www/html/heos` stops being served as static files.
- The panel still answers directly on `<pi-ip>:5005`. Start it with
- The panel still answers directly on `<pi-ip>:5443`. Start it with
`--host 127.0.0.1` if you want Apache to be the only way in.
## How the grouping actually works