How to Setup Monkersolver on a Debian 10 (Linux) Server Using Contabo (AMD EPYC Q3 2020 Update)
This is the Q3 2020 update to our Monkersolver server guide with Contabo. In the past month, Contabo upgraded it’s server offerings to include dedicated servers with AMD’s EPYC 7282 CPU. Additionally, these new servers can now be configured with up to 2 TB RAM. By Contabo‘s own account, a server configured with 2x AMD EPYC 7282 CPUs are nearly twice as fast as their previous top of the line offering of a server with 2x Intel Xeon E5 2630v4.
In this guide, we will give you a brief overview over the new offerings and guide you towards our recommended server configuration. We will be configuring our server with Debian 10 this time instead of Debian 9, but the installation process is largely the same for those of you who have used are previous installation guide with Debian 9.
Configuring Your Server
Before you can begin setting up your server’s software, you need to decide what hardware you want to use. Here we present you with our guidelines for server configuration. If you already have a server with Contabo, feel free to skip this section.
In Contabo‘s latest offering update, we can see a new range of available AMD EPYC servers.
On the left, we see the old Intel Xeon E5 2630v4 servers, whilst on the right we see the new AMD EPYC 7282 servers that have recently become available. We recommend using these newer AMD EPYC servers due to the significant decrease in solving time.
Below we will go over the steps for the base configuration we recommend, as well as upgrade potential upgrade options. We have highlighted the selections we recommend in the images.
We recommend selecting a dedicated server with 2x AMD EPYC 7282. This configuration is the fastest available with Contabo at the moment, and we believe will offer the best user experience with Monkersolver.
In the next step we are confronted with options to upgrade our RAM. By default, we wouldn’t recommend adding additional RAM, but you have the option to add up to 1792 GB RAM, for a total of 2 TB. Adding RAM is pricey, so we recommend testing various game trees on your local machine to see whether your future RAM requirements are necessary or not. If you are not sure what your future requirements will be, you can also start with 256 GB RAM, and request more memory later, as it becomes necessary. In order to select the 256 GB RAM option, just leave your selection blank for RAM.
For storage, we recommend that you choose at least twice as much storage as you have selected for your RAM, and also that you select an SSD. ‘SSD 1000 GB’ is a good option for either 256 or 512 GB RAM selection.
For the OS selection, we recommend Debian 10, Debian’s latest long-term release. Windows server licencing fees depend on the type of server being used, and here we can see that for 2x AMD EPYC 7282 the price is 79.99 EUR per month, so by configuring our server with Linux, we are saving 959.88 EUR per year.
Finally, we would just recommend you select ‘European Union (Germany)’ as your server location. For some individuals, United States will be a lower latency option, however latency is not a major concern when working with Monkersolver, and most of the time the server will be running without user interaction.
After you are satisfied with your slection, click ‘Order now’ to proceed to the checkout window.
Basic Server Configuration
After Contabo receives your payment, and after a short processing period, Contabo will send you an email with your login data for the server.
In order to connect to your server, we are going to use a piece of software called PuTTY.
Under ‘Host Name (or IP address)’ enter your servers IP address that was provided by Contabo. Under port, type ’22’. This is the port required to establish an SSH connection. When you’re done, hit ‘Open’. You will be prompted to ‘login as’. We are going to connect using the root user account and the password that Contabo provided us with in their email.
This is where we will diverge from our previous server installation guide. First of all we are going to start by creating a new user account that isn’t a root user. The root user account has administrative privileges, and should not be the default way we interact with our server, especially not for our use case.
Create New Non-Root User Account
First we need to install ‘sudo’. ‘Sudo’ will enable us to run administrative commands from our new non-root account as needed.
apt install sudo
In the next step we will create a user with our desired name and at that user to the group of sudoers. Replace ‘your_username’ with your desired username. Hit enter after each command.
usermod -aG sudo your_username
Install A Firewall
Debian 10 has built-in firewall capability through ‘iptables’, but we will install UFW firewall for the purpose of this guide. Hit ‘Enter’ after every command.
apt install ufw
In the next step, we are going to restrict the firewall to only allow connections through SSH.
ufw allow OpenSSH
Enable the firewall. When prompted, type y and hit ‘Enter’ to continue:
Confirm to see if UFW is running:
The output should also show that our firewall is now restricted to SSH connections only.
Status: active To Action From -- ------ ---- OpenSSH ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6)
Confirm SSH Login With The New Non-Root Account
Now that we have set up both a new non-root user account, and a firewall, we should confirm that we can connect using this new account. Open a new instance of PuTTY. This time when prompted to login, enter the new non-root account that we just created, with the password you specified. Assuming this was successful, we recommend to continue the rest of the setup process using your new user. Since this account is no longer the root account, you may notice that most commands will now need to be executed by typing sudo before them.
Configuring VNC On The Server
Now that we have completed some basic server configuration, let’s proceed to configuring our server so that we can use a graphical user interface through VNC.
Again, please hit ‘Enter’ after every command. You may also be prompted to confirm an installation by typing ‘y’ and then hitting ‘Enter’ as well. Since we will be typing sudo in front of most of our commands, we will initially and periodically be prompted to enter our new account’s password to confirm our commands.
Let’s start by updating our server’s list of packages:
sudo apt update
In the next step we are going to install the dekstop environment for our Linux graphical user interface:
sudo apt install xfce4 xfce4-goodies
Now install TightVNC, our preferred remote control software for Linux:
sudo apt install tightvncserver
Now that we have VNC and a desktop environment installed we could already begin using our Linux installation, however there are a few more configuration steps that we need to complete to get the most out of our server.
First off, let’s start vncserver to confirm it has installed correctly, and also to complete our basic setup of VNC.
You will be prompted to enter a password for connecting to your VNC client here. The password length has to be between six and eight characters. If you enter a password longer than eight characters, it will automatically be truncated to eight characters. Optionally, you can also set up a view-only password. You don’t need to fill out any personal information, just hit ‘Enter’ to skip. Make sure to remember your password, as we will need it later on to connect to our Debian desktop.
Once completed, your server output should look something like this:
New 'X' desktop is your_hostname:1 Creating default startup script /home/your_username/.vnc/xstartup Starting applications specified in /home/your_username/.vnc/xstartup Log file is /home/your_username/.vnc/your_hostname:1.log
Let’s go ahead and shut down the server.:
vncserver -kill :1
Modifying VNC’s Xstartup File To Enable Copy-Paste And Store Our Settings
Here we have another addition to this year’s guide where we will enable copy-paste from the initial setup.
Install autocutsel, which enables copy-pasting between your server and your local machine.
sudo apt install autocutsel
Now, create a backup of your xstartup backup file.
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
Next, we will create a new xstartup file, and add our additional parameters using the text editor ‘nano’:
Add the following lines to your xstartup file so it looks like this:
#!/bin/bash autocutsel -fork xrdb $HOME/.Xresources startxfce4 &
The first line after ‘#! /bin/bash’ enables autocutsel on our VNC server. The following commands relate to the graphical configuration of our VNC server. Any changes to the GUI (graphical user interface) that are made on the server will be saved to the .Xresources file.
Once you are done editing the xstartup file, press ‘ctrl+x’ to exit. When prompted, type ‘y’ to confirm that you would like to save, and ‘Enter’ to confirm the proposed location.
We need to make sure that this file is executable. We can do this using the command chmod:
sudo chmod +x ~/.vnc/xstartup
Now we can restart the server. Note that we have added additional parameters to the vncserver command. The ‘-depth’ parameter specifies the colour depth of our connection to VNC. The ‘-geometry’ parameter specifies it’s resolution. You can use different parameters if you please.
vncserver -depth 24 -geometry 1920x1080
Connecting To VNC Securely Via Encrypted SSH Tunnel
In the following step we are going to reconnect to our server using an SSH tunnel. First of all disconnect from all active PuTTY sessions by inputting the following command into all active PuTTY terminals:
This command will end our current session(s). For this step, we will need to reopen PuTTY on our local machine and go to ‘SSH’ and then ‘Tunnels’. Here we want to specify 5901 as our ‘Source port’. 5901 is the port that our VNC client listens on for incoming traffic. Under ‘Destination’ enter ‘localhost:5901’. Below select ‘Local’ and ‘IPv4’.
Now go back to ‘Sessions’, click ‘Default Settings’ and click ‘Save’ to make this your default mode of connecting to your server.
Next, click ‘Open’ to reconnect to your server using your newly established SSH tunnel. Don’t forget to login using your non-root user account.
Connecting To Our Servers Graphical User Interface
Now that we have correctly configured our server, we can go ahead and connect to our desktop using RealVNC’s VNC Viewer client. This is a multi-platform client, and will run on almost any mainstream OS, including mobile. From within the address bar of VNC Viewer, type ‘localhost:5901’ and hit ‘Enter’. If you completed all the steps correctly, this should connect you to your VNC server’s desktop. When prompted, enter the password you set during the initial setup of tightvncserver.
If prompted, select ‘Use default config’. Now you should see a desktop that looks roughly as the one below.
Installing Additional Software On Our Server
Before we can install Monkersolver, we need to first install some additonal software. We need to install Chromium (web browser), 7-zip (for extraction our Monkersolver file) and JRE (Java Runtime Environment) for running Monkersolver. We can install these all at the same time using the following command:
sudo apt install -y chromium && sudo apt install -y p7zip-full && sudo apt install -y default-jre
In order to proceed, you will need to have the installation file for Mac OS on your server. This file has a .dmg file extension. If you have downloaded this file using your web browser, it will typically be placed in your ‘Downloads’ folder, unless otherwise specified. In the following steps, we will assume that this is the case. If your file is somewhere else, please move it to the ‘Downloads’ folder, or adjust accordingly.
The following commands can be executed either from your terminal connection through PuTTY or from the terminal on your desktop. If you would like to use the terminal on your desktop, simply click the black box from the dock on your server.
Navigate to your ‘Downloads’ folder:
Now using 7-zip, we are going to extract the contents of our .dmg file:
7z x monkersolver-setup.dmg
This will extract the contents to a folder named ‘monkersolver-setup’ and place it within your ‘Downloads’ folder. Now navigate to that folder:
Now make ‘start2.sh’ executable. We need to run ‘start2.sh’ to start Monkersolver:
sudo chmod +x /home/your_username/Downloads/monkersolver-setup/start2.sh
From your desktop you can execute Monkersolver by typing the following from within your ‘monkersolver-setup’ folder. Hit ‘Enter’ after each command:
Note that ‘start2.sh’ is also where you can configure RAM settings for your server. That means change your -Xmx parameter, or the maximum RAM that can be assigned to each instance of Monkersolver through the Java Virtual Machine. View and edit the file from your terminal with the following command:
nano /home/your_username/Downloads/monkersolver-setup/ start2.sh
Also feel free to edit the file straight from your desktop environment if you prefer.
And that’s it. Congratulations for making it through the installation of your Monkersolver Linux server. As always, please leave feedback and let us know if you liked our guide or how it may be improved. Also let us know if you have found an error or need further clarification for one of the steps. Thanks for reading.
Thanks for your helpful blog post,
I am at the point I have installed Chromium on the VNC Viewer window, I see the chromium icon but when I click on it, Nothing happens
Could you help me with that please ?
Hello Julien. Please try a different browser to see if the problem persists.
From a terminal please execute the following commands. Hit ‘enter’ after each command:
‘sudo apt-get update’
‘sudo apt-get install -y firefox-esr’
Hi, when I try to connect to localhost:5901 in VNC Viewer I get an error message saying “The connection was refused by the computer”. Have you seen this error message before?
A refused connection likely means that the host computer is not listening on the port that you are trying to connect to. If you are trying to connect to localhost:5901, and you have not established a tunnel beforehand, that might be the reason why you are seeing this error.
Hello first off, thank for great content as usual. Second off I am stuck on this step: “In order to proceed, you will need to have the installation file for Mac OS on your server. This file has a .dmg file extension. If you have downloaded this file using your web browser, it will typically be placed in your ‘Downloads’ folder, unless otherwise specified. In the following steps, we will assume that this is the case. If your file is somewhere else, please move it to the ‘Downloads’ folder, or adjust accordingly.”
as everything else was basically laid out in very simple steps, this is the only thing that is not so obvious to me. Where do I get the installation for Mac OS on our server?
Following up… I am confused by the last steps entirely. I download monker from my account on the website through chromium on the server. But it comes in a .zip file, not a .dmg file. Anyways I try to extra that, I think it works, but when running the start2.sh command, it says no such file or directory. This leads me to assume that the .zip file is my problem and I need the .dmg file or that I am doing something else wrong.
Thank you for your comment Scott. The installation process has since changed and so the article needs to be updated. After you have downloaded and extracted the .zip file from the Monkerware website, navigate into your Monkersolver folder. There you should see a file ‘launcher.jar’. Right-click into the folder and select the command ‘Open Terminal Here’. In the terminal window that opens, type the command ‘sudo java -jar launcher.jar’. This will open Monkersolver.
Thanks for the follow up, I’m glad that my struggle was due to something beyond user error.
However, this still isn’t working. I do see the file launcher.jar in my MonkerSolver folder. I then right click and open terminal at the MonkerSolver folder (I am not able to open terminal at the launcher.jar), I then type in that exact command and get error code which says client is not authorized to connect to serverexception in thread “main java.” There is more in the error code that I can screen shot if that will be helpful. I know I have already downloaded and installed MonkerSolver on my main PC, could this be part of the issue?
Okay looks like after searching around on the internet I have answered my own question… after opening the terminal in the MonkerSolver folder we first needed to type in the command ‘xhost +’ from there we are able to launch monker with the aforementioned command. Thanks again!
Follow up question… I would like to run monkerviewer also on the linux. I found an instruction how to do this in previous update but it used the start2.sh so I assume that is also outdated. Are their updated instructions on how to run monkerviewer?
Hi Scott. If you download the latest Monkerviewer, version 1.4 for Mac, you will noticed that it is also a .jar file. You can execute it using the same methodology.
Would you recommend installing Monker on Linux at home on an PC or better use Windows.
Yes, I would also recommend Linux for use on a home computer, in conjunction with MonkerSolver. A wide range of distros are compatible, some of my favourites are Ubuntu, Debian, Fedora and Manjaro. The overall performance is similar to Windows however.