-
-
Notifications
You must be signed in to change notification settings - Fork 2k
FreeNAS 11 Installation using a Jail
Adapted from FreeNAS 9.3 and 9.10 Jail Installation and FreeNAS 9.10 BSD Jail.
-
Create a jail
- Jails > Add Jail
- Jail:
- Jail Name: Homebridge
- Template: ---
- IPv4 address: <static_ip>
- Autostart: Yes
- VIMAGE: Yes
-
Open a Shell to the Jail
- SSH into your FreeNas Box
- Lookup the jail id of the HomeBridge jail
$ jls JID IP Address Hostname Path 17 192.168.0.151 homebridge /mnt/Jails/homebridge
-
Login to that jail (optionally specifying a shell)
$ jexec 17 csh root@homebridge$
-
Update any packages in that shell (optional, but good practice)
pkg update && pkg upgrade
-
Install and activate system dependencies
pkg install -y node npm dbus avahi-libdns gcc sysrc dbus_enable="YES" sysrc avahi_daemon_enable="YES" ln -s /usr/local/include/avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h service dbus start service avahi-daemon start
-
Install homebridge itself
Note the
--unsafe-perm
, which allows access to/usr/local/lib/node_modules/homebridge/node_modules/mdns/.node-gyp
npm install -g --unsafe-perm homebridge mkdir ~/.homebridge cp /usr/local/lib/node_modules/homebridge/config-sample.json ~/.homebridge/config.json
-
Install homebridge plugins of your choice
You can explore all available plugins at the NPM website by searching for the keyword
homebridge-plugin
.For example:
npm install -g homebridge-nest
-
Modify the config.json with your settings.
nano ~/.homebridge/config.json
-
Test it's working by running it manually
$ homebridge No plugins found. See the README for information on installing plugins. Loaded config.json with 1 accessories and 1 platforms.
Use CTRL+C to kill homebridge.
As long as homebridge boots, any errors you see are likely due to your config, check the install instructions of the plugins you added!
-
(Optional) Install a process manager to keep homebridge running (and started on jail boot)
npm install -g pm2 pm2 startup rcd sysrc pm2_enable="YES"
-
(Optional) Once homebridge is working, set it up to always run using pm2
pm2 start homebridge -- -D pm2 save
Make sure you're using the --unsafe-perm
flag
You need to re-insall the mdns dependency:
$ cd /usr/local/lib/node_modules/homebridge
$ npm install --unsafe-perm mdns
$ npm rebuild --unsafe-perm
- Raspberry Pi
- Debian, Ubuntu
- CentOS, Fedora, Red Hat
- Arch, Manjaro
- macOS
- Windows 10 / 11 (Hyper-V)
- Docker
- Synology DSM 7
- Other Platforms
- Basic Troubleshooting
- Backup and Restore
- Child Bridges
- Config File
- Connect To HomeKit
- FFmpeg for Homebridge
- HomeKit Glossary of Terms
- iOS Homemanager App
- mDNS Options
- Remote Access
- Useful Links
- Basic Troubleshooting
- Config Options
- Enabling Accessory Control
- Enabling UI with Docker
- Homebridge Service Command
- Manual Configuration
- Reverse Proxy: Apache
- Reverse Proxy: Nginx and SSL
- Standalone Mode
- Swap From Standalone To Service Mode
- Developer Docs
- API Reference
- Plugin Templates
- Other Links (Internal)
- Other Links (External)