06-24-2017, 09:20 AM | #1 | |||
Member
Posts: 14
Karma: 10
Join Date: May 2016
Device: none
|
--Manage-users and systemd
Hello there, I am really enjoying using Calibre 3.0: keep up the great work!
I am trying to run calibre-server through systemd (Ubuntu 16.04 and Apache2). I have created a couple of users using: Quote:
Quote:
If I try to run it through systemd, however, it continually asks for login details and I cannot get through to the library. This is my file: Quote:
Is there anything I am doing wrong? |
|||
06-24-2017, 11:03 AM | #2 |
Member
Posts: 14
Karma: 10
Join Date: May 2016
Device: none
|
I updated to 3.1 and I still have issues - I hadn't turned disable-auth off
Last edited by dom134; 06-24-2017 at 01:49 PM. Reason: mistakenly thought I had fixed it |
Advert | |
|
06-28-2017, 07:50 PM | #3 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, the systemd service is started as root, but calibre defaults to looking at the user database in "${XDG_CONFIG_HOME:-$HOME/.config}/calibre/server-users.sqlite". So you have edited it in /home/dom134/ (or whatever your username is) and then the systemd instance tried accessing it in /root/
You can pass the --userdb /path/to/server-users.sqlite if you like, but I suggest running calibre-server under your systemd user instance. There is also no need for a pidfile, and if you don't specify a library calibre will fallback on serving all the libraries known to the GUI configuration. Code:
[eschwartz@arch ~]$ cat ~/.config/systemd/user/calibre-server.service [Unit] Description=Main calibre server After=network.target [Service] ExecStart=/usr/bin/calibre-server \ --port=8080 \ --enable-auth \ --access-log=/%h/.local/share/calibre.log [Install] WantedBy=default.target |
06-29-2017, 01:40 PM | #4 |
Member
Posts: 14
Karma: 10
Join Date: May 2016
Device: none
|
Thanks eschwarz, it works a treat!
In the end I passed the path to the user database, and it all works now. This is my file: [Unit] Description=Calibre Service After=network.target [Service] ExecStart=/usr/bin/calibre-server \ --url-prefix /calibre \ --port=8080 \ --enable-auth \ --access-log=/any_path/.local/share/calibre.log \ --userdb=/home/me/.config/calibre/server-users.sqlite \ /Calibre [Install] WantedBy=default.target |
06-29-2017, 08:00 PM | #5 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, keep in mind that the content server is capable of writing to both the library (via calibredb) and the userdb (there is a new option to edit your password directly from the browser). So you might not want to run it as root, if only because you can end up with root-owned files without meaning to.
|
Advert | |
|
06-30-2017, 04:10 PM | #6 | |
Member
Posts: 14
Karma: 10
Join Date: May 2016
Device: none
|
Hello eschwartz,
How do you start a systemd unit without sudo? I have placed the file in ~/.config/systemd/user, but when I start calibre.service all I get is: Quote:
|
|
06-30-2017, 04:37 PM | #7 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Code:
systemctl --user |
Tags |
calibre-server, login/password, systemd |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Manage Tags | Rellwood | Library Management | 1 | 07-27-2016 06:29 PM |
Glo Manage collections | junedog | Kobo Reader | 1 | 11-14-2013 07:51 AM |
Manage Title? | Sabardeyn | Library Management | 2 | 01-05-2013 01:16 AM |
Mac users steered toward costlier hotels than Windows users? | hrosvit | General Discussions | 35 | 06-29-2012 01:59 AM |
Android users sad hicks, iPhone users rich girls | afa | General Discussions | 38 | 08-22-2011 09:04 PM |