Add a Calibre article

This commit is contained in:
rflx 2021-07-03 00:46:11 +03:00
parent 8442355ee1
commit ce5ba1a4a1
4 changed files with 142 additions and 1 deletions

141
calibre.html Normal file
View File

@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang=en>
<head>
<title>Setting up a Calibre library server &ndash; LandChad.net</title>
<meta charset="utf-8"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel='stylesheet' type='text/css' href='style.css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='alternate' type='application/rss+xml' title='Land Chad RSS' href='/rss.xml'>
</head>
<body>
<header><h1>Setting up a Calibre library server</h1></header>
<nav></nav>
<main>
<p>
The Calibre library server is a great way to store your e-books.
It allows you to:
<li>Share your books with others.</li>
<li>Easily transfer your books between devices and access them from anywhere.</li>
</p>
<h2>Installation</h2>
<p>
Install the Calibre package.
</p>
<pre><code>apt update && apt install calibre
mkdir /opt/calibre</code></pre>
<p>
Either upload your existing library using <code>scp</code>. For example to <code>/opt/calibre/</code>
</p>
<p>
On client:
</p>
<pre><code>scp -r ~/Documents/your_library root@example.org:/opt/calibre/</code></pre>
<p>
Or create a library and add a book to it.
</p>
<pre><code>cd /opt/calibre
calibredb add book.epub --with-library your_library</code></pre>
<aside>
<p>
For more information about the <code>calibredb</code> command see <code>man calibredb</code>.
</p>
</aside>
<p>
Add a new user.
</p>
<pre><code>calibre-server --manage-users</code></pre>
<h2>Creating a service</h2>
<p>
Create a new file <code>/etc/systemd/system/calibre-server.service</code> and add the following:
</p>
<pre><code>[Unit]
Description=Calibre library server
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/calibre-server --enable-auth --enable-local-write /opt/calibre/your_library
[Install]
WantedBy=multi-user.target
</code></pre>
<p>
Issue <code>systemctl daemon-reload</code> to apply the changes.
</p>
<p>
Enable and start the service.
</p>
<pre><code>systemctl enable calibre-server
systemctl start calibre-server</code></pre>
<h2>A reverse proxy with Nginx</h2>
<p>
Create a new file <code>/etc/nginx/sites-available/calibre</code> and enter the following:
</p>
<pre><code>server {
listen 80;
server_name calibre.example.org;
location /calibre {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /calibre;
}
}</code></pre>
<p>
Issue a Let's Encrypt certificate. <a href="certbot.html">Detailed instructions and additional information</a>.
</p>
<pre><code>certbot --nginx</code></pre>
<p>
Now just go to calibre.example.org. The server will request a username and password.
</p>
<a href="pix/calibre-1.png">
<img src="pix/calibre/calibre-1.png" alt="calibre">
</a>
<p>
After login you will see something like this.
</p>
<a href="pix/calibre-1.png">
<img src="pix/calibre/calibre-2.png" alt="calibre">
</a>
<hr>
<p>
By rflx -- <a href="https://rflx.xyz">website</a> -- XMR: rflx.xyz
</p>
</main>
<footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><li><a href="index.html"><img src="pix/chad.gif" alt="chad"></a></li><li><a href="rss.xml"><img src="pix/rss.svg" alt="RSS"></a></li><li><a href="pix/btc.png"><img src="pix/btc.svg" alt="BTC"></a></li><li><a href="pix/xmr.png"><img src="pix/xmr.svg" alt="XMR"></a></li><li><a href="https://github.com/lukesmithxyz/landchad"><img src="pix/git.svg" alt="Github"></a></footer>
</body>
</html>

View File

@ -64,6 +64,7 @@
<li><a href="nextcloud.html">Setting up a <img src="pix/nextcloud.svg">Nextcloud Instance (file hosting and more)</a></li>
<li><a href="gitea.html">Setting up <img src="pix/gitea.svg">Gitea</a></li>
<li><a href="irc.html">Creating your own chat server with <img src="pix/irc.svg">IRC</a></li>
<li><a href="calibre.html">Setting up a Calibre library server</a></li>
</ul>
<h3 id=crypto>Accepting Cryptocurrency Tips</h3>
@ -108,7 +109,6 @@
<ul>
<li>Email webclients</li>
<li>Simple static site generators</li>
<li>Calibre (library server)</li>
<li>Nitter</li>
<li>PeerTube (like YouTube)</li>
<li>XMPP ejabberd</li>

BIN
pix/calibre/calibre-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
pix/calibre/calibre-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB