Quick and Dirty Domain Setup Guide ($20 a Year)(The Dirty Kurty)


Hello again!

Kurtis here with another random thing and stuff. So if you haven’t seen already I have been playing around with a rather affordable VPS Provider with a bunch of the lads and i think I’m confident enough to say that this could be a very viable Quick and Dirty way to host a domain with High Fidelity (with stats included!). So with the super duper thanks of @OmegaHeron and @Cracker.Hax for making a super easy way to get the domain server onto ubuntu and setting up a nice easy way to manage domains with systemd I present to you the.

VPSCheap High Fidelity Domain Installer (NOW WITH dirty-kurty COMMAND!)

This is just a simple one liner that will automate the installation and setup of a dedicated High Fidelity Domain. This should work with any Ubuntu 16.04 installation but I’ve added a few more steps to make it “just work” with VPSCheaps VPS (BECAUSE 20 BUCKS FOR A YEAR IS HECK YEAH RAD)

Getting Started

VPSCheap Setup

Since this script was designed for a VPSCheap.net server this guide will provide a more precise step to step guide for users who are using this service.
We have assumed that you have created your server and are running Ubuntu 16.04. If this is not the case (or VPSCheap has decided to not have the 16.04 image in their setup like I have noticed, so just choose the 16.10) you can rebuild your VPS to this image by logging in, selecting your VPS and clicking the rebuild button at the bottom of the control panel.


Then selecting Ubuntu 16.04 and pressing the build button at the bottom of the page again.


The VPS should be rebuilt quickly and after this go back to the Details area of your login and grab the IP Address of your VPS and the Password


It is strongly recommended that you change this password so now would be a good time to do so.

Connecting to Your VPS

We will be using a tool called putty to connect to your server you can download it for your computer here. Once you have this downloaded and running put the Main IP from your control panel into the Host Name area of putty, make sure SSH is selected and press the Open button.


You should have a black screen appear not asking for a username. Put in your desired username (For the VPSCheap people this is root) hit enter and then put in your password.

If all goes well you should now have a terminal! It’s strait forward after this. All you need to do is copy and paste the following line into your terminal (hint: Right Clicking in putty pastes what’s in your clipboard) hit enter and follow the prompts! Happy installing!

sudo wget -O - https://bitbucket.org/Vargink/vpscheap-high-fidelity-domain-installer/raw/master/hifi-domain-installer.sh | sudo bash


What About Backup?

So now you have your domain up and running and now you’re asking. “How do i backup stuff!” We will be using filezilla to connect to your VPS and get your domains backup. You can download the version you want here if you enter Main IP, Username (root), Password and the Port of 22 and hit Quickconnect.

Your domains files are located in /home/hifi/.local/High Fidelity backing up this folder should get everything you have.

Can I Host Files?

You sure can! Apache is installed by default (if you’re using VPSCheap) if you goto /var/www/html this is your parent website directory. Anything you put into this directory will work with http://(Main IP)/


This script comes without any warranty and I am not associated with VPSCheap or any parent company etc etc.


Only issue I could see is that building may require more than 512MB of ram. A simple swap file should help, but then again, my only experience is compiling everything natively on a Pi, which only had 1GB and I needed the swap for compiling Qt. I’ll have to try single core compiling with similar specs and see what happens.


Yeah its why I went with the Ubuntu package route since that should already be built and ready to go.


It’s using pre-built binaries from my repository so, no compiling involved, other than my build box shoved in a closet. :slight_smile:


Holy moley we replied at the same time! I for one would like to be in this closet @OmegaHeron it would look something like this


Flame, good to see hifi staff pov on making servers super cheap and easy.


I was seeing how quickly I could, from start to finish, install Ubuntu 16.04 LTS on a fresh machine and run the script to get things going, but I ran into a snag:

Really? hifi-doman-installer.sh? Had me checking my typing twice with that one.

EDIT: Ran into a WEIRD situation: I ran the line but it stated something was wrong and was on the third try. I closed it and just gave it execution properties (sudo chmod +x ./hifi-domain-installer.sh) and that seemed to fix it. I’ll have to poke around and figure out what happened.


yeah I might have to sudo the second command sudo wget -O - https://bitbucket.org/Vargink/vpscheap-high-fidelity-domain-installer/raw/master/hifi-domain-installer.sh | sudo bash


did copy & paste not work?


I manually typed it (using a VM). That’s how I spotted the difference.

So new issue: assignment-clients do not seem to be starting. I did notice a fail on the reboot so I’ll have to spot what happened.

Spec wise, the VM is pretty much a clone of the VPSCheap (2 cores, 512 MB ram, 30GB HDD, Ubuntu 16.04.3 LTS Server with OpenSSH added). Between going back and forth and getting my feet wet with the script, just under 25 minutes. Could shave off 10-5 minutes easily if I can streamline without going back and forth.

EDIT: Only other concern is lack of a firewall, but atm that causes bumps with strict NAT systems and would complicate the setup since we’d be entering local tunneling via SSH. Also on my next ‘run’ I’ll give the added sudo before bash a shot and see how that works.

EDIT EDIT: According to journalctl -u assignment-client.service:

Sep 20 05:30:43 hifi-test systemd[1]: assignment-client.service: Main process exited, code=exited, status=127/n/a
Sep 20 05:30:43 hifi-test systemd[1]: assignment-client.service: Unit entered failed state.
Sep 20 05:30:43 hifi-test systemd[1]: assignment-client.service: Failed with result 'exit-code'.
Sep 20 05:30:43 hifi-test systemd[1]: assignment-client.service: Service hold-off time over, scheduling restart.
Sep 20 05:30:43 hifi-test systemd[1]: Stopped start HIFI assignment client server.
Sep 20 05:30:43 hifi-test systemd[1]: assignment-client.service: Start request repeated too quickly.
Sep 20 05:30:43 hifi-test systemd[1]: Failed to start start HIFI assignment client server.```



Okay had a look at whats causing it to crash and it looks like there’s a single library that isn’t installed in a default ubuntu install. Added it into the script and it should work without any problems now.


Which lib is that? I’ll add it to dependency list for hf package.


Ah its libgomp1 (insert more stuff here because of char limit)


Got it - I should have just looked at script but was distracted. I’ll add libgomp1 to deps list since it can’t hurt. :wink: It’s likely that test systems I ran it on somehow always had that installed thus I never caught it as a dep to add. Future package builds will have it and that will have no impact upon how you’re running the install.

Also - it’s going to update if you did an apt-get update;apt-get upgrade cycle too… just keep that in mind for those running in case you don’t want to update for some reason.


Oh yeah heck, good point! Thanks for the heads up :slight_smile:


Also - got the solution to why I never noticed libgomp1 :wink: GCC pulls it in and I always end up with GCC on my boxes.


Alrighty, I’ll re-run it again and see what happens.

EDIT: Okay, had to do the install again (Opt 1) for libgomp1, but then got stuck in the attempt cycle:

useradd: user 'hifi' already exists
Something went wrong! Here is the error D:

No big deal, we should now be able to run :smiley:. It took awhile for all the assignments to get started, (about 45 seconds) but overall that seems to have worked. I’ll have to run a fresh install again and see how it goes.

100% Success from a fresh install. With installation of OS and downloading of Qt 5.9.1, it took about 12 minutes.


@Vargink - Question… Is any swap setup on those 512M RAM VPS instances? If not it will be prudent to consider adding some before next RC release. They’re adding “baking” to ATP server, basically it’ll convert textures to KTX and compress meshes to optimize… more details are supposed to be announced before it rolls out. But – I’m seeing that it’s a memory hungry beast while converting textures and will likely crash on a 512MB instance without swap. I’d be thinking about adding at least 1G if not 1.5 or 2G swapfile if it doesn’t have something similar.


Oh crap that might be a problem since i don’t think you can actually allocate anything to swap on thoes VPS’s.