Skip to content

Install

cryptopool.builders edited this page Nov 9, 2019 · 14 revisions

Multi Pool Installer requires that you be under the root account for the initial setup.

Some providers setup your servers with a user account already created. If this is the case and you are logged in to your server under the user account, you MUST:

sudo su -l

to drop to the root user. Once you are under root you can run the following command:

curl https://raw.githubusercontent.com/cryptopool-builders/Multi-Pool-Installer/master/bootstrap.sh | bash

This will prompt you to create a new user account, it has to be a new account. It can not be any accounts already added to the system.

After the new user is created you MUST reboot the server and log in as that newly created user. Do NOT su to the user and try to continue, the installer will not let you.

If you are setting up a multi server system, you MUST do the above steps on each server!

YiiMP Single Server

The Yiimp Single Server Install is recommend for private or very small pools. It is recommended to have at least 4GB ram in order to function properly.

You can choose to install YiiMP with or without WireGuard. Installing it with out WireGuard will make any future expansion a lot more difficult. So if you plan on adding more servers to your network in the future, select to install with WireGuard.

Setup is automated after the following questions are answered:

Question Default Help
Are you using a domain name yes/no Your domain must be pointed to the server prior to installing.
Are you using a sub-domain as the main domain no If you plan to use something like pool.example.com
Domain Name Server IP Change to your domain either example.com or pool.example.com
Stratum Domain stratum.domain.name This should be something other then your domain name
Install SSL yes Installs a 90 day cert from LetsEncrypt
Support Email root@localhost Used to send you system alerts
Would you like the stratum to be built with autoexchange enabled no Set this to yes if you plan on auto exchanging coins to BTC
Would you like YiiMP to be built with dedicated coin ports no Change this to yes to setup each coin on its own dedicated mining port, this is recommended. Can not be used with autoexchange set to yes
Your Public IP pulls IP last used to access web server To verify go to http://www.whatsmyip.org
DB Root Password auto-generated 36 character password Default mysql root password
DB Panel User Password autogenerated 36 character password Default mysql frontend password
DB Stratum Password autogenerated 36 character password Default mysql stratum password
Admin Portal Access Location AdminPortal to access example.com/site/AdminPortal

Installation will take about 25 minutes to fully complete. You will get a message on the screen letting you know it has finished.

A server reboot is REQUIRED after the installer is completed to finalize the installation process!

After rebooting the server log back in to your user account. And you will be greeted by the following screen:

first_reboot

On first reboot it may take up to 10 minutes before the cron screens auto-start. After waiting ten minutes type:

motd

and you should see this:

running

To help make your server more secure we have changed the install locations and directory structure of YiiMP as follows:

Directory Files
/home/crypto-data/yiimp General install location for YiiMP
/home/crypto-data/yiimp/starts screens and stratum sh files - you do not need to run these
/home/crypto-data/yiimp/site -
/home/crypto-data/yiimp/site/web New location for YiiMP web files
/home/crypto-data/yiimp/site/backup backup location for mysql DB
/home/crypto-data/yiimp/site/configuration New location of your serverconfig.php
/home/crypto-data/yiimp/site/crons New location of the main:blocks:loop2 sh files
/home/crypto-data/yiimp/site/log New location for debug.log and your nginx server log
/home/crypto-data/yiimp/site/stratum New location for your stratum files
/home/crypto-data/wallets New location for wallets

Permissions have been setup correctly allowing your main user write acess to the /home/crypto-data directories! Changing file or directory permissions after install will cause your YiiMP to not function correctly, you have been warned!!

By default ALL algo ports have been blocked by the firewall. To open a port type:

sudo ufw allow port number

To start a algo on the server you must type:

stratum start algo (sha,x16r, etc..)

The stratum start file may not have newer algos loaded in to the file! If you try to start an algo and get a error message, you must add the algo manually to the following file:

/usr/bin/stratum

Just follow the format in the file to add your new algo to it.

From there your YiiMP Single Server installation is fully completed. You can now go to example.com/site/AdminPortal to access your admin section and start adding your coins.

YiiMP Multi Server

The YiiMP Multi-Server Install is recommended for those that want to run larger public pools. This offers the most security and is a lot more complex on the setup.

The following two tables show you the perfered server setup for the multi-server setup:

Role OS Version Recommended Ram
Web Server Ubuntu 16.04 or Ubuntu 18.04 2GB
DB & Stratum Server Ubuntu 16.04 or Ubuntu 18.04 4GB
Daemon Server Ubuntu 16.04 or Ubuntu 18.04 8GB+

or

Role OS Version Recommended Ram
Web Server Ubuntu 16.04 or Ubuntu 18.04 2GB
DB Server Ubuntu 16.04 or Ubuntu 18.04 2GB
Stratum Server Ubuntu 16.04 or Ubuntu 18.04 2GB
Daemon Server Ubuntu 16.04 or Ubuntu 18.04 8GB+

It is also highly recommended to use a provider that offers private IP's between your servers. If your provider only offers public IP's you must install Wireguard (Installer provided). This will setup a secure VPN connection between your servers for the backend communication.

If installing wireguard do not modify the default private IP's that are provide. Installation will fail!

Just like with the single server install there must be a user account created. If you attempt to run the script under root, it will force you to create a new user account and log in to it.

After the user accounts are created on each server, setup MUST begin on the server that is hosting your database. You do not need to run the installer individually on each server.

✏️ During the setup process you will be prompted to enter the user name and password for each of your servers. This is required for the installer to be able to SSH in to each server to perform the installation tasks on that server.

Installation will take about 25 minutes to fully complete. You will get a message on the screen letting you know it has finished.

A server reboot is REQUIRED after the installer is completed to finalize the installation process!

On first reboot it may take up to 1 minute before the cron screens auto-start. After waiting one minute type:

motd

To help make your server more secure we have changed the install locations and directory structure of YiiMP as follows:

Directory Files Server
/home/crypto-data/yiimp General install location for YiiMP All
/home/crypto-data/yiimp/starts screens and stratum sh files - you do not need to run these Web and Stratum
/home/crypto-data/yiimp/site - Web and Stratum
/home/crypto-data/yiimp/site/web New location for YiiMP web files Web
/home/crypto-data/yiimp/site/backup backup location for mysql DB Web
/home/crypto-data/yiimp/site/configuration New location of your serverconfig.php Web
/home/crypto-data/yiimp/site/crons New location of the main:blocks:loop2 sh files Web
/home/crypto-data/yiimp/site/log New location for debug.log and your nginx server log Web
/home/crypto-data/yiimp/site/stratum New location for your stratum files Stratum
/home/crypto-data/wallets New location for wallets Daemon

Permissions have been setup correctly allowing your main user write acess to the /home/crypto-data directories! Changing file or directory permissions after install will cause your YiiMP to not function correctly, you have been warned!!

By default even though all stratum algos start on server start, the ports have been blocked by the firewall. To open a port type:

sudo ufw allow port number

You MUST also open the RPC Port number on the daemon server when adding new coins. Failing to open the port will result in a connection time out error.

From there your YiiMP Multi Server installation is fully completed. You can now go to example.com/site/AdminPortal to access your admin section and start adding your coins.