How to stop GTA IV crashing in full screen mode

Problem

I recently attempted to play GTA IV again on Windows 10, and the game would constantly crash on the disclaimer screen, but only while in full screen.

If I modified the launch options to start in windowed mode (type -windowed in the launch options in Steam, by right clicking on the game and clicking properties) the game would work OK.

Fix

The way to fix this, is by first navigating to the GTA IV installation folder (below)

Retail
C:\Program Files (x86)\Rockstar Games\Grand Theft Auto IV

Steam
C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto IV

Once you find the folder, look for the GTAIV (or GTAIV.exe) file, right click and select properties.

In the properties menu, click the compatibility tab. Under settings you should see an option that says Disable full-screen optimisations

Tick this box, then click OK. The game should now work.

How to reward users with points for cheering with bits using PhantomBot

About

Note: I am not a lawyer, and this guide is only to show you HOW to reward bits with points. Whether you decide to do so or not is your own decision.

PhantomBot is a self hosted Twitch bot, with lots of features.

One of the features is a points system which allows users to earn points by doing certain things, like watching the stream, playing chat games and donating money.

However, there is no option to reward users with points for cheering using bits.

Why? Well, the reason is the Twitch terms of service, which has some very confusing terms, one of which includes the following:

“offer[ing] Bits in exchange for real or virtual currencies or any other consideration or items of value whether inside or outside of the Twitch Service.”

People have taken this to mean rewarding viewers for cheering is against the Terms of Service. However, this is most likely referring to people offering bits in exchange for real money, or crypto-currencies such as Bitcoin (i.e. I offer someone $50 to buy $100 worth of bits mined by watching ads).

I have asked Twitch for clarification on the matter, but their support is slow and useless. They most likely don’t care, as they’re still making money from it either way. Therefore I have written this guide as I believe PhantomBot uses should be given the choice to reward users who cheer with bits in the same way they do people who donate through other means.

Adding the option

To reward users with bits we need to modify one file.

The file we need to modify is called “bitsHandler.js” and is located in the following folder

<root phantombot folder>/scripts/handlers/

Open this file in your text editor, and you should see the following text on the 9th line

announceBits = false;

Modify this line to the following

announceBits = false, bitsReward = 1;

1 is the amount of points we want to reward the user with for each bit donated. If you leave this set to 1, it means that if the user donates 100 Bits ($1USD) they will receive 100 points.

After you have done this, find the following text in the same file

$.bind(‘bits’, function(event) {
var username = event.getUsername(),
bits = event.getBits(),
s = message;

Directly underneath the text, add the following

/*
reward user with points for giving bits
*/
$.inidb.incr(‘points’, username.toLowerCase(), (bits * bitsReward));

And that’s all there is to it! Your users should now be rewarded with points when cheering with Bits.

Tips/things to note

As I said at the start of the post, I am not a lawyer, and this guide is only to show you HOW to reward bits with points. Whether you decide to do so or not is your own decision.

Should Twitch ever actually bother replying to me, I will update this post.

Thanks for reading.

How to set up PhantomBot on a Linux VPS/server

About

PhantomBot is an open-source Twitch bot which runs on your own computer (unlike web-based bots like Nightbot)

However, some people might like to keep the bot on a separate computer. This way it uses no resources on your gaming/streaming PC and can be left on 24/7 without keeping your PC on.

This guide will show you how to set up PhantomBot on a Linux (Debian-based) VPS

It should work on a VPS/dedicated server with most providers, but I recommend using Vultr as they are a solid provider, with ultra fast hardware and network, and have locations all over the World.

VPS/Requirements

The VPS I will be using is a 512MB RAM VPS from Vultr running Debian 9 (Stretch). Using the latest version of the OS is important as it includes the required version 8 of openjdk. However this guide should work on any OS based on Debian (i.e. Ubuntu)

Creating and connecting to the VPS

Note: you can skip this bit if you know how to connect to your server

Once you have signed up at Vultr, you will be able to create a VPS. Just go to Servers then click the plus sign (+) and choose your location by clicking on the flag (choose the country nearest to you, then click Debian and select 9 x64 then under Server Size choose the specs you want. You should be able to easily run Phantombot on the smallest 512MB RAM package, so choose this one for now. Once you click deploy, wait a few minutes for the server to be created.

Next, download PuTTY from this link. This is the program you will use to connect to your server and run commands. Open the file once it’s done downloading, and set it up like this

Host Name (or IP Address): the IP address given to you by Vultr on the “servers” page (or your VPS provider’s website/control panel)
Port: 22
Saved Sessions: in this box, type a name for your server like “PhantomBot”

After that, click Save, then click Open

Once you click that, a window should pop up and ask you for a password. This is the root password of your server, and will have been emailed to you by Vultr (or you can click on your server in the control panel, and click the eye next to Password.

Once you’ve logged in to your VPS you should see something similar to this

root@vultr:~#

If you see that, move onto the next step. If not, try again or post a comment below and I will try to help.

Setting up the VPS

Note: to paste something in PuTTY, just right click inside the window

Now we need to update our server and install some things. First, you may want to change the password.

To change your password type passwd and press enter. Then it will ask you to choose a password, and after pressing enter it will ask you to confirm it. Type it in again and press enter, it should say passwd: password updated successfully

Next, run the following command to update your server and install unzip (to unzip some files), nano (a commandline text editor which we will use later), openjdk-8 (version 8 of the open Java Development Kit, needed for PhantomBot to run), screen (used to run PhantomBot in the background when you disconnect from the server) and unattended-upgrades (to help keep your server secure)

apt-get update && apt-get -y dist-upgrade && apt-get -y install screen unattended-upgrades unzip openjdk-8-jdk-headless nano

If you used Vultr, it will most likely be updated and already have some of these installed, so shouldn’t take long.

Installing PhantomBot

Note: to paste something in PuTTY just right click inside the window

 

Visit the PhantomBot website and find the “Stable” release. Right click on “Download” and choose “copy link address” then type in the following command, replacing the link below with the link you got from the website

wget https://github.com/PhantomBot/PhantomBot/releases/download/v2.3.9/PhantomBot-2.3.9.zip --no-check-certificate

Next we need to extract the folder from the zip file. Type in the following

unzip PhantomBot*.zip && rm PhantomBot*.zip

Next we need to navigate to the PhantomBot folder, and then make some files executable so we can run them. Type (or copy/paste) the following command to change to the folder

cd PhantomBot*

Then type the following command to make the files executable

chmod u+x launch-service.sh launch.sh

Now we’re ready to start up a screen session and run PhantomBot. First type the following command to start up a screen session

screen -S bot

Now we can start PhantomBot, and it will keep running when we disconnect from the server! Type the following command to start PhantomBot

./launch.sh

Answer the questions asked by PhantomBot and press enter

Once you have set up the bot, do the following

Hold Ctrl + A, then press D while still holding them

You can now close, PuTTY down and disconnect from the server

To configure PhantomBot, open your web browser and visit the following address, where (YOURIP) is the IP address of your VPS (for example, it might be something like http://1.1.1.1:25000/panel)

http://YOURIP:25000/panel

The username and password is the username and password you specified during the set up of PhantomBot

Tips/things to note

For song requests, instead of /panel you would use /ytplayer and for the song request list it’s /playlist so you can link to this in your chat by making a command called !playlist (easily done in PhantomBot)

Any issues/problems

If you have any issues at all, please leave a comment below.

How to set up your own MTA San Andreas server (Linux)

Intro

MTA:SA (Multi Theft Auto: San Andreas) is a widely used multiplayer mod created for San Andreas. This guide will show you how to set up an MTA:SA server on a Linux box.

The first thing you will need is a Linux box with root access. Either a dedicated server or a VPS (Virtual Private Server will do).

I would suggest using Vultr (please use this link to help support me!) for this, as they offer fast and cheap KVM machines in multiple locations across the world, starting from $5/month.

This guide will focus on setting up a Vultr VPS using Debian 8, but should work with other hosts and other Linux distributions, although I can’t guarantee it.

Creating and connecting to the VPS

Note: you can skip this bit if you know how to connect to your server

Once you have signed up at Vultr, you will be able to create a VPS. Just go to Servers then click the plus sign (+) and choose your location by clicking on the flag (choose the country nearest to you, or nearest to where the majority of your players will be. London is a good choice for covering most of Europe as well as the east coast of USA) then click Debian and select 8 x64 then under Server Size choose the specs you want. You should be able to easily host up 50+ players on the smallest 768MB RAM package, so choose this one for now. Once you click deploy, wait a few minutes for the server to be created.

Next, download PuTTY from this link. This is the program you will use to connect to your server and run commands. Open the file once it’s done downloading, and set it up like this

Host Name (or IP Address): the IP address given to you by Vultr on the “servers” page
Port: 22
Saved Sessions: in this box, type a name for your server like “MTA”

After that, click Save, then click Open

Once you click that, a window should pop up and ask you for a password. This is the root password of your server, and will have been emailed to you by Vultr (or you can click on your server in the control panel, and click the eye next to Password.

Once you’ve logged in to your VPS you should see something similar to this

root@vultr:~#

If you see that, move onto the next step. If not, try again or post a comment below and I will try to help.

Setting up the VPS

Note: to paste something in PuTTY, just right click inside the window

 

Now we need to update our server and install some things. First, you may want to change the password.

To change your password type passwd and press enter. Then it will ask you to choose a password, and after pressing enter it will ask you to confirm it. Type it in again and press enter, it should say passwd: password updated successfully

Next, run the following command to update your server and install unzip (to unzip some files), nano (a commandline text editor which we will use later), screen (used to run MTA:SA in the background when you disconnect from the server) and unattended-upgrades (to help keep your server secure)

apt-get update && apt-get -y dist-upgrade && apt-get -y install unattended-upgrades unzip nano

If you used Vultr, it will most likely be updated and already have some of these installed.

Installing MTA

Note: to paste something in PuTTY just right click inside the window

Now is the bit you really care about. Download and extract the MTA:SA server files by copy and pasting the following command into PuTTY, then press enter.

wget http://linux.mtasa.com/dl/152/multitheftauto_linux_x64-1.5.2.tar.gz && tar -zxvf multitheftauto_linux_x64-1.5.2.tar.gz && rm multitheftauto_linux_x64-1.5.2.tar.gz

Next we want to do the same thing with some default config files. Copy and paste the following command and press enter

wget http://linux.mtasa.com/dl/152/baseconfig-1.5.2.tar.gz && tar -zxvf baseconfig-1.5.2.tar.gz && mv baseconfig/* multitheftauto_linux_x64-1.5.2/mods/deathmatch && rm -rf baseconfig && rm baseconfig-1.5.2.tar.gz

And finally we want all of the default resources, so we’ll create the folder, change to that folder, then download and extract them with the following command

mkdir multitheftauto_linux_x64-1.5.2/mods/deathmatch/resources && cd multitheftauto_linux_x64-1.5.2/mods/deathmatch/resources && wget https://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip && unzip mtasa-resources-latest.zip && rm mtasa-resources-latest.zip

Configuring MTA

Now let’s configure it!

Type in the following command and press enter to open the main server config file

cd ~/multitheftauto_linux_x64-1.5.2/ && nano mods/deathmatch/mtaserver.conf

Now the file is open with nano and we can edit it! Use the arrow keys to move around, and then use it like a normal text editor (backspace to delete, etc.)

The main thing you will want to change is <servername>Default MTA Server</servername>

The bit you want to change is inside the <servername> and </servername> tags, so change it to something like this

<servername>My own MTA:SA server!</servername>

You can also go through and change FPS limit, number of players, etc.

Once you’ve made all of your changes hold Ctrl and press X to save it. It will confirm you want to save it so type Y and press enter.

Now we can start the server

Starting your MTA server

We want to keep MTA running when we disconnect from the server, so we need to use screen. Enter the following command and press enter

screen -S mta

Now we’re inside a screen session. Type the following command and press enter to start MTA

./mta-server64

Wait a few seconds and MTA will now be running.

To leave it running in the background, hold Ctrl + A together, then Press D at the same time.

To then enter the screen session again, type the following command and press enter

screen -r mta

Next we’ll create an admin account

Creating an admin account

Now the server is running, and we can type commands in the MTA console (black screen with the green bar at the bottom) we’ll create an admin account. Enter the following (replacing yourusername and yourpassword) and press enter

addaccount yourusername yourpassword

The server should reply with the following (ACCOUNTS: Console added account ‘yourusername’ with password ‘yourpassword’)

Now, we need to give ourselves admin permissions, so enter the following command and press enter

shutdown

Then type the following command and press enter

nano mods/deathmatch/acl.xml

We’re in nano (the text editor) again. Using the arrow keys to navigate, find the section starting with <group name=”Admin”>

Once you’ve found this, within the section you should see <object name=”resource.admin”></object>

We need to create another object for our user, so in the same section (above or below the other <object> tags) add this, replacing yourusername with your actual username

<object name=”user.yourusername”></object>

Once you’ve added that, hold Ctrl and press X to save it. Type Y then press enter.

Now we can start the server back up. Enter the following command and press enter

./mta-server64

Now we want to leave it running in the background again, so do the following

Hold Ctrl + A, then press D

Aaccessing the admin panel in-game

Note: NEVER give your admin password to anyone. Only ever enter it in the command panel when logging in, make sure you don’t enter it in the chat at all

Now you can disconnect from the server and join your server in MTA! The server address will be the following (replace yourIP with your actual IP)

mtasa://yourIP:22003

Once you’re connected to your server in-game, open the console by pressing F8 and login with the following command (replacing yourusername and yourpassword)

login yourusername yourpassword

Now you’re logged in to your account with admin access, press P in-game to bring up the admin panel, where you can configure everything on the server easily 🙂

Thanks for reading this guide, and if you want to help me, as well as have a great experience on your own MTA server, considering using Vultr as the host and signing up with this link

If you have any issues at all, leave a comment below and I will try to get back to you!

How to remove “Based on your viewing history” from Twitch

It seems in the last few weeks Twitch decided it was a good idea to add this useless feature to your followers page, but thanks to Dragor2 (from Reddit) there is a solution.

First of all you will need an Adblocker installed (I use Adblock Plus) and then you just need to simply add this filter

www.twitch.tv##DIV[class="videos-grid items-grid"]

To do this with Adblock Plus, simply right click on the ABP icon, click options, click Add your own filters and then type in the code above and click Add filter.

Now you should get the usual “live channels” and “live hosts” only.

How to run a Gmod server on a Linux VPS

About Gmod and this guide

Gmod (or Garry’s Mod) is a sandbox physics game based on the Counter-Strike: Source engine. The game places you in an empty world with access to items from Source games, and you can do/build anything you want.

This guide will show you how to set up Gmod

What is required?

The only thing you need is a Linux VPS running Debian (or Ubuntu) with at least 512MB RAM (preferably 1GB), a good CPU core (especially a host that allows you to utilise it) and a good connection speed (at least 10mbps up). At least 10GB HDD space for extra maps, mods, etc.

Since many hosts ban gameservers and/or don’t allow you to use a lot of CPU, I would recommend using Vultr since I have used them before and I am very happy with the performance and price. You can also check this thread for any Vultr coupons/offers.

Configuring the VPS

First, we want a clean VPS, so run the following command and hit enter

apt-get remove --purge -y apache2* bind9* sendmail* vim vim-* samba*

Then we want to upgrade everything and also installed some required libraries so run the following command as well and hit enter

apt-get update && apt-get -y dist-upgrade && apt-get -y install lib32gcc1

Then we’ll create a Gmod user so it’s not running as root. Run the following command and hit enter

adduser gmod

Now choose a secure password, and fill in the rest of the info (you can just press enter and leave everything (except the password) blank if you want).

Now log out, and log back in with the gmod user.

Installing Gmod

Before installing Gmod, we need to install the Steam client, so run the following command and press enter

mkdir ~/bin && cd ~/bin && wget http://media.steampowered.com/client/steamcmd_linux.tar.gz && tar -zxvf steamcmd_linux.tar.gz && ./steamcmd.sh +login anonymous +quit

Once that’s installed, we can download and install Gmod. Run the following command which will change to the home directory, download a shell script (you can open this in any text editor to check what it does first) and then run that shell script, which will download Gmod to the gmod folder. Press enter after,  and it will show you the progress of the dowload.

cd ~ && wget http://ehwtf.com/gmod/update_gmod.sh && chmod +x update_gmod.sh && ./update_gmod.sh

Starting Gmod

To start Gmod, and keep it running after we disconnect from the VPS, we need to start it in a screen session.

Run the following command and press enter

screen -S gmod

Then, once you’re in a screen session, run the following command and press enter to start the server.

~/gmod/srcds_run -game garrysmod +maxplayers 12 +map gm_flatgrass

Note: changing the number after +maxplayers will change the max player limit. Also, after +map you can choose specify the map. The default maps installed are gm_flatgrass (flat area) or gm_construct (small area with some buildings)

Once the server is running, hold down the Ctrl and A button, and then while doing that, press D on your keyboard. You can then log off your VPS

Stopping and restarting Gmod

To stop Gmod, you need to re-enter the screen session, so enter the following command and press enter

screen -r gmod

Now, to stop Gmod press CtrlC

Then type the following command and press enter

exit

To start the server again, follow Starting Gmod section above.

Any issues/errors

If you have any issues, please leave a comment below. I will do my best to reply.

How to set up a Linux VPS to be used as a seedbox

What is a seedbox?

A seedbox is a private server used for uploading and downloading digital files. Since VPSes are cheap and usually connected with speeds of 100mpbs and above they make great budget seedboxes.

What software and configuration is required?

The software installed with this guide will be rTorrent (a command-line torrent client), ruTorrent (a web interface for rTorrent), lighttpd (a webserver used to access ruTorrent), PHP (required by ruTorrent) and Screen (required for running rTorrent in the background)

Removing default apps and upgrading

Since we’re going to be using this VPS for torrents and will install lighttpd, we can remove the pre-installed webserver, mailserver, etc.

To do this, enter the following command and press enter

apt-get update && apt-get remove --purge -y apache2* bind9* sendmail* samba* && apt-get -y autoremove && apt-get -y upgrade

Sometimes, sendmail doesn’t get fully removed, so once that has finished, press the up arrow on your keyboard (which repeats the previous command, without submitting it) and then press enter and let it run again.

Installing and setting up the required apps

To install the apps we need, enter the following command and press enter

apt-get install -y screen rtorrent lighttpd php5-cgi php5-cli curl ffmpeg mediainfo unrar nano && lighty-enable-mod fastcgi-php auth

Setting up the folders

We need a folder for current torrents (session), a folder for ruTorrent to watch (watch) for new torrents, a folder for ruTorrent (/var/www/t) and a folder for the downloads (/var/www/d) so run the following command to create these folders

cd ~ && mkdir rtorrent && mkdir rtorrent/watch rtorrent/session /var/www/t /var/www/d

Installing ruTorrent

Run the following command to install ruTorrent into the /var/www/t folder

cd /var/www && wget https://github.com/Novik/ruTorrent/archive/master.zip && unzip master.zip && rm master.zip && mv ruTorrent-master/ t && chmod 0777 t/share/settings t/share/torrents

Starting rTorrent

We need to run rTorrent in a screen session so it will continue to run when the connection to the VPS is closed. Run the following command

cd ~ && screen -S rt

Then, you’ll have be in a screen session so type the following

rtorrent

Then, hold Ctrl + A and press D which will disconnect the screen session and leave it running in the background

Securing your webserver

Of course, we don’t want everyone accessing ruTorrent and our downloads, so we need to password protect the folders

Run the following command

cd /etc/lighttpd/conf-enabled && rm 05-auth.conf && wget ehwtf.com/seedbox/05-auth.conf && nano /etc/lighttpd/lighttpd.user && /etc/init.d/lighttpd restart

It will then bring up a blank white window

Head to this site and generate a htpasswd file (delete everything in the left hand box and type in admin (space) yourPasswordHere then click Generate htpasswd content)

Copy everything from the box on the right hand side (example: admin:$apr1$sgwrguwr$egrrrhr) and then go back to PuTTY, press Ctrl + X then type Y and then press enter

Now we just need to make sure we can see a list of files when we access the torrents folder. Enter the following command

echo ‘dir-listing.activate = “enable”‘ >> /etc/lighttpd/lighttpd.conf && /etc/init.d/lighttpd restart

Finished

To test it, access your webserver like this

http://YOURSERVERIP/t

It should ask you for a username and password. Use admin and the password you chose earlier. You should then be able to use ruTorrent. To see downloads, just go to the following address

http://YOURSERVERIP/d

If you find any problems, or it doesn’t ask for a username/password, please leave a comment and I will try to help.

How to set up a GUI (Xfce) and RDP on a Linux VPS

About this guide

One major noticeable difference between a Linux server and a Windows server is the fact that a Windows Server usually has a GUI, and a Linux server usually has no GUI.

This guide will talk you through the steps of setting up a GUI on your Linux VPS, as well as VNC and Xrdp so you can access the machine easily from your Windows machine without additional software.

The guide is written with Debian in mind but should also work on Ubuntu. I recommend having at least 256MB RAM on your machine, but preferably more than 512MB.

If you don’t have a VPS already, and are looking for something cheap yet reliable with high performance, I highly recommend Ramnode and you can read why here. If, on the other hand you just want a cheap Windows VPS, you can read my guide on how to add a Windows ISO to Vultr.

We’ll need to log into the VPS through SSH to issue the commands, so if you’re not sure how to do that, you can read how in the beginning of my guide here.

Removing default apps and upgrading

If you’re going to be using this VPS purely for web browsing, word publishing, etc. then we can remove the pre-installed webserver, mailserver, etc.

To do this, enter the following command and press enter

apt-get update && apt-get remove --purge -y apache2* bind9* sendmail* samba* && apt-get -y autoremove && apt-get -y upgrade

Sometimes, sendmail doesn’t get fully removed, so once that has finished, press the up arrow on your keyboard (which repeats the previous command, without submitting it) and then press enter and let it run again.

Installing Xfce (GUI) and Xrdp

Now, we’re going to install Xfce which will provide a graphical user interface on your VPS, as well as xfonts, tightvncserver and Xrdp which are needed to connect remotely. To do this, simply run the following command

apt-get update && apt-get -y install xfce4 xfonts-base tightvncserver xrdp

Finished

You should now be able to connect with RDP. Just enter the IP address and connect.

If you have any issues or questions, leave a comment below.

How to set up a VPS to host websites without a control panel

About VPS hosting and this guide

When it comes to hosting a website, there are three options. Shared hosting, VPS hosting and dedicated server hosting.

Shared hosting is the most basic and fine for very small low-traffic websites, but sometimes you want that extra bit of control over your website without having to pay the cost of renting a dedicated server. This is where a VPS (virtual private server) comes in. You get full root access to a virtual machine, which is fully isolated and therefore acts like a dedicated server, but is much cheaper!

Since the price of hosting has come down in price so much lately, if you don’t mind putting in a little effort, it’s often more cost-effective to get a VPS than shared hosting.

This guide will go through the steps of setting up and securing your VPS, as well as installing a webserver (Lighttpd), a database server (MySQL) and some other things required to run most websites (like PHP and phpMyAdmin).

Purchasing a VPS and setting up PuTTY

One of the best and most highly recommended VPS hosts is Ramnode. They offer VPS hosting for as low as $15/year (including 128MB RAM, 64MB VSwap, 12GB pure SSD disk space and 500GB bandwidth). For further information you can read my post on Why Ramnode is the best VPS provider. I also recommend Vultr if you’re looking for more locations worldwide!

This guide will assume you’re using a VPS from Ramnode running Debian, but it should work with any VPS running Debian or Ubuntu.

The first thing you need to do is purchase your VPS. It should ask you to choose an operating system, so Once you’ve done this, you should receive an email from your host with your server’s IP and root password.

If you’re using Windows, you will also need to download PuTTY (choose putty.exe from the list). If you’re using Linux or OSX on your local machine you don’t need this.

Once you’ve downloaded PuTTY, open it up, and in the Host Name box, enter your server IP. Then, under Connection on the left click Data and in the Auto-login username box type in root.

Then, click Session on the left and click Default Settings. Then click Save (so you don’t have to enter this every time) and finally click OK.

If you use Linux or OSX, instead of using PuTTY, just open up a terminal and enter ssh [email protected] (where xxx.xxx.xxx.xxx is your server’s IP address).

You should now have a screen which says:

Using username “root”.
[email protected]’s password:

Just enter the root password you were given and press enter. You should now see the following:

root@yourserverhostname:~#

Setting up the VPS

Once I’ve logged into a recently set up VPS, I always like to change the password before anything else.

Enter passwd and press enter.

Enter a new password, press enter and then enter your new password again to confirm it. Of course, next time you log in (using the steps above) you’ll need to use this password.

The next thing we’re going to do is remove some applications we don’t need or want, and update everything else.

Type the following commands into PuTTY/terminal and press enter.

apt-get update && apt-get remove --purge -y apache2* bind9* sendmail* samba* && apt-get -y autoremove && apt-get -y upgrade

Sometimes, sendmail doesn’t get fully removed, so once that has finished, press the up arrow on your keyboard (which repeats the previous command, without submitting it) and then press enter and let it run again.

Now it’s time to start installing things, so enter the following command and press enter. During this stage, you’ll be prompted for a MySQL password.

apt-get install -y lighttpd php5-cgi mysql-server php5-mysql fail2ban unattended-upgrades

Once this has been completed, enter the following command and press enter to enable PHP and restart the webserver

lighty-enable-mod fastcgi-php && /etc/init.d/lighttpd restart

Next, we need to replace the MySQL config file with one which uses less memory and then restart MySQL. Enter the following command and press enter

mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bk && cp /usr/share/doc/mysql-server-5.5/examples/my-small.cnf /etc/mysql/my.cnf && /etc/init.d/mysql restart

Installing phpMyAdmin

If you’re using a PHP/MySQL script, you’ll probably want phpMyAdmin to help you set up the database. This is easily done. First, enter the following command and press enter

cd /var/www/

Now go to the phpMyAdmin download page and find the latest version ending in .tar.gz. Right click on the link and choose copy link address. The end of the link will have something like #!md5!79f36ee849381ad93c71f7cbbd5ef2a9 so remove this, including the hash, and then add the link into the command below where specified (including the quotes) and press enter

wget --no-check-certificate https://your-link-here.com/file.tar.gz

It will then download a .tar.gz file to your server. It will be something like phpMyAdmin-4.4.9-english.tar.gz. Now we will extract the files and remove this file. Enter the following command, replacing yourfile.tar.gz with the actual name of your .tar.gz file and press enter.

tar -zxvf yourfile.tar.gz && rm yourfile.tar.gz

You will then be left with a folder named something similar to phpMyAdmin-4.4.9-english depending on the version you downloaded. You can now access this by going to the following link where xxx.xxx.xxx.xxx is your server IP and foldername is the name of the phpmyadmin folder. I would advise renaming this to something of your choosing, just to avoid bots which actively look for phpMyAdmin installations.

http://xxx.xxx.xxx.xxx/foldename

Keeping everything updated and setting up your sites

That’s it! You now have a fully working VPS with a webserver (lighttpd) and a database server (MySQL) along with PHP  and phpMyAdmin installed. We also installed fail2ban to help protect us against bots trying to guess our SSH password, and unattended-upgrades to install critical updates automatically.

However, you should also log into your VPS often and run the following command to make sure everything is updated

apt-get update && apt-get -y upgrade

To install your sites/scripts (WordPress, phpBB, etc.) you need to move them into the /var/www/ directory. This is the root folder for lighttpd and the files/folders in here are what you see when accessing the following (where xxx.xxx.xxx.xxx is your server IP)

http://xxx.xxx.xxx.xxx/fileorfolder

Finished

That’s it! Now you can actually set up your websites. If you have any issues please leave a comment below.

Thanks for reading.

How to install Windows 10, Windows 7, 8, Windows Server 2008, 2012 on Vultr as a custom ISO

Note: I want this guide to be simple, while also allowing anyone to follow it, regardless of their technical skills. If you have any issues, or any ideas that could improve this guide for yourself and others, please leave a comment!

Update: I have a ready made Server 2008 ISO available for download

You can download a ready made ISO of Windows Server 2008 from here

Note: This is NOT activated or cracked in any way. It is a 180 day trial version downloaded directly from Microsoft with VirtIO drivers integrated (downloaded from the Fedora Project), just like this guide shows you how to do.

If you don’t have a Vultr account already, please consider signing up with this link to help support me and my future projects 🙂

Thanks

About Vultr and this guide

Vultr is a Digital Ocean competitor which offers cheap, KVM based VPSes across Europe, Asia and North America.

One major advantage Vultr has over Digital Ocean is the fact they allow custom ISOs, so we can use Vultr as a cheap Windows VPS in almost any part of the World. However, with Windows you need to integrate VirtIO drivers into the ISO before you can install it. In this guide I will explain how to do this easily. I am going to assume that you are able to access/download an original Windows ISO.

The first thing you will need to do is sign up to Vultr. You can sign up by using this link. You can also check my post on Vultr coupons to get some free credit.

Next, we’re going to create integrate the VirtIO drivers into the ISO, and upload it to Vultr. The ISO will be about 3GB, so if you have a slow internet connection it would take a long time to upload. To speed up the process and make it easier, we can integrate the drivers on a Vultr instance, and take advantage of the gbit connection for just a few cents (as we only need the instance for an hour or two).

Note: If you have a fast internet connection, you can integrate the drivers on your own computer and skip this next part.

Spinning up a Vultr instance (if you have a slow internet connection)

Once you have created a Vultr account and made a deposit, go to the Deploy tab and choose a location close to you, then for the Operating System choose Windows 2012 R2 x64) and click Place Order.

Note: this will show up as being more expensive due to the license costs, however since we only need it for a couple of hours, it will only cost around $0.10.

Once the VPS is setup (this will take a minute or so) you can click Manage and then View Console to finish setting up Windows.

When this is complete, you will have access to a Windows desktop (note: the default password wlll be shown in the Vultr control panel) with a 1gbit connection. The next thing to do is enable downloads, so you can download the original ISO.

Once Windows has finished installing, and you are logged in, open Internet Explorer then go to Settings (the little cog top right) then Internet Options then Security then Internet then click Custom Level.

Then, in the list find File Downloads and click Enable. Then find Allow Scripting and click Enable. Then click OK and restart Internet Explorer. You should now be able to properly browser the web and download files.

Once you’ve done this you can proceed to the next step.

Downloading, modifying and preparing the ISO

Now the explanation and boring parts are over with, here’s what you’re really looking for.

The first step is to get an original copy of the Windows OS you want (this guide is confirmed to work with Windows 10, Server 2008 and Windows 7). It should be a 64-bit (x64) ISO. You can either insert the DVD into your computer and copy the files over from My Computer, download an ISO from Microsoft (you will need a serial key for this) or if you just want a trial version, you can find it on a torrent site (note: make sure it’s a reputable upload from a reputable user on a reputable site).

If you have a disc, simply copy the files into a folder on the desktop called Windows. If you have an ISO, then you can install WinRAR and extract the files from the ISO (extract them into a folder and rename the folder to Windows).

Next, download the VirtIO ISO from here. Once the ISO has downloaded, extract the files using WinRAR into a folder called VirtIO and copy the VirtIO folder into the Windows folder.

Building the ISO

Now you have done most of the hard work, it’s time to build the ISO and upload it to Vultr. To build the ISO, we will use ImgBurn so download and install it from here.

Once it’s installed, open it up and choose Create image file from files/folders.

Then, to the right of Source click on the folder icon with a magnifying glass and navigate to your Windows folder (the one you extracted the ISO to).

Click the same icon next to Destination and choose a location for the ISO. Call it something like WinVirtIO.iso

Then click on the Options tab and set File System to UDF.

Then click on the Labels tab and next to UDF type WindowsVirtIO.

Then click on the Advanced tab and click Bootable Disc.

Enable the following options

  • Emulation Type: None (Custom)
  • Boot Image: (click the folder icon, navigate to your Windows ISO folder and choose etfsboot.com in the boot folder.
  • Developer ID: Microsoft Corporation
  • Sectors To Load: 8

Then click Build (the image with the folder and an arrow pointing to a DVD) and wait for it to finish.

Uploading the ISO to Vultr

Now you have the ISO, download Mongoose Web Server from here and place the .exe file in the same folder as your new ISO (WinVirtIO.iso). Once you’ve done that, double-click on it and it will take you to a webpage with a list of files on. Your ISO should be in the list.

After that, go to the Windows Control Panel then click Windows Firewall then Allow programs to communicate through Windows Firewall then Allow another program then Browse then navigated to mongoose.exe and click Add.

Now, from your local machine, access http://<YOUR VULTR IP>:8080 and see if it loads your files. If you can see your ISO, it’s working.

Now, log into the Vultr control panel, go to My Servers, then ISOs, then in the Remote URL box enter the following:

http://<YOUR VULTR IP>:8080/WinVirtIO.iso and click Upload.

Installing the custom ISO

Once the ISO has finished installing, you’re ready to deploy an instance. Go to the Deploy tab, choose your location, then for Operating System choose Custom and select your ISO from the dropdown menu.

After about a minute, click Manage then View Console and wait for the installation screen. Select your language, and click OK.

Latest VirtIO

When it asks what type of installation you want, choose Custom (advanced) then click Load Driver, then Browse and navigate to your the VirtIO folder (on the DVD), then expand viostor and then WIN7 (or WIN8.1 for Windows 10 and WIN8 for Windows 8, Server 2012) and click AMD64 then click OK.

After that, select the Red Hat VirtIO driver from the list and click Next. Once Windows has been installed, you will need to go into the device manager (type devmgmt.msc in the search bar next to the Windows button on the taskbar and press enter).

Then right click on the ethernet adapter (with an exclamation mark next to it) go to update driver software then Browse then navigate to the Windows DVD (usually D:), then your virtio folder, then NetKVM then WIN7 (or WIN8 for Windows Windows 10, Windows 8, Server 2012) and click AMD64 then click OK.

Older VirtIO

When it asks what type of installation you want, choose Custom (advanced) then click Load Driver, then Browse and navigate to your VirtIO folder (on the DVD), then expand WIN7 (or WIN8 for Windows Windows 10, Windows 8, Server 2012) and click AMD64 then click OK.

After that, select both Red Hat VirtIO drivers from the list (hold Ctrl down on the keyboard while you click on them) and click Next.

After that, continue the Windows setup like normal.

Finished

That’s it, you’re all done. Enjoy your cheap Windows VPS, and if you have any issues please leave a comment below.

Thanks for reading.