Running a comic/ebook reader service on Raspberry Pi (Ubooquity)

Ubooquity is a free home server for comics and ebooks.

It is built with Java, but lightweight enough for being run on Raspberry Pi.

Here are a few steps for setting it up on your Raspberry Pi.


0. Install required packages

As mentioned above, Ubooquity is built with Java, so you need Java 7+ on your machine.

$ sudo apt-get oracle-java8-jdk

1. Download Ubooquity

Download .zip file from this page, and unzip it.

$ wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php
$ unzip ubooquity.zip -d ubooquity
$ cd ubooquity

2. Start Ubooquity

Run the unzipped .jar file with java:

$ java -jar Ubooquity.jar -webadmin -headless -port 8080

and open your web browser with url: http://localhost:8080/admin.

3. Administration

When you open the url above, you will be greeted with a page which demands a new administrator password:

require a new administrator password

Type yours and continue to the administration page.

A. Create Users

First, click Edit on Security section.

Check Protect shared content with user accounts and click Apply there.

protect shared content with user accounts

Go back to the Security section and click Create new user for creating a new user.

Now you will see the newly added user in the Security section.

newly added users

B. Setup Comics and Books Directories

Click Edit on Comics and/or Books section.

Type your comics’ and ebooks’ directories into Shared directory,

and also the users into Authorized users.

Click Apply for applying them.

after setup

C. Other Settings

You can set other useful values in General and Advanced section.

4. Login as a User

Now open your web browser with url: http://localhost:8080.

You can login with the id and password of a new user.

login as a user

After logging in, you can read your comics and ebooks.

5. Running Ubooquity as a Service

Until now, Ubooquity was running from the command line.

It can be a nice choice for testing, but not good at all for everyday use.

So let’s register Ubooquity as a systemd service.

First, create a service file:

$ sudo vi /lib/systemd/system/ubooquity.service

and fill it with following content:

[Unit]
Description=Ubooquity
After=network.target

[Service]
User=your-username
WorkingDirectory=/path/to/ubooquity
ExecStart=/usr/bin/java -jar Ubooquity.jar -headless -port 8080

[Install]
WantedBy=multi-user.target

Edit User and WorkingDirectory to yours, and if needed, also change the port number.

If you want to start Ubooquity on every boot, do the following:

$ sudo systemctl enable ubooquity.service

If you just want to start or stop it now, do the following:

$ sudo systemctl start ubooquity.service
$ sudo systemctl stop ubooquity.service

All done.


Ubooquity is really a nice solution for serving comics and ebooks.

If you’re running your Raspberry Pi as a NAS or alike, I think there would be no better choice for it.