enigma-bbs/docs/index.md

125 lines
4.6 KiB
Markdown
Raw Normal View History

2015-11-04 23:26:22 +00:00
# Introduction
ENiGMA½ is a modern from scratch BBS package written in Node.js.
# Quickstart
2017-09-08 00:15:10 +00:00
Unless you have a compelling reason to do otherwise, please use **The Easy Way** below.
2015-11-04 23:26:22 +00:00
2016-08-31 03:54:14 +00:00
## The Easy Way
Under most Linux/UNIX like environments (Linux, BSD, OS X, ...) new users can simply execute the `install.sh` script to get everything up and running. Simply cut + paste the following into your terminal:
```
curl -o- https://raw.githubusercontent.com/NuSkooler/enigma-bbs/master/misc/install.sh | bash
```
For other environments such as Windows, see **The Manual Way** below.
2017-08-30 01:37:24 +00:00
## The Manual Way (aka Advanced)
2016-08-31 03:54:14 +00:00
For Windows environments or if you simply like to do things manually, read on...
### Prerequisites
* [Node.js](https://nodejs.org/) version **v6.x or higher**
* :information_source: It is **highly** suggested to use [nvm](https://github.com/creationix/nvm) to manage your Node/io.js installs
2016-08-31 03:54:14 +00:00
* [Python](https://www.python.org/downloads/) 2.7.x
* A compiler such as Clang or GCC for Linux/UNIX systems or a recent copy of Visual Studio ([Visual Studio Express](https://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx) editions OK) for Windows users. Note that you **should only need the Visual C++ component**.
2016-01-18 16:50:16 +00:00
2016-08-31 03:54:14 +00:00
### New to Node
2017-10-29 12:49:08 +00:00
If you're new to Node.js and/or do not care about Node itself and just want to get ENiGMA½ running these steps should get you going on most \*nix type environments (Please consider the `install.sh` approach unless you really want to manually install!):
2016-01-18 16:50:16 +00:00
```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
nvm install 6
nvm use 6
2016-01-18 16:50:16 +00:00
```
If the above completed without errors, you should now have `nvm`, `node`, and `npm` installed and in your environment.
For Windows nvm-like systems exist ([nvm-windows](https://github.com/coreybutler/nvm-windows), ...) or [just download the installer](https://nodejs.org/en/download/).
2016-08-31 03:54:14 +00:00
### Clone
2015-11-04 23:26:22 +00:00
```bash
git clone https://github.com/NuSkooler/enigma-bbs.git
```
2016-08-31 03:54:14 +00:00
### Install Node Modules
2015-11-04 23:26:22 +00:00
```bash
2016-01-18 16:50:16 +00:00
cd enigma-bbs
2015-11-04 23:26:22 +00:00
npm install
```
## Generate a SSH Private Key
2016-03-29 04:58:06 +00:00
To utilize the SSH server, a SSH Private Key will need generated. This step can be skipped if you do not wish to enable SSH access.
2015-11-04 23:26:22 +00:00
```bash
openssl genrsa -des3 -out ./misc/ssh_private_key.pem 2048
```
2016-08-31 03:54:14 +00:00
### Create a Minimal Config
2015-11-22 00:08:32 +00:00
The main system configuration is handled via `~/.config/enigma-bbs/config.hjson`. This is a [HJSON](http://hjson.org/) file (compiliant JSON is also OK). See [Configuration](config.md) for more information.
2015-11-04 23:26:22 +00:00
2016-08-31 03:54:14 +00:00
#### Via oputil.js
2016-07-02 20:16:01 +00:00
`oputil.js` can be utilized to generate your **initial** configuration. **This is the recommended way for all new users**:
```bash
2017-08-30 01:37:24 +00:00
./oputil.js config new
```
2016-07-02 20:16:01 +00:00
2017-10-29 12:49:08 +00:00
(You will be asked a series of basic questions)
2016-07-02 20:16:01 +00:00
2016-08-31 03:54:14 +00:00
#### Example Starting Configuration
2016-07-13 03:49:54 +00:00
Below is an _example_ configuration. It is recommended that you at least **start with a generated configuration using oputil.js described above**.
2016-07-02 20:16:01 +00:00
2015-11-04 23:26:22 +00:00
```hjson
{
general: {
boardName: Super Awesome BBS
}
2016-03-25 04:44:26 +00:00
loginServers: {
ssh: {
privateKeyPass: YOUR_PK_PASS
enabled: true /* set to false to disable the SSH server */
}
}
2016-03-25 04:44:26 +00:00
messageConferences: {
local_general: {
name: Local
desc: Local Discussions
default: true
2016-03-25 04:44:26 +00:00
areas: {
local_music: {
name: Music Discussion
desc: Music, bands, etc.
default: true
}
}
}
}
2015-11-04 23:26:22 +00:00
}
```
## Launch!
```bash
./main.js
```
## Monitoring Logs
Logs are produced by Bunyan which outputs each entry as a JSON object. To tail logs in a colorized and pretty pretty format, issue the following command:
tail -F /path/to/enigma-bbs/logs/enigma-bbs.log | /path/to/enigma-bbs/node_modules/bunyan/bin/bunyan
ENiGMA½ does not produce much to standard out. See below for tailing the log file to see what's going on.
2016-08-31 03:54:14 +00:00
## Points of Interest
* Default ports are 8888 (Telnet) and 8889 (SSH)
* Note that on *nix systems port such as telnet/23 are privileged (e.g. require root). See [this SO article](http://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode) for some tips on using these ports on your system if desired.
* **The first user you create via applying is the SysOp** (aka root)
* You may want to tail the logfile with Bunyan. See Monitoring Logs above.
2015-12-08 19:33:54 +00:00
# Advanced Installation
If you've become convinced you would like a "production" BBS running ENiGMA½ a more advanced installation may be in order.
[PM2](https://github.com/Unitech/pm2) is an excellent choice for managing your running ENiGMA½ instances. Additionally, it is suggested that you run as a specific more locked down user (e.g. 'enigma').