oxen-io / loki-launcher

Manages the Loki Storage Server, Loki Daemon and Lokinet simultaneously
MIT License
16 stars 10 forks source link
        .o0l.
       ;kNMNo.
     ;kNMMXd'
   ;kNMMXd'                 .ld:             ,ldxkkkdl,.     'dd;     ,odl.  ;dd
 ;kNMMXo.  'ol.             ,KMx.          :ONXkollokXN0c.   cNMo   .dNNx'   dMW
dNMMM0,   ;KMMXo.           ,KMx.        .oNNx'      .dNWx.  :NMo .cKWk;     dMW
'dXMMNk;  .;ONMMXo'         ,KMx.        :NMx.         oWWl  cNWd;ON0:.      oMW
  'dXMMNk;.  ;kNMMXd'       ,KMx.        lWWl          :NMd  cNMNNMWd.       dMW
    'dXMMNk;.  ;kNMMXd'     ,KMx.        :NMx.         oWWl  cNMKolKWO,      dMW
      .oXMMK;   ,0MMMNd.    ,KMx.        .dNNx'      .dNWx.  cNMo  .dNNd.    dMW
        .lo'  'dXMMNk;.     ,KMXxdddddl.   :ONNkollokXN0c.   cNMo    ;OWKl.  dMW
            'dXMMNk;        .lddddddddo.     ,ldxkkkdl,.     'od,     .cdo;  ;dd
          'dXMMNk;
         .oNMNk;             L A U N C H E R
          .l0l.

Requirements

Why use the launcher over DEBs

The goal of the launcher is to make it easier to run a service node, however the DEBs installation and upgrade process can be much easier if you're running a debian-based OS. However we do have some additional advantages:

Launcher is maintained at cost of the Loki Foundation and if it's not found to be of use, maybe unfunded. Please consider supporting this great tool by using it.

How to do a fresh service node install

This will use npm to install the launcher

sudo npm install -g loki-launcher

This will create any needed directories and make sure everything has the proper permissions to run as a specified user such as snode in this example

sudo loki-launcher set-perms snode

Now make sure sure you running the following commands as the user specified or you may run into permission problems (EPERM).

After it's installed, you can ask to prequalify your server to be a service node

loki-launcher prequal

you can also ask it to download the Loki binaries if you don't already have them

loki-launcher download-binaries

How to use without systemd

loki-launcher start

Running it once should start the suite of services into the background or give you a message why it can't. This isn't recommended for long term uses as there is nothing to restart launcher if it dies/exits.

Running loki-launcher client, will give you an interactive terminal to lokid (the copy running from the current directory if you have multiple). exit will stop your service node. If you just want to exit the interactive terminal, please use ctrl-c.

You can pass most command line parameters that you would give to lokid to loki-launcher start

You can make a launcher config file in /etc/loki-launcher/launcher.ini and change various settings, Check our wiki for details on options.

How to keep the launcher up to date

Update your launcher without systemd

Stop your service node if it's running (you can use loki-launcher status to check)

loki-launcher stop

Update the launcher

sudo npm install -g loki-launcher

And be sure to make sure you restart your service node (if it's staked) by

loki-launcher start

Get the latest Loki software versions

loki-launcher download-binaries

And be sure to make sure you restart your service node (if it's staked) by

loki-launcher start

Other

upgrading from lokid 3.0.6 with systemd to use the launcher

Popular linux distribution instructions to install NodeJS

CentOS NodeJS installation:

curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -

Ubuntu/Debian NodeJS installation:

curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -

then

sudo apt-get install -y nodejs

Software the launcher manages

To get the required software you can run loki-launcher download-binaries and they will be placed in /opt/loki-launcher/bin

or

You can download the loki binaries (faster) from each above page's release section

or

You can build from source. Make sure you select the correct repos/branches/versions as not all versions will work with each other.

And if you don't have the dependencies to build from source check out contrib/dependency_helper/

Release Notes

Changelog items are now available here

For more indepth details, be sure to check out our weekly dev reports