Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about hardware (old posts, page 1)

The cases I built for my mini servers

I have writ­ten a cou­ple posts about my rasp­ber­ry-pi home server­s. And peo­ple seem to like the cas­es I 3d-print­ed for them.

Well, if you liked them here they are.

For a Rasp­ber­ry pi 3-based serv­er you need:

  • The case it­self
  • Caps to lock each disk in its slot: 1 and 2
  • Cap to lock the pi in its slot

For a Rasp­ber­ry pi 4-based serv­er you need:

  • The case it­self
  • Caps to lock each disk in its slot: 1 and 2
  • Cap to lock the pi in its slot

All these are just the fol­low­ing de­signs from thin­gi­verse slapped to­geth­er:

  • Pi 3 sleeve case: here
  • Pi 4 sleeve case: here
  • HDD case: here

They work bet­ter (or at al­l!) if you use a pow­ered USB hub. There is no room in the case for it, just buy one you like and glue it to the side :-)

Case with a USB server glued to it

Owning a Pet Server in 2022 (Part 2)

Owning a Pet Server in 2022 (Part 2)

In part 1 I de­scribed why I want­ed this server, and some of the trade­offs and de­ci­sions I had to make to make it hap­pen and work nice­ly.

This is an up­date af­ter re­view­ing some of those de­ci­sion­s, and adding some more soft­ware.

Hardware Changes

  • I added a pow­ered hub. This makes the two-HDD sit­u­a­­tion much more man­age­able avoid­ing un­der­­volts that could harm the hard­ware. I used a cheap pow­ered USB HUB.

  • I tried us­ing a Pi 4 with 4GB of RAM, USB 3 and faster CPU and ... there was no per­­ceiv­able dif­fer­­ence in per­­for­­mance. So, it's back to a Pi 3B+ with 1GB of RAM.

Mem­o­ry us­age hov­ers around 500MB so no prob­lem there.

  • I will get a 4-­port white HUB and in­te­grate it in­to the case (or do a new case) at some point.

Software Changes

  • Moved all ser­vices to run dock­er­ized.

I was re­luc­tant at first, sus­pect­ing a per­for­mance im­pact. Well, it's neg­li­gi­ble and it makes run­ning things MUCH sim­pler.

Spe­cial h/t to lin­uxserv­er.io for their nice, qual­i­ty con­tain­er­s.

  • Added Hedge­­Doc a kick­­ass mark­­down ed­i­­tor / note-­­tak­ing ap­­pli­­ca­­tion / many oth­­er things. Us­ing it to write this!

  • Added FreeRSS as a re­­place­­ment for my us­age of In­­ore­ad­er.

  • Added Medusa, Tran­s­mis­­sion and Jel­­lyfin which com­bined turn in­­­to a nice "hey, I want to watch this TV show" so­lu­­tion.

  • THi­­sis in ad­di­­tion to a we­b­site, gitea and mux­imux to give a uni­­fied fron­­tend to ev­ery­thing.

How does it perform?

I can be stream­ing a video via Jel­lyfin (with transcod­ing) and read­ing news on FreshRSS with nice re­sponse times, and mem­o­ry us­age hov­ers around 500M­B, which CPU load is around 4.

So, I think this is about as far as I can push it, but it's a lot of func­tion­al­i­ty for a tiny, cheap, home serv­er.

Owning a Pet Server, in 2022

Introduction

The slow­est pen­du­lum in tech is the dis­tri­bu­tion/­cen­tral­iza­tion one. It takes years, even decades to swing. That's why we once had cen­tral­ized time­shar­ing com­put­ers with dumb ter­mi­nal­s, and then we had per­son­al com­put­er­s, which we turned in­to in­ter­net ter­mi­nal­s, which we are stuck with.

This seems to be stick­ing, but hey, so did the oth­er two. It may swing the oth­er way, or it may not. Who knows, I am not a fu­tur­ol­o­gist, but I am swing­ing it a lit­tle bit, for my­self, in one small area: I am not hap­py with my da­ta liv­ing pri­mar­i­ly in large serv­er farms owned by oth­er­s.

So, rather than hav­ing my da­ta live in a cat­tle serv­er in a serv­er far­m, it now most­ly lives in a pet server, at home.

Al­low me to in­tro­duce you to ... pinky.

Picture of a small white plastic computer

Pinky will not wow you with spec­s, it's per­haps the slow­est prac­ti­cal serv­er pos­si­ble:

  • Rasp­ber­ry Pi 3b+, 1GB of RAM
  • 16GB SD card
  • 2x500GB HDD (mir­rored)

But it is more than enough for some spe­cif­ic class­es of work I need­ed. In this doc­u­ment I will try to ex­plain why I want­ed to do them, de­scribe them, and ex­plain the trade­offs in­volved, and the de­ci­sion process that lead me to the de­ci­sion to adopt this so­lu­tion.

Software

One of the most im­por­tant things here is Gitea.

It's hard to over­state what a game chang­er it is for a spe­cif­ic kind of user: Gitea makes host­ing a user-friend­ly git ser­vice easy and cheap.

So what? You may ask.

Well, a git serv­er is use­ful as a back­end for many ac­tu­al­ly use­ful ser­vices, even if you don't care about soft­ware de­vel­op­ment (which I do).

Pass

For ex­am­ple, sup­pose you want to man­age your own pass­word­s, in­stead of re­ly­ing on a third par­ty ser­vice. Well one way to do it is to use pass which is an open source im­ple­men­ta­tion which is sup­port­ed in most web browser­s, desk­top ap­pli­ca­tion­s, ter­mi­nals and what­not.

But if you have more than one de­vice ... then how do you sync your pass­words be­tween them? Yes, us­ing a git serv­er.

Chezmoi

Yes, I use more than one com­put­er. I have one at home, one in the of­fice, an­oth­er one for work, plus I am build­ing some home­made stuff us­ing rasp­ber­ry pis, and I want some things to work in the same way in all of them.

Chez­moi is an im­ple­men­ta­tion of the dot­files con­cep­t.

Ba­si­cal­ly: you tell it to man­age some of the con­fig files in your home di­rec­to­ry, which are then ver­sioned and shared be­tween com­put­ers us­ing ... you guessed it, a git serv­er.

It took some ef­fort to get things in a use­ful state but now I think it's ac­tu­al­ly adding val­ue to my sys­tem­s.

My Website

Yeah, I know, so 2003. But hey, it works for me. A cen­tral­ized lo­ca­tion for:

  • Things I write, like this one
  • Books I read and com­ment one, via goodreads
  • Videos I make, via youtube

Again, one of the goals is that my da­ta is mine so all those book list­s, and com­ments and star-rat­ings and what­ev­er ... why would they live on­ly in goodread­s? What if Ama­zon clos­es it?

Well, be­cause I can write soft­ware, I just get it all and put it in my own site, thank you very much.

And guess where the canon­i­cal source of all that is? Yeah, a git repos­i­to­ry, au­to­mat­i­cal­ly built and de­ployed.

Dis­clo­sure: my site is most­ly host­ed on a VPS I al­ready pay for, but there is a mir­ror at home­.ralsi­na.me which is, in­deed, in my pinky serv­er.

Gateway to my Office / Home VPN

All these ser­vices need to be ac­cessed from some­where. Us­ing some gen­er­ous free-ti­er ser­vices from fly and tailscale plus some con­fig­u­ra­tion ef­fort I can, from any of my com­put­ers (and my phone too) ac­cess any oth­er, re­gard­less of where they are, as long as they have some sort of in­ter­net con­nec­tion.

Hardware

Why THIS Hardware?

Be­cause I had it ly­ing around.

  • The rasp­ber­ry from old pro­ject­s, gath­er­ing dust.
  • Two 500GB HDDs from old note­books and giv­en as gift­s.

I had to buy 2 US­B-SA­TA ca­bles (about 5 dol­lars) and a nicer knit­ted mi­cro-usb an­gled ca­ble so it looked pret­ty (1 dol­lar).

Performance

Yes, it's pret­ty slow, but ... is it?

The rasp­ber­ry pi 3b+ is a 4-­core ma­chine, so it can run gitea, a web serv­er and a cou­ple oth­er things with­out any is­sues.

Sure, it's USB 2.0 on­ly, so ac­cess to stor­age is ... not fast.

OTO­H, most of the time I am ac­cess­ing ei­ther very small things (a git pull is pret­ty ef­fi­cien­t!) or over a slow link (30Mbps at most) so stor­age speed is hard­ly ev­er the bot­tle­neck.

One spe­cif­ic thing that makes no sense would be RAID mir­ror­ing be­tween the two disks, it would just make ev­ery­thing slow­er be­cause of the need to write each change twice.

So I turn off one of the disks (saves on wear) and turn it on at night to back­up the whole serv­er in­to it.

Adi­tion­al­ly, I can once a week take the sec­ondary disk and back it up off­site.

Power Usage

Run­ning at full throt­tle, my USB pow­er con­sump­tion mea­sur­ing thing I got for a dol­lar (so take it with a grain of salt) says it may use 1.1A at 5v, so in av­er­age it's prob­a­bly us­ing some­thing like 4W.

I checked my pow­er bill and that comes down to about 20 ar­gen­tini­an pe­sos a mon­th, or 10 US cents.

The Case

I grabbed a rasp­ber­ry "sleeve" case and a 2.5" HDD "sleeve" case out of thin­gi­verse, and slapped them on­to a few box­es, then print­ed it in the cheap­est 3D print­er mon­ey can buy. It works great.

Be­cause it's a Pi 3 and not a Pi 4 it can be pas­sive­ly cooled with no prob­lem and I print­ed the HDD sleeves at 50% in­fill so they would muf­fle the noise a bit. I can on­ly hear the oc­ca­sion­al click from the hard drives, but it's pret­ty much silen­t.

It's al­so around 10cm in each di­men­sion. That's pret­ty smal­l.

Conclusion

This serv­er (with­out the case, that's new) has been work­ing for around a month. It has au­to­mat­ic soft­ware up­dates for ev­ery­thing and if some­thing would hap­pen to break I can live with­out it for a few days with­out any is­sues.

I con­sid­er it a com­plete suc­cess.

Lo que Ando Haciendo

Este post es una lista de "proyec­tos" en los que es­toy me­tien­do mano en es­tos tiem­pos. En otras épocas hu­biera si­do una lista de proyec­tos open source pero hoy en día es al­go bas­tante más di­ver­so.

NINGU­NA de las cosas que van a ver a con­tin­uación es un proyec­to "se­ri­o" o us­able para al­gún ser hu­mano que no sea yo (y a ve­ces ni es­o).

Compu Artesanal

Con­vertí una rasp­ber­ry pi 3 (o 4, aho­ra que sé que an­da) en una com­pu al­l-in-one, con una pan­talla de 8.8 pul­gadas con res­olu­cion 1920x480 (sí, es to­do una com­bi­nación bas­tante ridícu­la)

¿Para qué?

  • Porque quiero apren­der a dis­eñar ob­je­tos fun­cionales.
  • Porque quiero ten­er una com­pu low-end para pro­bar si soft­ware que es­cri­bo fun­ciona con "poco" hard­ware.
  • Porque quiero una com­pu para no mul­ti­taskear. Quiero sen­tarme a es­cribir y es­cribir, o a pro­gra­mar y pro­gra­mar, y no saltar de una cosa a otra.
  • Es el primer es­calón ha­cia hac­erme una note­book casera

¿Que tal viene?

¡Está bási­ca­mente ter­mi­nada! Po­dría de­jar­la co­mo es­tá y de­cir "lis­to", ex­cep­to que al­gu­nas de las partes de la car­caza no son ide­ales, y otras es­tán hechas de dos o tres partes pe­gadas cuan­do de­berían ser una so­la.

¿Fun­ciona? Oh sí.

Features

  • Lin­da pan­talla que les ju­ro es us­able siem­pre y cuan­do la pon­gas jus­to mas al­lá del tecla­do.
  • Un so­lo ca­ble (que se vea des­de el frente) ... in­clu­so tiene una batería, se ban­ca un par de ho­ras des­ench­u­fa­da.
  • Soft­ware con­fig­u­ra­do a me­di­da para el form fac­tor inusu­al.

Lo que me ll­e­va al se­gun­do proyec­to ...

Software configurado para pantallas raras/malas

De­spués de var­ios meses de NO ten­er com­pu en casa me rendí y ha­bil­ité una Thinkpad T430, que es un fier­ro, pero ...

La pan­talla es muy mala. 1384x768. ¡Tiene casi la mis­ma can­ti­dad de pix­els que la pan­talla ridícu­la de mi com­pu arte­sanal!

Así que con DOS com­puta­do­ras con pan­tallas lim­i­tadas de­cidí hac­er al­go al re­spec­to: ele­gir y us­ar soft­ware que no des­perdi­cia tan­to es­pa­cio en pan­talla.

Es­tas son al­gu­nas de las elec­ciones, de­spués de pro­bar lit­eral­mente do­ce­nas de al­ter­na­ti­vas para ca­da cosa.

  • Desk­top: Qtile (con al­gu­na con­fig­u­ración enci­ma)
  • Ter­mi­nal: st (con var­ios parch­es para scroll­back, clip­board y otras cosas)
  • Browser: Qute­brows­er (chrome an­da igual pero des­perdi­cia MUCHA PAN­TALLA)

A su vez tratar de no usar Chrome implica ... donde están mis passwords? Así que estoy migrando a pass ... parece estar andando bien, pero todavía no traté de usarlo en el celular.

A su vez eso me llevó a ...

Software que creo que nadie usa, pero debieran!

Sabés cuan­tas cosas salen si buscás "ter­mi­nal" en Arch Lin­ux? In­cluyen­do los pa­que­tes del AU­R? CIEN­TOS. Y probé una frac­ción grande de el­las.

En par­tic­u­lar me en­con­tré con al­gunos pro­gra­mas que son joy­i­tas que nun­ca había oí­do nom­brar.

  • tab-rs un mul­ti­­plex­er con un so­­lo short­­­cut! de he­­cho ar­mé un set­up bas­­tante ex­­traño usán­­do­­lo pero que me gus­­ta mu­­cho, que merece su propia de­scrip­­ción.

  • slides ... slides! He­­chos con Mark­­down! En una ter­mi­­nal!

  • kiro ... mejor que nano.

Un mouse-joystick

Cuan­do ha­ga mi note­book, voy a nece­si­tar al­go así. Tal vez. Quien sabe.

Y eso me llevó a ...

Programar Raspberry Pi Pico

Mu­cho mas lin­do que pro­gra­mar Ar­duino, y cues­tan lo mis­mo.

Y las posi­bil­i­dades! Es posi­ble hac­er una conex­ión USB a mi mouse-joy­stick y con­fig­u­rar el firmware us­an­do una in­ter­faz de ter­mi­nal!

Quiero un tecla­do que se remapee con una ter­mi­nal se­rie US­B!

No quiero HAC­ER­LO porque no quiero sol­dar to­do eso pero ... y si lo ha­go con un Mod­e­lo M?

Y aparte ...

Y laburo full time. Y leo bas­tante (acá salen los li­bros que voy ter­mi­nan­do)

Así que an­do ocu­pa­do.


Contents © 2000-2023 Roberto Alsina