Skip to content

coolsd/Yiimp-Server-Installer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dirty Harry`s YiiMP Server Installer !

This is opened as a public repo - all features are not final!

All in one installer for your yiimp server.

**Dirty Harry YiiMP Server Installer! ** Automates most of the tedious tasks of the following releases:

  • YiiMP

▶️ Table Of Contents

▶️ Installation

Installation:

Requires a fresh Ubuntu 16.04 or Ubuntu 18.04 installation.

curl https://raw.githubusercontent.com/coolsd/Yiimp-Server-Installer/master/bootstrap.sh | bash

▶️ Usage

You may run the installer under root or an existing account. If you already have a user account created on your server that account must already be part of the sudo group.

If you are running as root the installer will prompt you to create a new account.

After creating the new user account or updating your existing account, you MUST reboot the machine in order for the accounts permissions to be updated properly.

After rebooting the server to your user to start the installer type:

yiimpserver

YiiMP Single Server Install

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. Setup is automated after the following questions are answered:

Question Default Help
Are you using a domain name no If you plan to use something like example.com, make sure DNS is updated
Are you using a sub-domain as the main domain no If you plan to use something like pool.example.com
Domain Name localhost 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
Your Public IP pulls ip last used to acess web server To verify go to http://www.whatsmyip.org
DB Root Password autogenerated 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!

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

motd

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

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

Permissions have been setup correctly allowing your main user write acess to the /home/yiimp-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

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.

▶️ Commands

To view a screen type:

screen -r main|loop2|blocks|debug

To detach from a screen type:

ctrl+a+d

To start, stop or restart main|loop2|blocks|debug type:

screens start|stop|restart main|loop2|blocks|debug

We also suggest that you type:

yiimp

and get to know those commands as well!

▶️ YiiMP Multi-Server Install

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 16GB
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 8GB
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/yiimp-data/yiimp General install location for YiiMP All
/home/yiimp-data/yiimp/starts screens and stratum sh files - you do not need to run these Web and Stratum
/home/yiimp-data/yiimp/site - Web and Stratum
/home/yiimp-data/yiimp/site/web New location for YiiMP web files Web
/home/yiimp-data/yiimp/site/backup backup location for mysql DB Web
/home/yiimp-data/yiimp/site/configuration New location of your serverconfig.php Web
/home/yiimp-data/yiimp/site/crons New location of the main:blocks:loop2 sh files Web
/home/yiimp-data/yiimp/site/log New location for debug.log and your nginx server log Web
/home/yiimp-data/yiimp/site/stratum New location for your stratum files Stratum
/home/yiimp-data/wallets New location for wallets Daemon

Permissions have been setup correctly allowing your main user write acess to the /home/yiimp-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.

đź”— Commands

To view a screen type:

screen -r main|loop2|blocks|debug

To detach from a screen type:

ctrl+a+d

To start, stop or restart main|loop2|blocks|debug type:

screens start|stop|restart main|loop2|blocks|debug

We also suggest that you type:

yiimp

and get to know those commands as well!

▶️ Credits

The following GitHubs have been a source of inspiration and code:

The following forks have been used in the making of the script:

▶️ License

MIT

- Tutorial to help install yiimp
- Tutorial para ajudar na instalação do yiimp
- Pools that used this tutorial: https://onfirepool.ddns.net/

Follow the steps, and your yiimp will be operational

Requirements:

UBUNTU 18.04 (I used the minimal install)


1 - install git, curl, make, and gcc

sudo apt install git
sudo apt install curl
sudo apt install make
sudo apt update
sudo apt install build-essential

1.2 - Use no-ip for domain (optional)

cd /usr/local/src/
sudo wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz
sudo tar xf noip-duc-linux.tar.gz
cd noip-2.1.9-1/
sudo make install

1.2 - After the make install command, it will request your noip email and password, after that just choose your update options, and your noip is ready to go.

2 - Download a reliable yiimp installer. I recommend using yiimp Dirty Harry (if you use another, replace the command below with the installer of your choice)

sudo curl https://raw.githubusercontent.com/coolsd/Yiimp-Server-Installer/master/bootstrap.sh | bash

After running the command it will ask you to restart the machine, and give instructions on how to proceed with the installation after the restart, in my case I am using Dirty Harry, so the command will be yiimpserver

3 - Setting up and installing yiimp

Select yiimp single server

This is an image

I'm using domain so select the option to add to domain

I'm not using subdomain

This is an image

Fill in your domain

This is an image

Your stratum will be the same domain but with stratum before

Select to install the ssl certificate automatically, this will leave your site with the padlock indicating it is secure

This is an image This is an image

Add an email address, so the pool will notify you about blocks

Configure link to admin area

This is an image

I leave auto exchange disabled in my pool, you can leave it enabled, it's up to you

This is an image

I leave the dedicated ports for the coins enabled, but it's up to your discretion

This is an image

This part is very important so that you can access the admin panel of your pool - go to https://whatismyipaddress.com/ and put your ipv4 in the config

This is an image

Now configure your pool passwords, I recommend using the automatically generated ones (but remember to save them) or you can change them to one of your choice

This is an image

After that you will confirm your settings and give Yes to start the installation

This is an image

Installation can take many minutes

This is an image

After the installation is finished it will give you the information to connect as admin in your pool, then save, and ask you to restart the machine - IT IS IMPORTANT THAT YOU RESTART FOR IT TO WORK

This is an image

Ready now you have yiimp installed on your machine, congratulations, but don't go out releasing fireworks because it probably won't be working, as soon as you access your site it will present the white page of death

This happens because of the PHP version that yiimp uses, ubuntu downloads the latest version not being compatible with the pool

Now let's fix it

Let's install the right php

sudo apt install php7.3-memcache
sudo apt install php7.3-memcached
sudo apt install memcached

Now let's make the system switch from php 8.* to 7.3

sudo update-alternatives --config php

select the option corresponding to PHP7.3

Now just restart nginx and php

sudo service nginx restart
sudo service php7.3-fpm restart

For you to add a port and start stratum automatically, just type the addport command in the terminal

will ask for the currency symbol and the algorithm just fill in correctly that it will start alone

Ready now your pool is almost 100%

If you install a coin BTC, LTC, DASH, among others, you will have to fix the coin_results.php (this solve RPC Error -8:label argument must be a valid label name or "*" )

Using dirty harry as an example. go to /home/yiimp-data/yiimp/site/web/yaamp/modules/site/coin_resuts.php look for

$account = '';
if ($DCR || $DGB) $account = '';

and then below the other coins, add your coins

else if ($coin->symbol == "BTC") $account = ''; //ONFIRE TEST

else if ($coin->symbol == "DASH") $account = ''; //ONFIRE TEST

else if ($coin->symbol == "LTC") $account = ''; //ONFIRE TEST

example:

$account = '';
if ($DCR || $DGB) $account = '';

else if ($ETH) $account = $coin->master_wallet;

else if ($coin->symbol == "RNG") $account = '';

else if ($coin->symbol == "ZENX") $account = '';

else if ($coin->symbol == "BTC") $account = ''; //TESTE ONFIRE

else if ($coin->symbol == "DASH") $account = ''; //TESTE ONFIRE

else if ($coin->symbol == "LTC") $account = ''; //TESTE ONFIRE

Congratulations your pool is operating <3


Now that you have your pool running, you need to add the coins so that your users can mine

I will give three examples, installing dogeseedz, and tubopay

1 - Download wallet-qt or COIND of the currency you want to install, remembering some coins are working in yiimp with COIND

This is an image

1.2 - Run wallet-qt or coinD and let it sync

Depending on your coin, it can take minutes, hours, days, or weeks.

2 - After synchronization, go to your pool, and open the admin portal, after that click on add coin

This is an image

2.2 - Fill in the currency information, name, symbol, algorithm, logo, and click save

This is an image

2.3 - Now search for your coin name and click on its symbol

This is an image

2.4 - Configure what is marked in red, to the settings you want

  • First in general, set the minimum payment

This is an image

  • In settings, enable the boxes: enable, auto ready, visible, installed, and watch, below them configure the character of the pool (must be generated by wallet-qt or coind ex: ./coind-cli getnewaddress ) in case of dogessed needs enable use segwit too

This is an image

  • On the exchange tab, do not move unless you have enabled auto exchange in the installation
  • In the Daemon tab fill in the process name example: dogeseedz-qt or dogeseedzd, after that if your daemon is on the same machine as your pool, put the ip 127.0. of the rpc of the coin (you can put whatever you want), username and password, in rpc type put POW (Attention several coins are POS, seek to inform yourself with the official website of the coin you are installing), after that go to to save

This is an image

  • Now find your coin again and click on its symbol, and go straight to the Daemon tab, it will generate a config for your coin, copy only the red part, and put it in your coin config (example: ./dogeseedz/Dogeseedz. conf ) before saving change the path of blocknotify, in my case it is installed in /usr/bin/blocknotify.sh

This is an image

  • Your coin config will look like this

This is an image

- Now let's start the stratum for coin

  • Go to your terminal and type: addport fill in the symbol and algorithm of the coin you created, example:( Symbol: SEED Enter, Algo scrypt Enter )

This is an image This is an image This is an image

  • Take the generated port, go back to your coin configuration, in the daemon tab, under POW or POS, you put the stratum port, click on save and your coin is working

This is an image

In the currency TUBOPAY, LITECOIN, BITCOIN, DASH, DIGIBYTE, and several others, you must turn off the has getinfo box, so that the wallet can communicate with the pool

This is an image


About

YiiMP With Solo Function

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%