Running multiple shiori instances

I recently found out about shiori. It’s absolutely great and does exactly what I need, exactly how I need it.

The only problem is, that it was conceived a single user CLI app it does not have any proper user separation and I kind of need it.

I wanted to create at least 3 archives: one for myself, one for my girlfriend and a public one to share with my students. I definitely don’t want these three mixing.

Does anyone have any experience hosting shiori for multiple users? Do you believe there is a way to do that on bare metal, without resorting to VMs or Docker?

dudeami0,
@dudeami0@lemmy.dudeami.win avatar

I’ve never ran this program, but skimmed the documentation. You should be able to use the https://github.com/go-shiori/shiori/blob/master/docs/Configuration.md#data-directory (or a custom database table following those instructions) along with the https://github.com/go-shiori/shiori/blob/master/docs/Usage.md#using-web-interface for launching the web interface. A simple bash script that should work:


<span style="font-weight:bold;color:#a71d5d;">export </span><span style="color:#323232;">SHIORI_DIR</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">/path/to/shiori-data-dir
</span><span style="color:#323232;">shiori serve -p 8081
</span>

To run multiple versions, I’d suggest setting up each instance as a service on your machine in case of reboots and/or crashes.

Now for serving them, you have two options. The first is just let the users connect to the port directly, but this is generally not done for outward facing services (not that you can’t). The second is to setup a reverse proxy and route the traffic through subdomains or subpaths. Nginx is my go-to solution for this. I’ve also heard good things about Caddy. You’ll most likely have to use subdomains for this, as lots of apps assume they are the root path without some tinkering.

Edit: Corrected incorrect cli arguments and a typo.

crunchpaste,
@crunchpaste@lemmy.dbzer0.com avatar

Is it ok to just run a few instances with just different port numbers and environment variables? Maybe I’m overthinking it, but I thought some isolation was needed, even planned on running the instances as different users. Also, thank you for the detailed explanation.

SheeEttin,

github.com/go-shiori/shiori#documentation

I assume you’re running it as a web app, in which case the docs cover that. Just run multiple instances on different ports and with different storage.

Looks like they provide an official docker container, too, so running it in docker should be very easy.

crunchpaste,
@crunchpaste@lemmy.dbzer0.com avatar

Just with different environment variables?

SheeEttin,

The only one the docs mention is SHIORI_DIR, which defaults to ${XDG_DATA_HOME}/shiori, so if you’re running it under different users then it’s already going to be different.

crunchpaste,
@crunchpaste@lemmy.dbzer0.com avatar

Just gave it a try, and it seems to work just fine like that. Thank you.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines