How to Install Tanoshi on Debian Latest
Tanoshi is a lightweight, easy-to-use web-based manga server that allows you to read, manage and download your favorite manga titles directly from your web browser. Tanoshi supports a wide range of manga formats, including CBZ, CBR, PDF, EPUB and more.
In this tutorial, we will show you how to install Tanoshi on Debian Latest. The installation process involves the following steps:
- Install required dependencies.
- Clone and configure the Tanoshi repository.
- Create a systemd service file to manage the Tanoshi server.
- Start and enable the Tanoshi server.
Prerequisites
Before you start, ensure that you have the following prerequisites:
- A Debian Latest system with non-root sudo user access
- Git
- Ruby
- Bundler
Step 1: Install Required Dependencies
To get started, run the following command to install the required dependencies:
sudo apt update
sudo apt install -y build-essential libsqlite3-dev libxml2-dev libxslt-dev libssl-dev libffi-dev libreadline-dev zlib1g-dev
Step 2: Clone and Configure Tanoshi
First, clone the Tanoshi repository from Github using the Git command below:
git clone https://github.com/faldez/tanoshi.git
Next, navigate to the cloned directory and install the required gems using Bundler:
cd tanoshi
bundle install
After all the required gems have been installed, copy the default .env.example file to .env:
cp .env.example .env
You can now configure Tanoshi by editing the .env file according to your setup requirements. For example, you can change the default port 3001 to any other port that you prefer.
nano .env
Step 3: Create a Systemd Service File to Manage Tanoshi
To manage the Tanoshi server using Systemd, create and edit the Tanoshi service file:
sudo nano /etc/systemd/system/tanoshi.service
Paste the following content in the file:
[Unit]
Description=Tanoshi Manga Reader
After=syslog.target network.target
[Service]
User=<YOUR_SUDO_USER>
Group=<YOUR_SUDO_USER>
PIDFile=/run/tanoshi.pid
EnvironmentFile=/path/to/tanoshi/.env
ExecStart=/usr/bin/env bash -lc 'bundle exec puma -C config/puma.rb'
ExecStop=/usr/bin/env bash -lc 'kill $(cat /run/tanoshi.pid)'
TimeoutSec=15
Restart=always
[Install]
WantedBy=multi-user.target
Update the "User" and "Group" values to match your non-root sudo user.
Next, reload and start the Tanoshi Systemd service:
sudo systemctl daemon-reload
sudo systemctl start tanoshi.service
You can check the status of the Tanoshi service to confirm that it is running using the following command:
sudo systemctl status tanoshi.service
Step 4: Start and Enable the Tanoshi Server
Finally, you can start and enable the Tanoshi server to run automatically on system startup:
sudo systemctl enable tanoshi.service
sudo systemctl start tanoshi.service
To access the Tanoshi server, open your web browser and visit the URL http://localhost:3001 (assuming that you have left the default port as 3001). Here, you can browse and read your favorite manga titles.
Congratulations! You have successfully installed Tanoshi on Debian Latest.