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 `. and after, run: ‘ npm update ‘. this will install and update 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 ` npm run init ` in your terminal, this will set up your Bot, and will ask you questions to configure your Bot:
- “Your Bot is not connected to PAI-NET. Would you like to register your bot to PAI-NET ?” – Press Enter
- “Please enter PAI-NET URL” – The URL you got from us
- “Please enter PAI-NET username (email):” – enter your PAI-NET username
- Enter your PAI-NET password
- You should get now: token is now active & login success
- “Do you want to register new bot or load an existing bot ?” – Choose “CREATE NEW BOT”
- “Please enter Bot’s nickname:” – enter any nickname you want for your Bot.
- “Select organization: ” – Choose “Developers”
- You should get now: bot created: $NICKNAME & token is now active & login success & Done
Congratulations! you’ve successfully created your first new PAI-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 18.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