After you establish a VPS plan. Use the login information provided by your service to connect to your server via the SSH Client.
- Host= The Server IP (Provided by Service)
- Port= 22 (default)
- Username= root (default)
- Password= Provided by Service
Upon first successful login you will be prompted about certification of connection.
Accept & Save.
After accepting, a terminal window will open awaiting your commands.
Inside the terminal window run the following commands to ensure the OS is up to date.
apt-get update -y
apt-get upgrade -y
Optional update - May require reboot when complete.
apt-get dist-upgrade -y
Setup Swap File
A swap file uses disk space for memory. View a swap file as "virtual memory" in Windows by comparison. If you have a budget plan, you will certainly benefit and have the ability to operate multiple programs/daemons.
If you desire to get the most from your plan for your money, a swap is highly recommended. Keep in mind that a swap file will use part of your SSD space and you will need to balance for your situation.
Be aware that not all vps providers allow for swap setup, Vultr does, Contabo does, Virmach does Not.
The code below will setup a 6GB swap file. The swap file will apply and stay in affect even after server reboot.
This should be run as the root user. If you are not logged in as root, use sudo as needed for your situation.
Adjust count=#### for the desired size in MB. exp: 6000 = 6GB.
dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=6000 && mkswap /mnt/myswap.swap && chmod 0600 /mnt/myswap.swap && swapon /mnt/myswap.swap && echo -e "/mnt/myswap.swap none swap sw 0 0 \n" >> /etc/fstab
To verify the swap file was established run:
Dependencies are requirements for compiling and operating crypto currency daemons/wallets.
Depending on your provider, some VPS installs may or may not have certain programs preinstalled.
You will notice common programs such as nano, git, unzip and ufw are included in the command below.
We have included these items to assist in your setup. If they are preinstalled, there will be no change.
Copy and run entire command below:
(Ubuntu 16 Only - Do not add the two ppa's if other than Ubuntu 16 or manual removal required.
Ubuntu 18 & 20 Can build BerkelyDB 4.8 following instructions below.)
apt-get update -y && apt-get upgrade -y && apt-get install git -y && apt-get install build-essential libssl-dev libboost-all-dev libqrencode-dev pkg-config libminiupnpc-dev qt5-default qttools5-dev-tools libgmp3-dev -y && add-apt-repository ppa:bitcoin/bitcoin -y && apt-get update -y && apt-get install libdb4.8-dev libdb4.8++-dev -y && apt-get install autoconf -y && apt-get install build-essential libtool autotools-dev pkg-config libssl-dev libboost-all-dev autoconf automake -y && apt-get install libzmq3-dev libminiupnpc-dev libssl-dev libevent-dev -y && apt-get install libgmp-dev -y && apt-get install openssl -y && apt-get update -y && apt-get install git build-essential -y && apt-get install aptitude -y && aptitude install libdb4.8++-dev -y && apt-get install git -y && apt-get install software-properties-common python-software-properties -y && add-apt-repository ppa:git-core/ppa -y && apt-get update -y
As long as everyting installed correctly above, your VPS is ready to compile and/or operate crypto daemons/wallets.
You can now move over to MNSETUP or LINUX COMPILEhowever it is recommended to skim
the optional and troubleshooting details below.
If you are using Ubuntu 16 GUI you may want to operate or compile wallets. The commands below will be run line by line and the final 2 commands
will install what is needed to compile the QT/GUI wallet for Ubuntu.
The following commands will include sudo. Under normal circumstances, the Ubuntu GUI install is set with sudo user access. Alternatively you can
switch to root user in terminal.
The following commands can be used on the VPS in order to setup QT/GUI compilation of any wallets you work with.
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libboost-all-dev
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
Not all solutions you may come across can be assumed ahead of time. The items listed here are a few common solutions
Build BerkeleyDB 4.8
If libdb4.8 does not install. Usually this is because you are using Ubuntu 18 or other distribution like Debian.
The repo for these versions is not available so you will need to compile BerkleyDB yourself.
../dist/configure --prefix=/usr/local --enable-cxx
If the make command errors. This may be due to a mis-naming of a file.
Run the following set of commands to resolve:
sed -i 's/atomic_compare_exchange/atomic_compare_exchange_db/g' db-4.8.30/dbinc/atomic.h
sudo apt-get update
sudo apt-get install libsodium-dev
Fix lib1.58 error
apt-get install -y libboost-all-dev
QT error during compile
apt-get install git build-essential cmake qt5-default qtscript5-dev libssl-dev qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt5svg5-dev libqt5webkit5-dev libsdl2-dev libasound2 libxmu-dev libxi-dev freeglut3-dev libasound2-dev libjack-jackd2-dev libxrandr-dev libqt5xmlpatterns5-dev libqt5xmlpatterns5
Error attempting to run daemon
apt-get update && sudo apt-get install gcc-4.9 -y && sudo apt-get upgrade libstdc++6 -y && sudo apt-get update && sudo apt-get install libstdc++6 -y && sudo apt-get update && sudo apt-get install -y software-properties-common && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y curl build-essential supervisor wget libstdc++6 && sudo apt-get upgrade -y