🔄Create a Subplebbit on a Virtual Machine
Last updated
Last updated
The first thing we want to do is create a new Server or Virtual Machine, shorthand "VM". We will be using cloud services from Hetzner.com since they are very affordable and proven to work well for this.
Helsinki EU-Central will be our selected location since it provides the hardware needed to host your Subplebbits.
Select Ubuntu 22.04 as your Image
For your Shared vCPU you will select "Arm64 (Ampere)
This part is optional depending on how many Subplebbits you plan on running. For now, 4GB should work
Next we will select "Public IPv4" and "Public IPv6". Leave "Private Networks" Unchecked.
Now we must create an SSH key that will allow you to authenticate your device in order connect to your virtual machine remotely.
//* Correct me if this is wrong
In order to create a SSH key you must first open an instance of PowerShell and type in the "ssh-keygen" command, then hit enter. It will prompt you where to create the file. For instance on this machine it would place your SSH keys in this directory:" (C:\Users\STUDIO NOCHAN/.ssh/id_rsa) " From here go ahead and hit enter to choose this directory. As well be sure to remember this location because you will need to access it later.
Once your key is generated, your screen look sort of like this.
Now go back to your hetzner server setup page and click this button to setup your SSH with the server.
Now navigate into the directory where you SSH keys were created on your PC.
Open your id_rsa.pub file. If it asks you to choose a program to open the file, any text editor will work. Copy this entire key. (Parts have been obscured for security reasons.)
Now paste the entire key into this window on your Hetzner page. The default name it gives your SSH key is fine to use, otherwise use something that you will not forget. Be sure to click the "Set as default key" box, then go ahead and click the "Add SSH Key" button to continue.
The rest of the options do nor pertain to what we are doing so when you are ready, click the "Create & But Now" Button
// You have now created your Virtual Machine!
Now we want to access our virtual machine using Windows PowerShell console. Within a new console window you will enter a command that is similar to the attached image, but your IP address will be specific to your Hetzner server and your directory folder will be where you have generated your SSH keys.
In your Hetzner control panel you can find your IP address displayed in several locations, it will look like this.
Your SSH directory will look like this
Together your command will look like this. Be sure to put your directory location in quotes.
Example: root@65.21.250.119 -i "C:\Users\STUDIO NOCHAN.ssh\id_rsa"
Save this command in a notepad somewhere safe, you will need it to get into your server each time.
Next you will be met with a prompt asking you yes or no. Type in "yes" and hit enter.
If everything has been done correctly, you screen should look like this and display your server information in you PowerShell console. Now we want to install plebbit on our server! run this command on your remote server:
curl https://raw.githubusercontent.com/plebbit/plebbit-cli/master/bin/install.sh | sh
when it is done installing your console should look like this
Now we must restart our server. Type "reboot" in your PowerShell window and press enter. This will also close your tunnel to you virtual machine from your Powershell window.
We are now back in. Now in your Powershell console run this command:
export PATH="$PATH":~/.local/bin
then run this command:
sudo apt update && sudo apt install -y gcc g++ make git build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libfontconfig1 fontconfig libfontconfig1-dev libfontconfig nsis p7zip
your console should begin installing files.
//*
I need someone to verify this step
*//
Your screen should look like this now.
Now we will be running the plebbit daemon. In your PowerShell Console type:
plebbit daemon
Then press enter.
Now we will open a new copy of Windows PowerShell. /!\ DO NOT CLOSE THE OTHER ONE, LEAVE IT RUNNING /!\ your plebbit daemon will be running there.
Now we will need need software to make sure that plebbit process runs after we close the tunnel. As it stands right now, the OS will terminate all the processes after you close you ssh because it treated the same way as logging into a computer and then logging off. We will do this by running this command in your PowerShell Console:
sudo apt-get install byobu
A successful install will look like this.
Now type this command into your Windows PowerShell Console. (Not the one running plebbit daemon)
byobu
Your screen should look like this:
Now we will create a new window by pressing F6, once that window is open enter the command:
export PATH="$PATH":~/.local/bin
Then hit enter.
Here are byobu shortcuts, you might wanna save them next to the ssh command: