Tutorial - Setting up Shiori

Let's setup Shiori, a simple bookmarks manager and clone of Pocket!

Tutorial - Setting up Shiori

Scenario - It's late, you are working on setting up a new service on your server. You keep hitting this little issue. You seem to remember reading something about this before in your research. You go to the blog you had bookmarked and darn, the server is down. You google but can't find what you are looking for. You hit the internet archive and no one has submitted the page. You feel like poop, if only you had a backup of the page you read 3 weeks back. Enter Shiori.

What is Shiori?

Shiori is a simple bookmarks manager written in the Go language. Intended as a simple clone of Pocket.  It has a great interface with light/dark modes, command line utilities, optional public sharing and can be run as a single app stack in docker. You can also install from source as it's just a statically linked GO binary.

Shiori's Main Interface.

Features:

Some of the features it includes are:

  • Basic bookmarks management i.e. add, edit, delete and search.
  • Import and export bookmarks from and to Netscape Bookmark file
  • Simple and clean command line interface.
  • Portable, thanks to its single binary format.
  • Support for sqlite3, PostgreSQL and MySQL as its database.
  • Where possible, by default shiori will parse the readable content and create an offline archive of the webpage.
  • [BETA] web extension support for Firefox and Chrome.
Shioris Archive feature saves simplified reading views as well as full screenshots of the webpage.

Where it fits

There are many different bookmark managing services out there, such as Linkace, Linkding, Linkwarden to name a few. However for today, we will be focusing on Shiori. For me, it seems to have all the features I wanted, without an overly bulky setup with MySQL, Nginx, or PHP-FastCGI applications running. I recently setup Shiori recently and figured I'd outline the steps to setup this amazing application.

Show me the Dockerfile

version: "3"
services:
  shiori:
    image: ghcr.io/go-shiori/shiori
    container_name: shiori
    environment:
      - PUID=1000
      - PGID=1000
      - SHIORI_DIR=/data
    ports:
      - 8080:8080
    restart: unless-stopped
    volumes:
      - /data/shiori:/data

Known Issues

The latest release of Shiori (shiori 1.5.3) has a breaking change that was mentioned in the release notes, but isn't really in the documentation on setting it up. This is why I'm writing this article as I'm sure others will run into the issue.

Once the container is started, you will get an error when logging into Shiori with the default creds: shiori:gopher . The error states: SQL logic error: no such table: account (1) (500). This is because the database doesn't exist yet. The way around this is to run the migration command after the container is started by running the following command: `

docker exec -it shiori shiori migrate
Command to migrate the db / create the db and fix the above error. 


Conclusion

The ability to have the bookmarks automatically create a reading and archive screenshot that is hosted on my server is awesome and can't be understated. The fact that it's so light on the server is also something I am in love with. See below for my docker stats. 18MB memory load is amazingly light and would run great on any machine including a Raspberry Pi.