# WebSocket Connection Error in OpenEMS UI on Raspberry Pi 4

**URL:** <https://community.openems.io/t/websocket-connection-error-in-openems-ui-on-raspberry-pi-4/2640>\
**Category:** Software-Development\
**Created:** [May 6, 2024, 12:32pm UTC](https://community.openems.io/t/websocket-connection-error-in-openems-ui-on-raspberry-pi-4/2640 "2024-05-06T12:32:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nada](https://community.openems.io/letter_avatar_proxy/v4/letter/n/a88e4f/32.png) [@nada](https://community.openems.io/u/nada)\
**Post date:** [May 6, 2024, 12:32pm UTC](https://community.openems.io/t/websocket-connection-error-in-openems-ui-on-raspberry-pi-4/2640/1 "2024-05-06T12:32:05Z")

</div>

Hello OpenEMS Community,

I am encountering a WebSocket connection issue when trying to access the OpenEMS UI deployed on a Raspberry Pi 4. The UI consistently fails to load resources and establish WebSocket connections, and I’m hoping for some guidance on troubleshooting this issue. I had already tried this steps :

1. Verified that the Nginx server is up and running.
2. Checked that the WebSocket service is correctly configured in Nginx.
3. Ensured no firewall or network issues are blocking the WebSocket port.

**Configuration Snippets:**  
server {  
listen 80;  
server\_name openems;

location /websocket {  
proxy\_pass [http://127.0.0.1:8085](http://127.0.0.1:8085);  
proxy\_http\_version 1.1;  
proxy\_set\_header Upgrade $http\_upgrade;  
proxy\_set\_header Connection “upgrade”;  
}  
root /usr/share/openems/www;  
index index.html index.htm;  
error\_page 404 /index.html;

```
location /rest/ {
    proxy_pass http://127.0.0.1:8084/rest/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}

```

The service appears to be running, but connections are not being established.

 ![image](https://community.openems.io/uploads/default/original/2X/a/a585000e98700facc2bc760ecb2d0802d2ee0c19.jpeg)

---

<div class="post-metadata">

**Author:** ![Rayleigh3105](https://community.openems.io/user_avatar/community.openems.io/rayleigh3105/32/1178_2.png) [@Rayleigh3105](https://community.openems.io/u/Rayleigh3105)\
**Post date:** [May 6, 2024, 1:24pm UTC](https://community.openems.io/t/websocket-connection-error-in-openems-ui-on-raspberry-pi-4/2640/2 "2024-05-06T13:24:38Z")

</div>

Hey @nada ,  
I think you need to configure the API Websocket. Have you done this step descriped in [Getting Started :: Open Energy Management System](https://openems.github.io/openems.io/openems/latest/gettingstarted.html#_run_openems_edge_and_start_simulator)

 ![Bildschirmfoto 2024-05-06 um 15.24.02](https://community.openems.io/uploads/default/original/2X/a/a5fdee616f144e63ef646ffc37e67298753e15f9.png)

Greetings!
