Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

I’m so stucked… Black Friday reactivated the “store everything on a NAS” project in my poor brain.

Uncategorized
1 1 0
  • I’m so stucked… Black Friday reactivated the “store everything on a NAS” project in my poor brain. As the goal is quite simple : reduce to the minimum the use (and the costs) of our family iCloud plan, you would expect the solution is simple (of course not…). But should also be added to the equation the need to secure data already on external usb disks. (And aging). So, the quest for the right choice begins with a Nas appliance. Syno? No thanks, solid software, old hardware and discutable moves to lock everyone to use their parts catalog. So… considered ugreen Nas such as dxp2800 (two disks, not very upgradable so use huge capacity for a start). Dxp4800 four bays so it is possible to gradually extend the pool in the future. Then there is also MiniPC with nvme slots such as beelink Me Mini. In all cases, storage will be ZFS and data should be encrypted (don’t want thieves to read my data). Software will likely be truenas. A bare FreeBSD would be great but I have no time or skills to build everything from scratch with the insurance that I don’t leave some door opened for exploits. Either ugreen and N100 based pc should be enough for immich and one or two lightweight containers/jails. Costs are also to be considered, as RAM and disks (and NVME) are becoming very pricey. I read some blogs articles from our barista and of course it was so very interesting to build a backup server, remote access in a diy manner, (the geek in me was very tempted, but the end-user in me having to ensure the data from everybody in the house is secured is worried)

  • stefano@mastodon.bsd.cafeundefined stefano@mastodon.bsd.cafe shared this topic on

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • 0 Votes
    1 Posts
    0 Views
    At this weekend I finally established another network in my home — a ZigBee network. A looong time ago (in 2010 year) I touched the ZigBee networking in my university (ITMO, previously IFMO, in Saint-Petersburg) — these times it was a new technology, not used widely. And as a student I have some fun time playing with ZigBee main router, supplemental router and end-devices. You can view old photos and screenshots of old software on a my extremely old blog: http://h0rr0rr-drag0n.blogspot.com/2010/04/cc2530zdk.html (and read a blogpost, if you understand Russian).It is kindly fascinating, that now, after 15 years, I can just buy some ZigBee-powered devices from AliExpress (using Black Friday discounts) and connect them to the network inside my house right in the way I did it in the university 15 years ago!Sadly, although I bought native supported main router device, based on the EFR32MG2 with some software from Ember (EZSP v8) inside, the OpenHAB doesn't support this device natively — it supports it, but since my server is running NetBSD, I got problems with some bundled with OpenHAB things. Looks like some native libraries (rxtx-java) don't have bundled NetBSD versions. And the same library in the repository built for Java 8, not for Java 17.So, I decided to use Zigbee2MQTT, not to build the necessary Java library myself. It was kinda scary — use program, which connects my ZigBee network via ZigBee USB-dongle to the MQTT server — which is written on JavaScript . Not on the C (as I can totally understand, for a such low-level program, operating with embedded devices) or at least on the C++/Perl/Python/whatever. But, looks like it works good enough, if I don't try to pair the device in wrong mode (my window sensors has two modes to pair them with network: first "common" mode causes zigbee2mqtt to silently crash and the second "compatible" mode works without problems).And I could understand now, why people has so much problems with smart home security. Installed MQTT server mosquitto — it allows unauthenticated connections by default. Installed zigbee2mqtt — it allow connections to frontend without any password by default At least these two services don't each much memory: 1.2 Mb for Mosquitto and 75.6 Mb for ZigBee2MQTT.For now, my ZigBee sensors works pretty well and robust, like these devices from university 15 years ago #HomeAutomation #OpenHAB #ZigBee #HomeLab
  • 0 Votes
    1 Posts
    0 Views
    We all love media – to some extent at least!Movies, TV Shows and all the moving pictures we can find and consume.So, since we all have movies etc. on our NAS/HDD/SSD/whatever we should be able to play and see everything we have on all our connected devices.But what can we do?Simple, we leverage Jellyfin to present our media to us.In this little howto we will set up Jellyfin in a Jail on FreeBSD.Let’s get right to it!Creating the JailJails can be created in different ways. In this howto however we will use Bastille – which is a excellent tool for creating Jails.This howto will not go into detail of how to set up Bastille. If you need to set up Bastille first, given you have not installed said tool, you can have a look at the quickstart guide:Bastille Quickstart GuideRight, let’s create the Jail first.$ sudo bastille create media 14.3-RELEASE 10.0.23.77/24 vtnet0You of course need to change the IP address and network interface (vtnet0 is probably not what you want!). Also, one can of course change the name of the Jail – I’ve chosen media since that describes the use case well of said Jail.After that our Jail is ready!Jellyfin needs mlock to be enabled to work properly.$ sudo bastille config media set allow.mlock 1But wait a second… How do I access all my media files?There is no access in the Jail to any directory on the host holding all my videos!Right, that is the case indeed!So, what can we do?Simple, we just mount our media directory in the Jail with nullfs!$ sudo bastille mount "media" /home/x/videos/ /videos nullfs ro 0 0This line mount /home/x/videos/ in the Jail under /videos. Also, I mount the directory as readonly – which you can change by sepcifying rw on the command above. Be sure to also select the correct Jail – in my case media.Jail fun with JellyfinWe can now finally enter the jail to further go along with the howto.$ sudo bastille console mediaLet’s first install Jellyfin which is directly accessible from the official package repository.$ pkg$ pkg update -f$ pkg install -y jellyfinThe first command pkg bootstraps the pkg package manager. The second command refreshes the package cache and the last command installs Jellyfin itself.Right, so far so good.But we also need to configure Jellfin (Service) to always start. And, last but not least, we need to start Jellyfin – since it is not running after the installation finished.$ sysrc jellyfin_enable="YES"$ service jellyfin startWe did all that, alright… But how do we know Jellyfin is running?Let’s have a look at the ps and sockstat output.root@media:~ # sockstat -l4USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS jellyfin jellyfin 10700 478 udp4 10.0.23.77:7359 *:*jellyfin jellyfin 10700 503 tcp4 10.0.23.77:8096 *:*root@media:~ # ps ax PID TT STAT TIME COMMAND10662 - SsJ 0:00.00 /usr/sbin/syslogd -ss10699 - IsJ 0:00.00 daemon: /usr/local/jellyfin/jellyfin[10700] (daemon)10700 - IJ 0:03.81 /usr/local/jellyfin/jellyfin --datadir /var/db/jellyfin --cachedir /var/cache/jellyfin10706 - SsJ 0:00.00 /usr/sbin/cron -J 60 -s10804 1 IJ 0:00.00 login [pam] (login)10805 1 SJ 0:00.01 -sh (sh)10842 1 R+J 0:00.00 ps axAh yes, Jellyfin is running and listening on port 8096 – which is the designated port for Jellyfin!Jellyfin all the way!Since we established that Jellyfin is running and listening, let’s open our webbrowser of choice and navigate over to the install wizard.$ firefox http://10.0.23.77:8096We are greated with the intital Jellyfin wizard.I will not go into detail on how to set up the wizard. But don’t worry, there is a excellent guide over on the official Jellyfin website.The guide can be found here: Jellyfin Setup Wizard guideBe sure to add your nullfs mounted directory in your library to be able to play said videos and shows.That is all there is to it.Simple, easy and clean. Everything is done in a Jail and isolated. Also, mounting a media directory is easy and straightforward via bastille mount.Final wordsThis little howto just shows how versatile jails are. One can of course tweak the setup further and for example add a reverse proxy (like Nginx) to the mix.The sky is the limit – Tools like bastille are very powerful and flexible!Enjoy!…and as always:Stay Open!
  • 0 Votes
    2 Posts
    0 Views
    @pandolin I love this - the LEGO penguin on top is 👌🏻 can I ask which 3D printed case design you used there?
  • 0 Votes
    1 Posts
    11 Views
    Migrated my ZigBee2MQTT to BSD, of course running inside a Jail (and with IPv6!) 🙂 All running perfectly fine and as stable as you'd expect from FreeBSD Plus the rc.d script is so minimalistic and simple, that I don't get it, why anyone would prefer intransparent systemd to that!Another part of my home-infrastructure migrated over! #freebsd #jais #zigbee #mqtt #smarthome #unix #homelab