User:Bipface

From EHWiki
Revision as of 12:32, 2 March 2020 by Bipface (talk | contribs)
Jump to navigationJump to search

(draft)

Prerequisites

  • Basic familiarity with Linux.
  • A Linux server running Debian version 9 (Stretch) or newer, or Ubuntu version 16 (Xenial Xerus) or newer.
    To use earlier versions you will need to determine how to install a Java 8 runtime, which may not be a straightforward process and is beyond the scope of this guide.
  • Root access to your server (i.e. su/sudo).
  • PuTTY or any other SSH program to connect to your server. This allows for copying/pasting of commands.
  • An open port through which H@H can accept connections from the internet.
    You may need to choose a port number greater than 1023 to avoid having to run the H@H client as root.
  • This guide assumes a server-style environment, typical of VPS/cloud-hosted systems. Installation on desktop or IoT systems, for example, may require doing some things differently.

Optional tools

To perform the installation, you may also require the following:

  • A command-line HTTP client such as wget or curl, to download the H@H software.
  • A zip-file extractor such as unzip.
  • A text editor such as nano or vi.

Use apt to install these packages as needed.

Take note

  • Linux is case-sensitive with file names. Therefore, it is best to use lowercase names everywhere to make it easier for yourself.
  • Commands starting with $ are to be run as current user, those starting with # as root.
  • H@H 1.6.0 and above uses SSL certificates. For them to work properly, you need the ntp package (it syncs the server's date and time). It is normally installed by default, but package updates may make it fail.

Overview

At a glance, the steps to install H@H are as follows, with further details in the subsequent sections:

  • Install a Java version 8 (or newer) runtime environment.
  • Obtain and configure the H@H client software.
  • Define a service (systemd 'unit' file) to run it.

Installing Java

Don't use Debian 8's repository for H@H 1.6.0 and above. The JRE provided in the packages for Debian 8 is Java 7, and H@H 1.6.0 needs Java 8 or above. If you are running Debian 8, install Java by using a downloaded archive, like described in the next section.


To run the H@H server you will have to have Java installed on the server. The best and easiest method is to use the Debian packages.

To do so, connect to your server, and run the following commands either as root, or by prefixing them by sudo (if you have the sudo package installed):

# apt-get update
# apt-get install default-jre

And that's it, you're already done. Simple isn't it?

Installing H@H

For more security let's create new user for H@H:

# adduser hath

Now login as the new user and create a directory for H@H client:

# login hath
$ mkdir hath

Download H@H (check for the latest version here):

$ wget https://repo.e-hentai.org/hath/HentaiAtHome_1.4.2.zip

Unzip the downloaded archive (install unzip if you haven't yet):

$ unzip HentaiAtHome_1.4.2.zip -d hath/

Well done, let's launch it!

$ cd hath
$ java -jar HentaiAtHome.jar

You will be prompted for your client ID and Password which you can find on your H@H page

You will need to configure your client settings on the above page before you get your client password. If you have not applied to run a H@H client yet, you will have to do so first.

To stop the server, press "Ctrl+C" and wait for a couple seconds.

Testing and monitoring

https://<ip>:<port>/robots.txt systemctl status hath

See also