PAI-BOT LINUX INSTALLATION
PAI-Bot Installation Guide
In order to use the PAI system, you will need to connect to PAI-NET.
please make sure you acquire the following information before you start the installation process:
- PAI-NET URL – the URL of the PAI-NET you will be using
- Organization name
- PAI-NET user & password
Before you install PAI-Bot you will need to set up the PAI environment.
PAI environment includes a directory (the PAI directory) that stores all PAI’s files.
For more information read the PAI environment installation guide.
For best practice, we recommend installing PAI directory at ` /var/PAI ` for Linux based OS
PAI-Bot cannot work without the PAI directory, please make sure all files and directories are properly configured before you continue. you can use our PAI-ENV-CHECKLIST script to test the environment.
After you set up the environment, we can start installing the Bot.
PAI-Bot is a Node-JS application, and require you to install Node-JS and npm on your machine.
Full prerequisite list can be found here
PAI Bot installation guide:
- Download the project from our GitHub repository.
- Open the project directory in the terminal and run: ` npm install `. this will install all PAI-Bot packages that are required for running the bot.
- In order to control your Bot with PAI-Control-Panel, you will need to register your Bot to PAI-NET:
Run the command ` node run init ` in your terminal, this will set up your Bot, and will ask you questions to configure your Bot:
- “No bots found, would you like to create one ?” – answer yes.
- “Please enter PAI-NET URL” – if you have a private network, you should enter your custom URL in here. otherwise press enter.
- “Please enter PAI-NET username:” – enter your PAI-NET username
- “Please enter PAI-NET password:” – enter your PAI-NET password
- “Please enter Bot’s nickname:” – enter any nickname you want for your Bot.
- After you configured your Bot, open the terminal and the ` node start`, this will start the Bot process. look for the ” PAI-NET socket connected to server ” log, if you see this message then your Bot is online!
- Go to PAI-Control-Panel and communicate with your Bot.
Linux / Mac
- Tested version : Ubuntu 18.04
|O/S||Docker Image||Docker File|
|Ubuntu 16.04||Ubuntu bot image file|
|Node.JS||Nodejs_Download||Ubuntu help link|
|Java||Java_Download||Help – (optional)|
* installation script will install prerequisite for supported system
Ubuntu : http://www.git
- Install Prerequisite
- Run script: for – Win:run.bat | Ubuntu:run.sh
- Answer questions
- Bot is running
Q: What the script does?
A: – Set PAI folder enviroment
- Create PAI folders: Win:C:\PAI | Ubuntu:/var/PAI
- Cloning Bot git project
- Npm login
- Install npm packages
- Running bot installation
- Bot is running
- Open console: https://dbot.pai-net.org