Skip to content

Latest commit

 

History

History
195 lines (122 loc) · 8.88 KB

GETTING-STARTED.md

File metadata and controls

195 lines (122 loc) · 8.88 KB

Trailbot Getting Started guide

--

Introduction

The installation process of Trailbot comprises, in this order:

The installation of Trailbot Client MUST be done before starting to install any Trailbot watcher.

Then, when you run Trailbot Client for the first time, it will guide you through the process of installing and setting up Trailbot watcher on your server/s.

Installing your own Trailbot Vault in a separate server is optional—you can use the "official" vault instance run by Stampery, which is available at vault.trailbot.io:8443.

Installing Trailbot Client

Compatibility

You can install Trailbot Client on GNU/Linux, OS X, Windows and virtually any other desktop OS with support for nodejs > 5.0 and Electron.

Before installing

  • Make sure that version 5.0.0 or greater of nodejs is installed in your computer. Recommended version is 6.0.0 or greater. You can find detailed nodejs installation instructions for your OS here.

Installation

Installing Trailbot Client is incredibly easy. You only have to execute this single command: ✌️

npm install -g trailbot-client

👮 Hey! You will probably need to run the previous command as root on GNU/Linux and OS X.

Boom! It's been easy, huh?.

Running

You can run Trailbot Client by executing the following command:

trailbot-client

Setting up

The first time you run Trailbot Client, it presents a setup wizard that guides you through the process of setting up both the client and your first Trailbot watcher.

Welcome screen

Trailbot uses end-to-end encryption to guarantee maximum privacy of all your data, so the first step will be setting a passphrase for your secure keypar.

PGP keypar generation

The Client public key that you have just generated needs to be copied into your servers. In order to do so, the recommended option is to export to filesystem.

Public key export

At this point, if this is the first time that you use Trailbot, please choose "Not yet, please show me how".

Watcher configuration

Now follow the steps described in the watcher or simply go through the Installing Trailbot Watcher section in this same Getting Started guide.

Watcher setup

Installing Trailbot Watcher

Before installing Trailbot Watcher in your server, you need to install Trailbot Client in your own computer.

Compatibility

The watcher has been designed and optimized for usage in GNU/Linux. It should work flawlessly in Ubuntu, Debian, CentOS, Fedora, Gentoo, openSUSE, Red Hat and many other popular distributions as long as they have:

  • A proper package manager (apt, yum, pacman).
  • Support for nodejs > 6.0.0
  • systemd, upstart or systemv

Before installing

  • Remember to install Trailbot Client in your own computer and go through its setup wizard to generate its keypar and export it.
  • Make sure that version 5.0.0 or greater of nodejs is installed in your computer. Recommended version is 6.0.0 or greater. Easiest way to install nodejs is:
Debian and Ubuntu based Linux distributions
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
RHEL, CentOS and Fedora
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
sudo yum -y install nodejs

Arch

pacman -S nodejs npm

Installation

Installing Trailbot Watcher is quite easy:

sudo su
git clone https://github.com/trailbot/watcher
cd watcher
npm install

Now take the Client public key that you exported from the Client in your computer and copy it into your server using scp, rsync, ftp or similar. (Another option is opening a text editor in your server and directly pasting it).

Now simply run:

npm run setup

The setup wizard is pretty self-explainative and helps you to import your Client public key, export your Watcher public key, create a system daemon and start it immediately:

Choose a name or press Enter for accepting the suggested name.

Watcher name

Write the route of the file where you put the Client public key.

Client key import

Here you can press Enter to use the "official" vault (vault.trailbot.io:8443).

Vault endpoint

Wait a couple of minutes while your Watcher keys are generated.

Keys generation

The watcher will generate a biometric sentence consisting of 8 words that will be required by Trailbot Client.

Watcher exchange

After Trailbot Client validates the sentence, Trailbot Watcher should be up and running. 🎉

Ready

Last step is taking the ./trailbot_watcher.pub.asc file containing the Watcher public key and copying it back to your personal computer. Go back to the Client's setup wizard, import the Watcher public key and now you are ready to play. 💪

Congratulations

Usage

Main view

Main view

Watching files and logs

Start watching a file by clicking on the (:heavy_plus_sign:) button in the left pane and then simply enter the absolute path of the file you want to watch.

Start watching

We recommend to watch 👀 typical logfiles like /var/log/syslog, /var/log/auth.log or /var/log/nginx/nginx_error.log.

👻 You can even monitor files that do not exist yet, and get events when they are created.

Reading events

Every time a watched file is modified, a new event appears in the file's event list.

Event

The numbers under the date tell you how many lines where added and/or deleted at the time.

Something like "+3 -3" typically means that 3 lines were edited or replaced.

When you click on one of the events on the list, you can see the diff between previous and current version of the watched file.

Diff

The "EOF" at the bottom represents the end of the file.

Adding Smart Policies

Add smart policy

  1. Select the file you want to add a Smart Policy to.
  2. Click on the (:heavy_plus_sign:) in the second left pane, right next to the "Smart Policies" header.
  3. Copy the Git HTTPS URL for the Smart Policy you want to add, and paste it where asked.
  4. Fill in all the policy's parameterization fields and simply click on "Add policy [...]". Voilà!

Installing Trailbot Vault

Installing your own Trailbot Vault in a separate server is OPTIONAL—you can use the "official" vault instance run by Stampery, which is available at vault.trailbot.io:8443. The installation process is covered in its own README.