commit 3efc55d7b9995ffcbb1c628636deb26e219b0686 Author: dozens Date: Mon Nov 13 13:42:05 2023 -0700 šŸ„§ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d4a8078 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# piblog + +this is a log of stuff i do for my raspberry pi homelab + +check it out diff --git a/justfile b/justfile new file mode 100644 index 0000000..cb8be53 --- /dev/null +++ b/justfile @@ -0,0 +1,43 @@ +# show all options +default: + just --list --unsorted + +# build html from markdown +html: + pandoc -f markdown+autolink_bare_uris -t html --standalone -H templates/header-includes.html --toc -o www/index.html src/piblog.md + +# build rss feed from journal +rss: + #!/usr/bin/env sh + echo "piblog" > www/feed.xml + echo "http://tilde.town/~dozens/piblog/index.htmljust a little log about my raspberry pi" >> www/feed.xml + ed -s !'markdown src/piblog.md' << HEREDOC | recfmt -f templates/feeditem.template | m4 >> www/feed.xml + /BEGIN/ka + /END/kb + 1,'ad + 'b,d + g/^

/+s/^/note: / + v/^note/s/^/+ / + %s/+

/

/ + %s_^

- \(.*\)

_\\ + time: \1\\ + title: \2_ + g/^+ $/d + ,w /dev/stdout + Q + HEREDOC + echo '
' >> www/feed.xml + +# watch for changes +watch: + ls src/piblog.md | entr just html + +# build html and rss +build: html rss + +# upload +up: + rsync -zaP www/ tilde:public_html/piblog + +# build and upload +all: build up diff --git a/src/piblog.md b/src/piblog.md new file mode 100644 index 0000000..49c36e2 --- /dev/null +++ b/src/piblog.md @@ -0,0 +1,354 @@ +--- +title: piblog +subtitle: adventures with my raspberry pi +author: dozens +toc-title: entries +--- + +## about + +Hi! This is my journal +about my experiences, +exploits, +and hijinks +while setting up a raspberry pi homelab. +it is a Pi 3 Model B named guyute + +- www: tilde.town/~dozens +- email: dozens@tilde.team +- fedi: @dozens@tiny.tilde.website +- irc: dozens on {libera,tilde}.chat +- webring: + prev + index + next + + +## - audiobooks + +okay so tomasino reminded me today that i used to love listening to audiobooks. + +https://labs.tomasino.org/audiobooks/ + +but i haven't done it as fanatically as i used to in a long time. +for a while, i didn't have a commute. +and now i do, but i often carpool. +but sometimes i have a solo, quiet commute. +ideal for some audiobooks! + +further complications: +i am unable to download and archive audiobooks from overdrive the same way i used to be able to. +because they barely support their desktop apps anymore, +and instead push really hard for everybody to use their streaming apps. + +but i learned that if i spoof my user-agent + +https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ + +then i can get a 'Have overdrive for mac/windows?' link upon checkout +that will enable me to download the odm file. +which i can then use to download the mp3s thanks to this special little script. + +https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive + +so that's great! +while i was troubleshooting all of this, +i downloaded a book to my linux laptop, +because the download link is already readily available there, +and then transferred it over to the pi. + +so now i guess i'm going to start collecting and archiving audiobooks on the pi too! +i might look into jellyfin in earnest so i can serve them +and download them over my home network. + +i might also have to start really considering a vpn +so i can access my files away from the house. + +## - add email to calibre-web + +just a quick note to look into configuring email for calibre-web +so i can send books direct to my kindle + +whoa this fork looks really great +compared to what i have + + + +the ui looks good +and it has single click send to e-mail +and also "Magic Link" login for easy access on eReaders.. +that's great. + +what is that i'm running? + +just the base `calibre-server` that comes with the calibre package in apt. + +okay new goal: install and run `calibre-web`, +and stop using `calibre-server`? + +## - abduco + dvtm = tmux replacement? + +i can't remember how i fell down this rabbit hole.. +i think it's because elly had been talking about dtach over on #tildetown, +which is a utility that just provides the attach/detach +functionality of tmux. + +so anyway i started using abduco + dvtm on my pi +just to test it out +and see what it was like +and i quite like it! +dvtm especially is kind of nice +as a tiling window manager for the terminal. + +abduco isn't in the package repository at work, +but i started using dtach + dvtm this week. +we'll see if i stick with it. +pretty nice so far! + +- +- +- + +## - jellyfin + +just a quick note to remind myself to check out jellyfin + + + +a media server alternative to plex +that is supposed to be much lighter and more simple +than plex. + +## - DeDRM + +shelled into the pi and curled the latest DeDRM tools release + +https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3 + +but i kept getting an empty file for some reason? + +no matter, downloaded it to my laptop and `scp`d it + +unzipped it on the pi and + +``` +calibre-customize --add DeDRM.zip +``` + +it wasn't working at that point because i didn't have any keys defined in the `dedrm.json` so I `scp`d my config json from my laptop to `.config/calibre/plugins/DeDRM`. at this point, i'm still unable to open the book after adding it via the web ui. but when i `calibredb --add book.epub --with-library=books --duplicates` on the pi terminal, it adds it. (`--duplicates` is necessary only in this test instance because---oops!---turns out i already have this book in my library, but i am determined to use this opportunity to set up DeDRM. i will delete the duplicate later.) I can't verify in the web ui though because it's not showing the duplicate. must have merged it with the old one. + +oh well. i'll try it again next time i get a book from the library. shortest wait: currently 6 weeks. + +actually no, let's just go checkout an Available Now book. Song of Achilles. I liked Circe. Let's get this one. + +- confirmed: can add the book via web ui, but not open or read it because of drm + +- confirmed: can scp the book to the pi, `calibre add book.epub --with-library=books` and get an `Added book ids: ` message + +- confirmed: new book does NOT show up in web ui after killing and restarting the daemon + +- confirmed: the book IS there: + + ``` + $ calibredb list --search='id:3' --with-library=books + id title authors + 3 The Song of Achilles Madeline Miller + $ #wtf + ``` + +what the hell. does `calibre-server` has a db cache or something? i don't see anything + +https://manual.calibre-ebook.com/generated/en/calibre-server.html + +i give up for now + +~ + +to kill the process: + +``` +ps aux | grep calibre +``` + +and then kill the id + + +removing the dulplicate: + +``` +calibredb search 'title:"world we make"' --with-library=books +> 1,2 +calibredb list --search 'id:2' --with-library=books +> (book info) +calibredb list --search 'id:1' --with-library=books +> (book info) +calibredb remove 2 +``` + +tags: #calibre #drm + + + +## - reboot + +been uploading photos and books, and editing metadata for my rpgs. + +pi became unresponsive last night / this morning to web and ssh so rebooted this morning and restarted web services. everything seems to be fine now. + +found these resources recently and consider them next steps on my todo list: + +- Add deDRM tools for CLI so I can upload library books. I can pretty much delete local calibre after this. https://github.com/noDRM/DeDRM_tools/blob/master/CALIBRE_CLI_INSTRUCTIONS.md + +- Be your own CA Authority! which initially sounds to me like not that good of an idea, but then I can use `https` for my local webservices. https://jamielinux.com/docs/openssl-certificate-authority/ + +- still want to install a reverse proxy (lapis + openresty?) so i can hit canonical urls instead of typing in address + port number. this would make it easier to share URLs with household members. NOTE: do i want a local DNS server?? + +Incidentally, mDNS seemed to just magically start working on its self at some point. I can hit my pi's url on macbook and on my phone now. weeeeeird + +tags: #reboot #mdns + +## - rpg library + +tried searching for an rpg that i know is in my collection and couldn't find it by title or by author. +this is going to be really painful until i update the metadata on everything. +i've done about 60 so far. out of 1.4k. big yikes! + +tags: #calibre #rpg #metadata + +## - mDNS + +still can't hit any multi DNS urls on any of my devices. + +not a solution but a workaround (for desktop only): added a line to `/etc/hosts` on my MBP: + +``` +192.168.0.83 pi.local +``` + +and now i can hit e.g. calibre with http://pi.local:8080 + +maybe i can configure something on my actual router? + +tags: #mdns + +## - miniflux + +rss reader! + +one thing i would like to be able to do +is to read my rss feeds on my computer +and on my phone +and on my tablet, +and have my un/read status sync between decives. + +which i guess means hosting a feed reader! + +i glanced at `awesome-selfhosted` +and then asked some of my friends in the basement +because i know that they have already undertaken +great adventures in rss, +trailblazers that they are. + +and they recommended miniflux. + +written in go, and it uses postgres. +luckily they have a docker image so i don't have to install either. +the docker-compose file on their installation instructions is a little out of date, +but you can find a more correct 'basic.yml' on github at `miniflux/v2` + +after a few tweaks, +it is installed and running! + +the ui is super minimal. +i'm sure i'll grow to like it, +but at the moment +i am missing the classic +three-pane "feeds / entries / content" view. + +Up next: + +- gemini/gopher server? just for fun +- nginx reverse proxy: i have three services running on three ports now. i want a proxy for more easiy routing between these. i choose nginx because lua, so i can fennel + +tags: #rss #feeds #miniflux + +## - calibre + +had to add the upstream debian bullseye repo to install `calibre-server`. (and then remove it.) got the web server up and running pretty easy. + +fussed around for a while trying to make a second calibre library out of my rpg collection. here's what ended up working: +create a new dir and then `calibredb add path/to/file.pdf --library-path new/library/location`. adding a single file this way created the necessary database file. then i was able to `find rpgsbak -type f -name '*.pdf' -exec -I {} calibredb add {} --library-path new/library/loction`. (or something like that; wrote the command just now from memory.) and pull all my pdfs in! + +so now i have 1.4k pdfs in a new 'rpgs' library alongside my 'books' library. + +on the whole, hobby ttrpg creators can stand to get a LOT better at exporting metadata with their pdfs. now i have a whole lot of manual updating to do. but i can read books and pdfs now from my calibre library on any device on the network. + +also adding new items via the web ui is pretty easy! + +TODO: disable converting to epub on 'read' for rpg library. 'download' to read still works great for reading in the meantime. + +tags: #calibre + +## - photoprism + +browsed the photo hosting options on `awesome-selfhosted` on github and decided on photoprism + +it has a docker image and i was able to get it working no problem, with no modifications. quick and easy. this is the future containers promised us. + +the ui is slow. i have the number of workers cranked down to 1. might bump it to 2. + +i had been rsyncing photos to the pi and then reindexing the collection. but i'm finding it quicker to do a bulk upload using the web ui. it's working rather reliably. it still has to reindex on upload, but i no longer have to reindex the entire collection. + +tags: #photos #photoprism + +## - git + +Add a "git" user. Create a home dir for it. Do `git init --bare repo.git`. + +Copy my ssh key over and add an entry to `.ssh/config`: + +``` + 21 ā”‚ Host git + 22 ā”‚ Hostname 192.168.0.83 + 23 ā”‚ User git + 24 ā”‚ IdentityFile ~/.ssh/id_rsa +``` + +Now I can `git remote add pi git:repo.git` in a local repo and push away! + +tags: #git + +## - Hello World + +Okay let's get this party started! + +I have a raspberry pi model 3b that has been gathering dust in a drawer for a couple years now. + +I decided I wanted to dust it off and use it to backup some photos and some files. + +I bought a 4TB external hard drive and a 128gb microSD card and hooked it all up. + +I downloaded the NOOBS installer from raspberrypi.com/software and installed it on the SD card, which I was able to do because I have a ton of dongles thanks to the fact that my MacbookPro has no peripherals. I popped the card in to the pi, connected my usb keyboard and hdmi monitor and booted it up, and went through the setup. + +Then, after testing that I can ssh into the pi, I unplugged my keyboard and monitor and never plugged them back in again. + +Plugged in my hard drive and formatted it with an ext3 filesystem. + +Created a backup user. (Not a spare user in case of emergencies, but a user specifically for creating backups.) + +Copied my ssh keys over: + +``` +ssh-copy-id -i ~/.ssh/id_rsa pi.local +``` + +Mounted the drive, added it to `/etc/fstab` so it will auto-mount, and added a slight delay to the boot command so that there is time for the drive to mount before the system boots. As suggested here: + + + +Copied over my first photo export and my calibre library with an `rsync -zaP`. + +Messed around with mDNS and avahi-daemon because I can't hit http://pi.local in the browser. Still haven't figured this out. + +tags: #mdns #getting-started + diff --git a/templates/feeditem.template b/templates/feeditem.template new file mode 100644 index 0000000..e7ea6d3 --- /dev/null +++ b/templates/feeditem.template @@ -0,0 +1,13 @@ + + {{title}} + http://tilde.town/~dozens/piblog/index.html + {{time}} {{title}} + syscmd(`gdate -d {{time}}') + + + + diff --git a/templates/header-includes.html b/templates/header-includes.html new file mode 100644 index 0000000..f3f2f0d --- /dev/null +++ b/templates/header-includes.html @@ -0,0 +1 @@ + diff --git a/www/feed.xml b/www/feed.xml new file mode 100644 index 0000000..14836d2 --- /dev/null +++ b/www/feed.xml @@ -0,0 +1,359 @@ +piblog +http://tilde.town/~dozens/piblog/index.htmljust a little log about my raspberry pi + + audiobooks + http://tilde.town/~dozens/piblog/index.html + 2023-11-13 audiobooks + Mon Nov 13 00:00:00 MST 2023 + + + okay so tomasino reminded me today that i used to love listening to audiobooks.

+

https://labs.tomasino.org/audiobooks/

+

but i haven’t done it as fanatically as i used to in a long time. +for a while, i didn’t have a commute. +and now i do, but i often carpool. +but sometimes i have a solo, quiet commute. +ideal for some audiobooks!

+

further complications: +i am unable to download and archive audiobooks from overdrive the same way i used to be able to. +because they barely support their desktop apps anymore, +and instead push really hard for everybody to use their streaming apps.

+

but i learned that if i spoof my user-agent

+

https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/

+

then i can get a ‘Have overdrive for mac/windows?’ link upon checkout +that will enable me to download the odm file. +which i can then use to download the mp3s thanks to this special little script.

+

https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive

+

so that’s great! +while i was troubleshooting all of this, +i downloaded a book to my linux laptop, +because the download link is already readily available there, +and then transferred it over to the pi.

+

so now i guess i’m going to start collecting and archiving audiobooks on the pi too! +i might look into jellyfin in earnest so i can serve them +and download them over my home network.

+

i might also have to start really considering a vpn +so i can access my files away from the house.

+ ]]> +
+
+ + add email to calibre-web + http://tilde.town/~dozens/piblog/index.html + 2023-11-07 add email to calibre-web + Tue Nov 7 00:00:00 MST 2023 + + + just a quick note to look into configuring email for calibre-web +so i can send books direct to my kindle

+

whoa this fork looks really great +compared to what i have

+

https://github.com/janeczku/calibre-web

+

the ui looks good +and it has single click send to e-mail +and also “Magic Link” login for easy access on eReaders.. +that’s great.

+

what is that i’m running?

+

just the base calibre-server that comes with the calibre package in apt.

+

okay new goal: install and run calibre-web, +and stop using calibre-server?

+ ]]> +
+
+ + abduco + dvtm = tmux replacement? + http://tilde.town/~dozens/piblog/index.html + 2023-10-28 abduco + dvtm = tmux replacement? + Sat Oct 28 00:00:00 MDT 2023 + + + i can’t remember how i fell down this rabbit hole.. +i think it’s because elly had been talking about dtach over on #tildetown, +which is a utility that just provides the attach/detach +functionality of tmux.

+

so anyway i started using abduco + dvtm on my pi +just to test it out +and see what it was like +and i quite like it! +dvtm especially is kind of nice +as a tiling window manager for the terminal.

+

abduco isn’t in the package repository at work, +but i started using dtach + dvtm this week. +we’ll see if i stick with it. +pretty nice so far!

+ + ]]> +
+
+ + jellyfin + http://tilde.town/~dozens/piblog/index.html + 2023-10-11 jellyfin + Wed Oct 11 00:00:00 MDT 2023 + + + just a quick note to remind myself to check out jellyfin

+

https://jellyfin.org/

+

a media server alternative to plex +that is supposed to be much lighter and more simple +than plex.

+ ]]> +
+
+ + DeDRM + http://tilde.town/~dozens/piblog/index.html + 2023-09-29 DeDRM + Fri Sep 29 00:00:00 MDT 2023 + + + shelled into the pi and curled the latest DeDRM tools release

+

https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3

+

but i kept getting an empty file for some reason?

+

no matter, downloaded it to my laptop and scpd it

+

unzipped it on the pi and

+

+calibre-customize --add DeDRM.zip +

+

it wasn’t working at that point because i didn’t have any keys defined in the dedrm.json so I scpd my config json from my laptop to .config/calibre/plugins/DeDRM. at this point, i’m still unable to open the book after adding it via the web ui. but when i calibredb --add book.epub --with-library=books --duplicates on the pi terminal, it adds it. (--duplicates is necessary only in this test instance because—oops!—turns out i already have this book in my library, but i am determined to use this opportunity to set up DeDRM. i will delete the duplicate later.) I can’t verify in the web ui though because it’s not showing the duplicate. must have merged it with the old one.

+

oh well. i’ll try it again next time i get a book from the library. shortest wait: currently 6 weeks.

+

actually no, let’s just go checkout an Available Now book. Song of Achilles. I liked Circe. Let’s get this one.

+
    +
  • confirmed: can add the book via web ui, but not open or read it because of drm

  • +
  • confirmed: can scp the book to the pi, calibre add book.epub --with-library=books and get an Added book ids: <id> message

  • +
  • confirmed: new book does NOT show up in web ui after killing and restarting the daemon

  • +
  • confirmed: the book IS there:

    +
      ```
    +  $ calibredb list --search='id:3' --with-library=books
    +  id title                authors
    +  3 The Song of Achilles Madeline Miller
    +  $ #wtf
    +  ```
    +
  • +
+

what the hell. does calibre-server has a db cache or something? i don’t see anything

+

https://manual.calibre-ebook.com/generated/en/calibre-server.html

+

i give up for now

+

~

+

to kill the process:

+

+ps aux | grep calibre +

+

and then kill the id

+

removing the dulplicate:

+

``` +calibredb search ‘title:“world we make”’ –with-library=books

+

1,2 +calibredb list –search ‘id:2’ –with-library=books +(book info) +calibredb list –search ‘id:1’ –with-library=books +(book info) +calibredb remove 2 +```

+

tags: #calibre #drm

+ ]]> +
+
+ + reboot + http://tilde.town/~dozens/piblog/index.html + 2023-09-29 reboot + Fri Sep 29 00:00:00 MDT 2023 + + + been uploading photos and books, and editing metadata for my rpgs.

+

pi became unresponsive last night / this morning to web and ssh so rebooted this morning and restarted web services. everything seems to be fine now.

+

found these resources recently and consider them next steps on my todo list:

+
    +
  • Add deDRM tools for CLI so I can upload library books. I can pretty much delete local calibre after this. https://github.com/noDRM/DeDRM_tools/blob/master/CALIBRE_CLI_INSTRUCTIONS.md

  • +
  • Be your own CA Authority! which initially sounds to me like not that good of an idea, but then I can use https for my local webservices. https://jamielinux.com/docs/openssl-certificate-authority/

  • +
  • still want to install a reverse proxy (lapis + openresty?) so i can hit canonical urls instead of typing in address + port number. this would make it easier to share URLs with household members. NOTE: do i want a local DNS server??

  • +
+

Incidentally, mDNS seemed to just magically start working on its self at some point. I can hit my pi’s url on macbook and on my phone now. weeeeeird

+

tags: #reboot #mdns

+ ]]> +
+
+ + rpg library + http://tilde.town/~dozens/piblog/index.html + 2023-09-13 rpg library + Wed Sep 13 00:00:00 MDT 2023 + + + tried searching for an rpg that i know is in my collection and couldn’t find it by title or by author. +this is going to be really painful until i update the metadata on everything. +i’ve done about 60 so far. out of 1.4k. big yikes!

+

tags: #calibre #rpg #metadata

+ ]]> +
+
+ + mDNS + http://tilde.town/~dozens/piblog/index.html + 2023-09-12 mDNS + Tue Sep 12 00:00:00 MDT 2023 + + + still can’t hit any multi DNS urls on any of my devices.

+

not a solution but a workaround (for desktop only): added a line to /etc/hosts on my MBP:

+

+192.168.0.83 pi.local +

+

and now i can hit e.g. calibre with http://pi.local:8080

+

maybe i can configure something on my actual router?

+

tags: #mdns

+ ]]> +
+
+ + miniflux + http://tilde.town/~dozens/piblog/index.html + 2023-09-11 miniflux + Mon Sep 11 00:00:00 MDT 2023 + + + rss reader!

+

one thing i would like to be able to do +is to read my rss feeds on my computer +and on my phone +and on my tablet, +and have my un/read status sync between decives.

+

which i guess means hosting a feed reader!

+

i glanced at awesome-selfhosted +and then asked some of my friends in the basement +because i know that they have already undertaken +great adventures in rss, +trailblazers that they are.

+

and they recommended miniflux.

+

written in go, and it uses postgres. +luckily they have a docker image so i don’t have to install either. +the docker-compose file on their installation instructions is a little out of date, +but you can find a more correct ‘basic.yml’ on github at miniflux/v2

+

after a few tweaks, +it is installed and running!

+

the ui is super minimal. +i’m sure i’ll grow to like it, +but at the moment +i am missing the classic +three-pane “feeds / entries / content” view.

+

Up next:

+
    +
  • gemini/gopher server? just for fun
  • +
  • nginx reverse proxy: i have three services running on three ports now. i want a proxy for more easiy routing between these. i choose nginx because lua, so i can fennel
  • +
+

tags: #rss #feeds #miniflux

+ ]]> +
+
+ + calibre + http://tilde.town/~dozens/piblog/index.html + 2023-09-08 calibre + Fri Sep 8 00:00:00 MDT 2023 + + + had to add the upstream debian bullseye repo to install calibre-server. (and then remove it.) got the web server up and running pretty easy.

+

fussed around for a while trying to make a second calibre library out of my rpg collection. here’s what ended up working: +create a new dir and then calibredb add path/to/file.pdf --library-path new/library/location. adding a single file this way created the necessary database file. then i was able to find rpgsbak -type f -name '*.pdf' -exec -I {} calibredb add {} --library-path new/library/loction. (or something like that; wrote the command just now from memory.) and pull all my pdfs in!

+

so now i have 1.4k pdfs in a new ‘rpgs’ library alongside my ‘books’ library.

+

on the whole, hobby ttrpg creators can stand to get a LOT better at exporting metadata with their pdfs. now i have a whole lot of manual updating to do. but i can read books and pdfs now from my calibre library on any device on the network.

+

also adding new items via the web ui is pretty easy!

+

TODO: disable converting to epub on ‘read’ for rpg library. ‘download’ to read still works great for reading in the meantime.

+

tags: #calibre

+ ]]> +
+
+ + photoprism + http://tilde.town/~dozens/piblog/index.html + 2023-09-03 photoprism + Sun Sep 3 00:00:00 MDT 2023 + + + browsed the photo hosting options on awesome-selfhosted on github and decided on photoprism

+

it has a docker image and i was able to get it working no problem, with no modifications. quick and easy. this is the future containers promised us.

+

the ui is slow. i have the number of workers cranked down to 1. might bump it to 2.

+

i had been rsyncing photos to the pi and then reindexing the collection. but i’m finding it quicker to do a bulk upload using the web ui. it’s working rather reliably. it still has to reindex on upload, but i no longer have to reindex the entire collection.

+

tags: #photos #photoprism

+ ]]> +
+
+ + git + http://tilde.town/~dozens/piblog/index.html + 2023-08-30 git + Wed Aug 30 00:00:00 MDT 2023 + + + Add a “git” user. Create a home dir for it. Do git init --bare repo.git.

+

Copy my ssh key over and add an entry to .ssh/config:

+

+ 21 ā”‚ Host git + 22 ā”‚ Hostname 192.168.0.83 + 23 ā”‚ User git + 24 ā”‚ IdentityFile ~/.ssh/id_rsa +

+

Now I can git remote add pi git:repo.git in a local repo and push away!

+

tags: #git

+ ]]> +
+
+ + Hello World + http://tilde.town/~dozens/piblog/index.html + 2023-08-28 Hello World + Mon Aug 28 00:00:00 MDT 2023 + + + Okay let’s get this party started!

+

I have a raspberry pi model 3b that has been gathering dust in a drawer for a couple years now.

+

I decided I wanted to dust it off and use it to backup some photos and some files.

+

I bought a 4TB external hard drive and a 128gb microSD card and hooked it all up.

+

I downloaded the NOOBS installer from raspberrypi.com/software and installed it on the SD card, which I was able to do because I have a ton of dongles thanks to the fact that my MacbookPro has no peripherals. I popped the card in to the pi, connected my usb keyboard and hdmi monitor and booted it up, and went through the setup.

+

Then, after testing that I can ssh into the pi, I unplugged my keyboard and monitor and never plugged them back in again.

+

Plugged in my hard drive and formatted it with an ext3 filesystem.

+

Created a backup user. (Not a spare user in case of emergencies, but a user specifically for creating backups.)

+

Copied my ssh keys over:

+

+ssh-copy-id -i ~/.ssh/id_rsa pi.local +

+

Mounted the drive, added it to /etc/fstab so it will auto-mount, and added a slight delay to the boot command so that there is time for the drive to mount before the system boots. As suggested here:

+

https://howtoforge.com/tutorial/raspberry-pi-as-backup-server-for-linux-and-windows/

+

Copied over my first photo export and my calibre library with an rsync -zaP.

+

Messed around with mDNS and avahi-daemon because I can’t hit http://pi.local in the browser. Still haven’t figured this out.

+

tags: #mdns #getting-started

+ ]]> +
+
+
diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000..592e7d4 --- /dev/null +++ b/www/index.html @@ -0,0 +1,513 @@ + + + + + + + + piblog + + + + + +
+

piblog

+

adventures with my raspberry pi

+

dozens

+
+ +

about

+

Hi! This is my journal about my experiences, exploits, and hijinks +while setting up a raspberry pi homelab. it is a Pi 3 Model B named +guyute

+
    +
  • www: tilde.town/~dozens
  • +
  • email: dozens@tilde.team
  • +
  • fedi: @dozens@tiny.tilde.website
  • +
  • irc: dozens on {libera,tilde}.chat
  • +
  • webring: +prev +index +next
  • +
+ +

- audiobooks

+

okay so tomasino reminded me today that i used to love listening to +audiobooks.

+

https://labs.tomasino.org/audiobooks/

+

but i havenā€™t done it as fanatically as i used to in a long time. for +a while, i didnā€™t have a commute. and now i do, but i often carpool. but +sometimes i have a solo, quiet commute. ideal for some audiobooks!

+

further complications: i am unable to download and archive audiobooks +from overdrive the same way i used to be able to. because they barely +support their desktop apps anymore, and instead push really hard for +everybody to use their streaming apps.

+

but i learned that if i spoof my user-agent

+

https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/

+

then i can get a ā€˜Have overdrive for mac/windows?ā€™ link upon checkout +that will enable me to download the odm file. which i can then use to +download the mp3s thanks to this special little script.

+

https://github.com/jamestomasino/dotfiles-minimal/blob/master/bin/overdrive

+

so thatā€™s great! while i was troubleshooting all of this, i +downloaded a book to my linux laptop, because the download link is +already readily available there, and then transferred it over to the +pi.

+

so now i guess iā€™m going to start collecting and archiving audiobooks +on the pi too! i might look into jellyfin in earnest so i can serve them +and download them over my home network.

+

i might also have to start really considering a vpn so i can access +my files away from the house.

+

- add email to +calibre-web

+

just a quick note to look into configuring email for calibre-web so i +can send books direct to my kindle

+

whoa this fork looks really great compared to what i have

+

https://github.com/janeczku/calibre-web

+

the ui looks good and it has single click send to e-mail and also +ā€œMagic Linkā€ login for easy access on eReaders.. thatā€™s great.

+

what is that iā€™m running?

+

just the base calibre-server that comes with the calibre +package in apt.

+

okay new goal: install and run calibre-web, and stop +using calibre-server?

+

- abduco + +dvtm = tmux replacement?

+

i canā€™t remember how i fell down this rabbit hole.. i think itā€™s +because elly had been talking about dtach over on #tildetown, which is a +utility that just provides the attach/detach functionality of tmux.

+

so anyway i started using abduco + dvtm on my pi just to test it out +and see what it was like and i quite like it! dvtm especially is kind of +nice as a tiling window manager for the terminal.

+

abduco isnā€™t in the package repository at work, but i started using +dtach + dvtm this week. weā€™ll see if i stick with it. pretty nice so +far!

+ +

- jellyfin

+

just a quick note to remind myself to check out jellyfin

+

https://jellyfin.org/

+

a media server alternative to plex that is supposed to be much +lighter and more simple than plex.

+

- DeDRM

+

shelled into the pi and curled the latest DeDRM tools release

+

https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.3

+

but i kept getting an empty file for some reason?

+

no matter, downloaded it to my laptop and scpd it

+

unzipped it on the pi and

+
calibre-customize --add DeDRM.zip
+

it wasnā€™t working at that point because i didnā€™t have any keys +defined in the dedrm.json so I scpd my config +json from my laptop to .config/calibre/plugins/DeDRM. at +this point, iā€™m still unable to open the book after adding it via the +web ui. but when i +calibredb --add book.epub --with-library=books --duplicates +on the pi terminal, it adds it. (--duplicates is necessary +only in this test instance becauseā€”oops!ā€”turns out i already have this +book in my library, but i am determined to use this opportunity to set +up DeDRM. i will delete the duplicate later.) I canā€™t verify in the web +ui though because itā€™s not showing the duplicate. must have merged it +with the old one.

+

oh well. iā€™ll try it again next time i get a book from the library. +shortest wait: currently 6 weeks.

+

actually no, letā€™s just go checkout an Available Now book. Song of +Achilles. I liked Circe. Letā€™s get this one.

+
    +
  • confirmed: can add the book via web ui, but not open or read it +because of drm

  • +
  • confirmed: can scp the book to the pi, +calibre add book.epub --with-library=books and get an +Added book ids: <id> message

  • +
  • confirmed: new book does NOT show up in web ui after killing and +restarting the daemon

  • +
  • confirmed: the book IS there:

    +
      ```
    +  $ calibredb list --search='id:3' --with-library=books
    +  id title                authors
    +  3 The Song of Achilles Madeline Miller
    +  $ #wtf
    +  ```
  • +
+

what the hell. does calibre-server has a db cache or +something? i donā€™t see anything

+

https://manual.calibre-ebook.com/generated/en/calibre-server.html

+

i give up for now

+

~

+

to kill the process:

+
ps aux | grep calibre
+

and then kill the id

+

removing the dulplicate:

+
calibredb search 'title:"world we make"' --with-library=books
+> 1,2
+calibredb list --search 'id:2' --with-library=books
+> (book info)
+calibredb list --search 'id:1' --with-library=books
+> (book info)
+calibredb remove 2
+

tags: #calibre #drm

+

- reboot

+

been uploading photos and books, and editing metadata for my +rpgs.

+

pi became unresponsive last night / this morning to web and ssh so +rebooted this morning and restarted web services. everything seems to be +fine now.

+

found these resources recently and consider them next steps on my +todo list:

+ +

Incidentally, mDNS seemed to just magically start working on its self +at some point. I can hit my piā€™s url on macbook and on my phone now. +weeeeeird

+

tags: #reboot #mdns

+

- rpg library

+

tried searching for an rpg that i know is in my collection and +couldnā€™t find it by title or by author. this is going to be really +painful until i update the metadata on everything. iā€™ve done about 60 so +far. out of 1.4k. big yikes!

+

tags: #calibre #rpg #metadata

+

- mDNS

+

still canā€™t hit any multi DNS urls on any of my devices.

+

not a solution but a workaround (for desktop only): added a line to +/etc/hosts on my MBP:

+
192.168.0.83  pi.local
+

and now i can hit e.g.Ā calibre with http://pi.local:8080

+

maybe i can configure something on my actual router?

+

tags: #mdns

+

- miniflux

+

rss reader!

+

one thing i would like to be able to do is to read my rss feeds on my +computer and on my phone and on my tablet, and have my un/read status +sync between decives.

+

which i guess means hosting a feed reader!

+

i glanced at awesome-selfhosted and then asked some of +my friends in the basement because i know that they have already +undertaken great adventures in rss, trailblazers that they are.

+

and they recommended miniflux.

+

written in go, and it uses postgres. luckily they have a docker image +so i donā€™t have to install either. the docker-compose file on their +installation instructions is a little out of date, but you can find a +more correct ā€˜basic.ymlā€™ on github at miniflux/v2

+

after a few tweaks, it is installed and running!

+

the ui is super minimal. iā€™m sure iā€™ll grow to like it, but at the +moment i am missing the classic three-pane ā€œfeeds / entries / contentā€ +view.

+

Up next:

+
    +
  • gemini/gopher server? just for fun
  • +
  • nginx reverse proxy: i have three services running on three ports +now. i want a proxy for more easiy routing between these. i choose nginx +because lua, so i can fennel
  • +
+

tags: #rss #feeds #miniflux

+

- calibre

+

had to add the upstream debian bullseye repo to install +calibre-server. (and then remove it.) got the web server up +and running pretty easy.

+

fussed around for a while trying to make a second calibre library out +of my rpg collection. hereā€™s what ended up working: create a new dir and +then +calibredb add path/to/file.pdf --library-path new/library/location. +adding a single file this way created the necessary database file. then +i was able to +find rpgsbak -type f -name '*.pdf' -exec -I {} calibredb add {} --library-path new/library/loction. +(or something like that; wrote the command just now from memory.) and +pull all my pdfs in!

+

so now i have 1.4k pdfs in a new ā€˜rpgsā€™ library alongside my ā€˜booksā€™ +library.

+

on the whole, hobby ttrpg creators can stand to get a LOT better at +exporting metadata with their pdfs. now i have a whole lot of manual +updating to do. but i can read books and pdfs now from my calibre +library on any device on the network.

+

also adding new items via the web ui is pretty easy!

+

TODO: disable converting to epub on ā€˜readā€™ for rpg library. +ā€˜downloadā€™ to read still works great for reading in the meantime.

+

tags: #calibre

+

- photoprism

+

browsed the photo hosting options on awesome-selfhosted +on github and decided on photoprism

+

it has a docker image and i was able to get it working no problem, +with no modifications. quick and easy. this is the future containers +promised us.

+

the ui is slow. i have the number of workers cranked down to 1. might +bump it to 2.

+

i had been rsyncing photos to the pi and then reindexing the +collection. but iā€™m finding it quicker to do a bulk upload using the web +ui. itā€™s working rather reliably. it still has to reindex on upload, but +i no longer have to reindex the entire collection.

+

tags: #photos #photoprism

+

- git

+

Add a ā€œgitā€ user. Create a home dir for it. Do +git init --bare repo.git.

+

Copy my ssh key over and add an entry to +.ssh/config:

+
  21   ā”‚ Host git
+  22   ā”‚ Hostname 192.168.0.83
+  23   ā”‚ User git
+  24   ā”‚ IdentityFile ~/.ssh/id_rsa
+

Now I can git remote add pi git:repo.git in a local repo +and push away!

+

tags: #git

+

- Hello World

+

Okay letā€™s get this party started!

+

I have a raspberry pi model 3b that has been gathering dust in a +drawer for a couple years now.

+

I decided I wanted to dust it off and use it to backup some photos +and some files.

+

I bought a 4TB external hard drive and a 128gb microSD card and +hooked it all up.

+

I downloaded the NOOBS installer from raspberrypi.com/software and +installed it on the SD card, which I was able to do because I have a ton +of dongles thanks to the fact that my MacbookPro has no peripherals. I +popped the card in to the pi, connected my usb keyboard and hdmi monitor +and booted it up, and went through the setup.

+

Then, after testing that I can ssh into the pi, I unplugged my +keyboard and monitor and never plugged them back in again.

+

Plugged in my hard drive and formatted it with an ext3 +filesystem.

+

Created a backup user. (Not a spare user in case of emergencies, but +a user specifically for creating backups.)

+

Copied my ssh keys over:

+
ssh-copy-id -i ~/.ssh/id_rsa pi.local
+

Mounted the drive, added it to /etc/fstab so it will +auto-mount, and added a slight delay to the boot command so that there +is time for the drive to mount before the system boots. As suggested +here:

+

https://howtoforge.com/tutorial/raspberry-pi-as-backup-server-for-linux-and-windows/

+

Copied over my first photo export and my calibre library with an +rsync -zaP.

+

Messed around with mDNS and avahi-daemon because I canā€™t hit http://pi.local in the browser. +Still havenā€™t figured this out.

+

tags: #mdns #getting-started

+ +