github.com/soulteary/pocket-bookcase@v0.0.0-20240428065142-0b5a9a0fc98a/docs/Frequently-Asked-Question.md (about)

     1  # Frequently asked questions
     2  
     3  <!-- TOC -->
     4  
     5  - [General](#general)
     6    - [What is this project ?](#what-is-this-project-)
     7    - [How does it compare to other bookmarks manager ?](#how-does-it-compare-to-other-bookmarks-manager-)
     8    - [What are the system requirements ?](#what-are-the-system-requirements-)
     9    - [What is the status for this app ?](#what-is-the-status-for-this-app-)
    10    - [Is this app actively maintained ?](#is-this-app-actively-maintained-)
    11    - [How to make a contribution ?](#how-to-make-a-contribution-)
    12    - [How to make a donation ?](#how-to-make-a-donation-)
    13  - [Common Issues](#common-issues)
    14    - [What is the default account to login at the first time ?](#what-is-the-default-account-to-login-at-the-first-time-)
    15    - [Why my old accounts can't do anything after upgrading Shiori to v1.5.0 ?](#why-my-old-accounts-cant-do-anything-after-upgrading-shiori-to-v150-)
    16    - [`Failed to get bookmarks: failed to fetch data: no such module: fts4` ?](#failed-to-get-bookmarks-failed-to-fetch-data-no-such-module-fts4-)
    17  - [Advanced](#advanced)
    18    - [How to run `shiori` on start up ?](#how-to-run-shiori-on-start-up-)
    19  
    20  <!-- /TOC -->
    21  
    22  ## General
    23  
    24  ### What is this project ?
    25  
    26  Shiori is a bookmarks manager that built with Go. I've got the idea to make this after reading a comment on HN back in [April 2017](https://news.ycombinator.com/item?id=14203383) :
    27  
    28  ```
    29  ... for me the dream bookmark manager would be something really simple
    30  with two commands like:
    31  
    32  $ bookmark add http://...
    33  
    34  That will:
    35  
    36  a. Download a static copy of the webpage in a single HTML file, with a
    37     PDF exported copy, that also take care of removing ads and
    38     unrelated content from the stored content.
    39  b. Run something like http://smmry.com/ to create a summary of the page
    40     in few sentences and store it.
    41  c. Use NLP techniques to extract the principle keywords and use them
    42     as tags
    43  
    44  And another command like:
    45  
    46  $ bookmark search "..."
    47  
    48  That will:
    49  
    50  d. Not use regexp or complicated search pattern, but instead;
    51  e. Search titles, tags, page content smartly and interactively, and;
    52  f. Sort/filter results smartly by relevance, number of matches,
    53     frequency, or anything else useful
    54  g. Storing everything in a git repository or simple file structure
    55     for easy synchronization, bonus point for browsers integrations.
    56  ```
    57  
    58  I do like using bookmarks and those idea sounds useful to me. More importantly, it seems possible enough to do. Not too hard that it's impossible for me, but not too easy that it doesn't teach me anything. Looking back now, the only thing that I (kind of) managed to do is a, b, d and e. But it's enough for me, so it's fine I guess :laughing:.
    59  
    60  ### How does it compare to other bookmarks manager ?
    61  
    62  To be honest I don't know. The only bookmarks manager that I've used is Pocket and the one that bundled in web browser. I do like Pocket though. However, since bookmarks is kind of sensitive data, I prefer it stays offline or in my own server.
    63  
    64  ### What are the system requirements ?
    65  
    66  It runs in the lowest tier of Digital Ocean VPS, so I guess it should be able to run anywhere.
    67  
    68  ### What is the status for this app ?
    69  
    70  It's stable enough to use and the database shouldn't be changed anymore. However, my bookmarks at most is only several hundred entries, therefore I haven't test whether it able to process or imports huge amount of bookmarks. If you would, please do try it.
    71  
    72  ### Is this app actively maintained ?
    73  
    74  Yes, however the development pace might be really slow. @fmartingr is the current active maintainer though @RadhiFadlillah or @deanishe may step and work on stuff from time to time or in other [go-shiori projects](https://github.com/go-shiori)
    75  
    76  ### How to make a contribution ?
    77  
    78  Just like other open source projects, you can make a contribution by submitting issues or pull requests.
    79  
    80  ### How to make a donation ?
    81  
    82  If you like this project, you can donate to maintainers via:
    83  
    84  - **fmartingr** [PayPal](https://www.paypal.me/fmartingr), [Ko-Fi](https://ko-fi.com/fmartingr)
    85  - **RadhiFadlillah** [PayPal](https://www.paypal.me/RadhiFadlillah), [Ko-Fi](https://ko-fi.com/radhifadlillah)
    86  
    87  ## Common Issues
    88  
    89  ### What is the default account to login at the first time ?
    90  
    91  A default account is created with the credentials:
    92  
    93  - Username: `shiori`
    94  - Password: `gopher`
    95  
    96  ### Why my old accounts can't do anything after upgrading Shiori to v1.5.0 ?
    97  
    98  This issue happened because in Shiori v1.0.0 there are no account level, which means everyone is treated as owner. However, in Shiori v1.5.0 there are two account levels i.e. owner and visitor. The level difference is stored in [database](https://github.com/soulteary/pocket-bookcase/blob/master/internal/database/sqlite.go#L42-L48) as boolean value in column `owner` with default value false (which means by default all account is visitor, unless specified otherwise).
    99  
   100  Because in v1.5.0 by default all account is visitor, when updating from v1.0 to v1.5 all of the old accounts by default will be marked as visitor. Fortunately, when there are no owner registered in database, we can login as owner using default account.
   101  
   102  So, as workaround for this issue, you should :
   103  
   104  - Login as default account.
   105  - Go to options page.
   106  - Remove your old accounts.
   107  - Recreate them, but now as owner.
   108  
   109  For more details see [#148](https://github.com/soulteary/pocket-bookcase/issues/148).
   110  
   111  ### `Failed to get bookmarks: failed to fetch data: no such module: fts4` ?
   112  
   113  This happens to SQLite users that upgrade from 1.5.0 to 1.5.1 because of a breaking change. Please check the
   114  [announcement](https://github.com/soulteary/pocket-bookcase/discussions/383) to understand how to migrate your database and move forward.
   115  
   116  ## Advanced
   117  
   118  ### How to run `shiori` on start up ?
   119  
   120  There are several methods to run `shiori` on start up, however the most recommended is running it as a service.
   121  
   122  1. Create a service unit for `systemd` at `/etc/systemd/system/shiori.service`.
   123  
   124  * Shiori is run via `docker` :
   125  
   126      ```ini
   127      [Unit]
   128      Description=Shiori container
   129      After=docker.service
   130  
   131      [Service]
   132      Restart=always
   133      ExecStartPre=-/usr/bin/docker rm shiori-1
   134      ExecStart=/usr/bin/docker run \
   135        --rm \
   136        --name shiori-1 \
   137        -p 8080:8080 \
   138        -v /srv/machines/shiori:/shiori \
   139         ghcr.io/soulteary/pocket-bookcase
   140      ExecStop=/usr/bin/docker stop -t 2 shiori-1
   141  
   142      [Install]
   143      WantedBy=multi-user.target
   144      ```
   145  
   146  * Shiori without `docker`. Set absolute path to `shiori` binary. `--portable` sets the data directory to be alongside the executable.
   147  
   148      ```ini
   149      [Unit]
   150      Description=Shiori service
   151  
   152      [Service]
   153      ExecStart=/home/user/go/bin/shiori server --portable
   154      Restart=always
   155  
   156      [Install]
   157      WantedBy=multi-user.target
   158      ```
   159  
   160  * Shiori without `docker` and without `--portable` but secure.
   161  
   162     ```ini
   163     [Unit]
   164     Description=shiori service
   165     Requires=network-online.target
   166     After=network-online.target
   167  
   168     [Service]
   169     Type=simple
   170     ExecStart=/usr/bin/shiori server
   171     Restart=always
   172     User=shiori
   173     Group=shiori
   174  
   175     Environment="SHIORI_DIR=/var/lib/shiori"
   176     DynamicUser=true
   177     PrivateUsers=true
   178     ProtectHome=true
   179     ProtectKernelLogs=true
   180     RestrictAddressFamilies=AF_INET AF_INET6
   181     StateDirectory=shiori
   182     SystemCallErrorNumber=EPERM
   183     SystemCallFilter=@system-service
   184     SystemCallFilter=~@chown
   185     SystemCallFilter=~@keyring
   186     SystemCallFilter=~@memlock
   187     SystemCallFilter=~@setuid
   188     DeviceAllow=
   189  
   190     CapabilityBoundingSet=
   191     LockPersonality=true
   192     MemoryDenyWriteExecute=true
   193     NoNewPrivileges=true
   194     PrivateDevices=true
   195     PrivateTmp=true
   196     ProtectControlGroups=true
   197     ProtectKernelTunables=true
   198     ProtectSystem=full
   199     ProtectClock=true
   200     ProtectKernelModules=true
   201     ProtectProc=noaccess
   202     ProtectHostname=true
   203     ProcSubset=pid
   204     RestrictNamespaces=true
   205     RestrictRealtime=true
   206     RestrictSUIDSGID=true
   207     SystemCallArchitectures=native
   208     SystemCallFilter=~@clock
   209     SystemCallFilter=~@debug
   210     SystemCallFilter=~@module
   211     SystemCallFilter=~@mount
   212     SystemCallFilter=~@raw-io
   213     SystemCallFilter=~@reboot
   214     SystemCallFilter=~@privileged
   215     SystemCallFilter=~@resources
   216     SystemCallFilter=~@cpu-emulation
   217     SystemCallFilter=~@obsolete
   218     UMask=0077
   219  
   220     [Install]
   221     WantedBy=multi-user.target
   222     ```
   223  
   224  2. Set up data directory if Shiori with `docker`
   225  
   226      This assumes, that the Shiori container has a runtime directory to store their
   227      database, which is at `/srv/machines/shiori`. If you want to modify that,
   228      make sure, to fix your `shiori.service` as well.
   229  
   230      ```sh
   231      install -d /srv/machines/shiori
   232      ```
   233  
   234  3. Enable and start the service
   235  
   236      ```sh
   237      systemctl enable --now shiori
   238      ```