-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 07ed7d8
Showing
5 changed files
with
378 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 DirtyHarryDev | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
## Dirty Harry`s Yiimp Crypto-Server Setup Installer! | ||
|
||
## This is opened as a public repo - all features are not final! | ||
|
||
All in one installer for your yiimp crypto-server. | ||
|
||
**Dirty Harry`s Crypto-Server Setup Installer!** Automates most of the tedious tasks of the following releases: | ||
|
||
* YiiMP | ||
|
||
|
||
## ▶️ Table Of Contents | ||
|
||
- [Installation](#-installation) | ||
- [Usage](#-usage) | ||
- [YiiMP Single Server Install](#-yiimp-single-server-install) | ||
- [Commands](#-commands) | ||
- [YiiMP Multi-Server Install](#-yiimp-multi-server-install) | ||
- [Credits](#-credits) | ||
- [License](#-license) | ||
|
||
|
||
## ▶️ Installation | ||
|
||
Installation: | ||
|
||
Requires a fresh Ubuntu 16.04 or Ubuntu 18.04 installation. | ||
|
||
``` | ||
curl https://raw.githubusercontent.com/DirtyHarryDev/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: | ||
``` | ||
multipool | ||
``` | ||
|
||
## 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 <b>MUST</b> 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 <b>MUST</b> 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: | ||
|
||
* [mailinabox](https://github.com/mail-in-a-box/mailinabox) | ||
* [realeas-it](https://github.com/webpro/release-it) | ||
|
||
The following forks have been used in the making of the script: | ||
|
||
* [YiiMP](https://github.com/tpruvot/yiimp) | ||
|
||
|
||
## ▶️ License | ||
|
||
[MIT](http://webpro.mit-license.org/) | ||
|
||
|
||
## ▶️ Support | ||
|
||
Join our active discord channel: | ||
|
||
https://discord.gg/myUAcrgNfc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
########################################################################################################### | ||
# Source https://mailinabox.email/ https://github.com/mail-in-a-box/mailinabox # | ||
# Updated by Dirty Harry for crypto use... # | ||
# This script is intended to be run like this: # | ||
# # | ||
# curl https://raw.githubusercontent.com/DirtyHarryDev/Yiimp-Server-Installer/master/bootstrap.sh | bash # | ||
# # | ||
########################################################################################################### | ||
|
||
if [ -z "${TAG}" ]; then | ||
TAG=v1.0 | ||
fi | ||
|
||
|
||
# Clone the Yiimp Server repository if it doesn't exist. | ||
if [ ! -d $HOME/yiimpserver ]; then | ||
if [ ! -f /usr/bin/git ]; then | ||
echo Installing git . . . | ||
apt-get -q -q update | ||
DEBIAN_FRONTEND=noninteractive apt-get -q -q install -y git < /dev/null | ||
echo | ||
fi | ||
|
||
echo Downloading Yiimp Server Installer ${TAG}. . . | ||
git clone \ | ||
-b ${TAG} --depth 1 \ | ||
https://github.com/DirtyHarryDev/yiimp_server_setup \ | ||
"$HOME"/yiimpserver/install \ | ||
< /dev/null 2> /dev/null | ||
|
||
echo | ||
fi | ||
|
||
# Set permission and change directory to it. | ||
cd $HOME/yiimpserver/install | ||
|
||
# Update it. | ||
sudo chown -R $USER $HOME/yiimpserver/install/.git/ | ||
if [ "${TAG}" != `git describe --tags` ]; then | ||
echo Updating Yiimp Server Installer to ${TAG} . . . | ||
git fetch --depth 1 --force --prune origin tag ${TAG} | ||
if ! git checkout -q ${TAG}; then | ||
echo "Update failed. Did you modify something in `pwd`?" | ||
exit | ||
fi | ||
echo | ||
fi | ||
|
||
# Start setup script. | ||
bash $HOME/yiimpserver/install/start.sh |