CyberPanel Community

ClosedUsing docker to setup homebridge (tried following guides but 503)

gw
gwnmikedus #1

Hi everyone! I’ve been struggling with my CyberPanel setup for several days now, most likely because of my inexperience with back-end/server management. I hope the community here can give me a kickstart into solving this issue. If you would like to checkout the panel itself please request the login information to my in private.

Before I gave my machine a clean installation, I was running Homebridge using a docker-compose file. This was working and I was able to control all my network devices from one spot :sunglasses:

However, I also wanted to play around with CyberPanel… I started a container from the image I pulled and followed several guides (both here and on other websites) to access the homebridge web UI.

I tried to use multiple setups (IP/port combination; 172.17.0.1, 172.0.0.1, [the public ip], :8581, :53109) in the /usr/local/lsws/conf/httpd_config.conf file and restarted the OpenLitespeed server every time.

Yet I keep getting the 503 error, no matter what I do.

I do not necessarily need to access the homebridge from a domain (better not actually), if it would work using internal ip (when connected through WiFi on the same network as the machine) that would best, however for my learning purpose I would like to know both options.

*sidenode, I did try to install multiple websites and DNS config and they where accessible (though I am stuck with self signed certificates, can someone tell me how the limit for Let’sEncrypt works? Is it weekly 1 per domain or per server?)

— Cheers Mike

------- below some reference since I could only upload one screenshot (please tell if troubleshoot information is missing ------

Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
e[30me[47m                       e[49me[39m
e[30me[47m    ┌────────────┐     e[49me[39m
e[30me[47m    │ 031-45-154 │     e[49me[39m
e[30me[47m    └────────────┘     e[49me[39m
e[30me[47m                       e[49me[39m
e[37m[6/10/2022, 12:23:39 PM] e[39mHomebridge v1.4.1 (HAP v0.10.2) (Homebridge CEE1) is running on port 53109.

extprocessor dockerbackend {
  type                    proxy
  address                 127.0.0.1:53109
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
REWRITERULE ^(.*)$ http://dockerbackend/$1 [P]

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:59ff:fe35:e265  prefixlen 64  scopeid 0x20<link>
        ether 02:42:59:35:e2:65  txqueuelen 0  (Ethernet)
        RX packets 984  bytes 381328 (381.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 49  bytes 25170 (25.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.186  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f279:59ff:fe93:1c6a  prefixlen 64  scopeid 0x20<link>
        inet6 fdfe:19a8:7365:0:f279:59ff:fe93:1c6a  prefixlen 64  scopeid 0x0<global>
        ether f0:79:59:93:1c:6a  txqueuelen 1000  (Ethernet)
        RX packets 20104  bytes 5969774 (5.9 MB)
        RX errors 0  dropped 1867  overruns 0  frame 0
        TX packets 10453  bytes 8550842 (8.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 9638  bytes 16359086 (16.3 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9638  bytes 16359086 (16.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethb544b61: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc0d:5dff:fedd:50e8  prefixlen 64  scopeid 0x20<link>
        ether fe:0d:5d:dd:50:e8  txqueuelen 0  (Ethernet)
        RX packets 984  bytes 395104 (395.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 26316 (26.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
2 replies
gw
gwnmikedus #2

If anybody ever runs into this, below is the solution:
The homebridge container required --net=host, so I ended up running the docker run command from the terminal.

docker run --net=host --name=homebridge -v $(pwd)/homebridge:/homebridge oznu/homebridge:ubuntu

Management from CyberPanel does work now after I assigned the container to my user (before doing this, the docker container list UI is buggy). I opened the homebridge UI port 8581, and the homebridge service port 53370 in the Firewall and everything is working smoothly now.

gw
gwnmikedus #3

Docker containers within CyberPanel now do give the port mapping options. So no need to use any terminal commands any longer.

Sign in to reply