Improvements Wishlist

Support Tessera Docker Deployment on a Separate Host

ChsbrgrSuggested this wish Β·

Environment

Home Assistant OS running on a standalone device. In my case, a Pi4 2GB RAM. Tessera running in Docker on a separate host. Home Assistant and Tessera are on the same local network. Tessera configured with SCREEN_DEV=1.

Problem

Tessera's Docker deployment instructions assume it runs alongside Home Assistant on the same host. When running Tessera on a separate Docker host, the Home Assistant ingress integration returned 502 Bad Gateway.

With SCREEN_DEV=1, Tessera listens on 127.0.0.1:8099 and restricts requests to loopback. Publishing the container port directly does not work because Docker-forwarded requests are rejected. Setting SCREEN_DEV to 0 or removing it prevented the container from starting correctly and connecting to Home Assistant.

Working Solution

Keep SCREEN_DEV=1 enabled. Publish port 8100 on the Tessera container's network namespace. Run a lightweight socat proxy container sharing Tessera's network namespace using Docker's --network container: option.

sudo docker run -d \
  --name tessera-proxy \
  --restart unless-stopped \
  --network container:esp-screens \
  alpine/socat \
  TCP-LISTEN:8100,bind=0.0.0.0,fork,reuseaddr \
  TCP:127.0.0.1:8099

Configure the proxy to listen on 0.0.0.0:8100 and forward requests to 127.0.0.1:8099. Configure the Home Assistant hass_ingress integration to use the Docker host's LAN address and port 8100.

This allows Home Assistant to access Tessera over the LAN while preserving Tessera's loopback-only development mode. The proxy was created separately because the CasaOS Docker management interface's Compose importer removed the required network_mode: "service:" setting.

The interface initially displayed a white screen in Microsoft Edge, but eventually loaded and became usable as a Home Assistant sidebar tab.

Suggested Improvement

Document an officially supported deployment method for Tessera running on a separate Docker host from Home Assistant, including a supported proxy or configurable bind address that preserves appropriate security restrictions. Also document troubleshooting steps for Home Assistant ingress and blank embedded pages.

Discussion 1

Add a comment
floyduww

Β· Edited

For me I solve the problem by running this patch

index 15ab6676..53f2c87e 100644
--- a/screen_manager/app/server.py
+++ b/screen_manager/app/server.py
@@ -3876,8 +3876,8 @@ def create_app(manager, development=False):
         if request.path == '/health' and request.method in {'GET', 'HEAD'}:
             return web.Response(text='ok\n', content_type='text/plain', headers={'Cache-Control': 'no-store'})
         allowed = {'127.0.0.1', '::1'} if development else {'172.30.32.2'}
-        if request.remote not in allowed:
-            raise web.HTTPForbidden(text=t('addon.errors.open_through_ha'))
+#        if request.remote not in allowed:
+#            raise web.HTTPForbidden(text=t('addon.errors.open_through_ha'))
         if request.method not in {'GET', 'HEAD'} and request.headers.get('X-Screen-CSRF') != csrf:
             raise web.HTTPForbidden(text=t('addon.errors.refresh_page'))
         try:

Then building the container.

I could not think of any reason that this should not be able to run outside of homeassistant within my home network.

Add your thoughts, a screenshot or a useful link.

Markdown & basic HTML
Paste or drop images Β· URLs on their own line become previews0 / 10,000
Create your account to join in

We need a verified email address to reach you about your contribution. Your address stays private.

Continue with GitHub

Your draft stays in this tab. Return here after verification.