this post was submitted on 26 Oct 2023
12 points (87.5% liked)

Selfhosted

40183 readers
537 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[–] dudeami0@lemmy.dudeami.win 3 points 1 year ago* (last edited 1 year ago) (1 children)

I've never ran this program, but skimmed the documentation. You should be able to use the SHIORI_DIR (or a custom database table following those instructions) along with the -p argument for launching the web interface. A simple bash script that should work:

export SHIORI_DIR=/path/to/shiori-data-dir
shiori serve -p 8081

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@lemmy.dbzer0.com 1 points 1 year ago

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.