Forex Verified's Tips To Set Up a New VPS ARTICLES

Note: Every VPS vendor and Operating System is unique in their login instructions but I will try to cover popular scenarios in this tutorial. The below instructions are based on my memory of past experience for various VPS vendors. The "tweaks" I perform vary from one VPS vendor to another, depending on how many of these things the vendor already did, which operating system is being used, or what exactly I want to accomplish.

  1. Visit the IP address in your web browser to obtain the special RDP file. (example: ).

  2. Download the Remote Desktop Shortcut using the instructions on that page.

    The only thing special about the RDP shortcut is that it locks you into the console session in Windows.

  3. After saving the RDP file to your desktop: Right-click the new file, click Edit, click Display and set the preferred screen size. I use 1024x768 but some people prefer Full Screen windows.

  4. Click "General", enter the username "Administrator" and check the box to "allow me to save credentials".

  5. Click "Save" then "Connect". A new box will pop up asking for the password so that it can be saved and not requested every time you log in.
You should now be logged into your VPS.

Note: CNS offers an "Install VNC" option during the checkout that I have never used. I *do* prefer VNC when using Windows Server 2003 but I have always used my own copy of RealVNC Enterprise. I'm not sure which brand/version of VNC is installed by CNS or what instructions they send post-setup but using VNC is certainly a viable alternative to RDP.

  1. Click the link or follow the instructions to download the special "beeksfx_launcher.exe" file. This is a proprietaray program that they created that automatically generates and launches an RDP connection tied to the console session. Unfortunately this file does not remember your password (last I checked).

  2. Login using the default password and then follow the instructions to change it. Select a password that is both secure (contains an upper case letter and a number) but also easy to type.
You should now be logged into your VPS.
  1. Click the "General" tab. Enter the username (such as 'Administrator' or 'vps-user').
  2. Check the box to allow it to remember your password.
  3. Click the "Display" tab and set your preferred screen size (I use 1024x768 but some people prefer full screen).
  4. Click the "Local Resources" and enable the sharing of your C: drive for easier file uploads.
  5. Go back to the "General" tab and click "Save" or "Save As" and save this RDP file to your desktop so it's easy to connect later. Then click "Connect" and enter your password so the system can remember it.
You should now be logged into your VPS.

Download updates and perform desired VPS "tweaks".

Windows Security Updates are a no brainer but you may not realize something. Often, the default setting for Windows Update is to download + install updates automatically, which will result in your VPS being restarted without you realizing it. The default settings can vary based the vendor.

  1. Click Start -> All Programs -> Windows Update

  2. Click "Change Settings" in the left-hand menu.

  3. From the drop-down box select "Download updates but let me choose whether to install them".

  4. Click "OK" and then go ahead and download/install all the available updates. There might be a lot of them and you may have to do it a few times to get them all (depending on the vendor). You may also need to restart the VPS inbetween some of the updates.
Once all the updates are installed, CHECK THE SETTINGS AGAIN to make sure it's still set to "Download updates but let me choose whether to install them", just in case it was changed. This will allow you to install updates and restart the VPS on weekends (or whenever you choose to), rather than mid-week while the market is open.
Port 3389 is the default RDP port used by Windows Server (all versions). Since many people use insecure passwords, hackers use software that scans the internet (literally every possible IP address) to find servers that respond to port 3389. Then they hit those servers 24 hours a day with dictionary password attempts. This continues for days, weeks, months or even years until they eventually gain access to your server.

It's easy to stop. Simply change the RDP port away from 3389 to some other port. Some vendors (Beeks, 4xHosting) already default their servers to other ports so you don't have to worry about it. Some (CNS) have an easy utility for randomizing the RDP port which will also email you an updated copy of your RDP file.

To change the RDP port manually, you can use Microsoft's instructions but don't forget to update your firewall settings first! Do it in this order:

  1. Go to your Firewall advanced settings. Create a new inbound rule to "allow" connections on the new port #.

  2. Update the registry and define the new port #.

  3. Restart the server and reconnect (using the new port). Then go back to the Firewall advanced settings and DELETE the rule that allows connections on port 3389.

  4. Now that the firewall is blocking 3389, hackers will not attempt to crack your RDP because your server won't even respond to their pings. Not only is this good for security, but also your CPU resources.

When you change your RDP port, you will use a new IP address format when you log into the server with RDP. It will look like this:

The ":4567" portion indicates which port it should connect to, since you are no longer using the default 3389.

  1. Click the "General" tab. Enter the username (such as 'Administrator' or 'vps-user').
  2. Check the box to allow it to remember your password.
  3. Click the "Display" tab and set your preferred screen size (I use 1024x768 but some people prefer full screen).
  4. Click the "Local Resources" and enable the sharing of your C: drive for easier file uploads.
  5. Go back to the "General" tab and click "Save" or "Save As" and save this RDP file to your desktop so it's easy to connect later. Then click "Connect" and enter your password so the system can remember it.
You should now be logged into your VPS.
If you have selected a secure password, you may not want to change it every 14-30 days (a default security features in Windows Server). The default setting will vary by VPS vendor, but here is how to set your Windows password to "never expire".

  1. Click Start -> Right-click "Computer", click "Manage". It may take a few seconds for the next window to come up.

  2. When it does, click the + symbol next to "Configuration".

  3. Click the + symbol next to "Local Users and Groups", then select "Users".

  4. Right-click on your username (perhaps "Administrator" or "vps-user") and click "Properties".

  5. Put a checkmark in the box next to "Password never expires". Click OK and you're done.

To change your Windows password, you can come back to this window. When you right-click the username, instead of selecting "Properties" select "Set Password" instead.

My only pet peeve with Windows 7 and Server 2008 is the removal of the QuickLaunch Toolbar (the one that belongs next to the Start button). It's not easy to restore it but it's always one of the first things I do.

Note that one of the folders in the heirarchy above Quicklaunch is a 'hidden' folder, so you can't browse to the correct folder without having hidden folders shown. I usually copy and paste the path to the folder so I don't need to browse, but the path can vary depending on VPS vendor or operating system.

  1. Right-click the Taskbar, hover "Toolbars" and click "New Toolbar".

  2. At the top of the window in the address bar, paste the path to the Quicklaunch folder. It could be one like these (note the difference in the username):

    • c:\users\Administrator\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch
    • c:\users\vps-user\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

  3. Hit "Enter" to finish entering the path after you paste or type it. Then click the "Select Folder" button. You should see a new toolbar in your taskbar titled Quicklaunch.

  4. Right-click in the toolbar and uncheck "Show Title". Goodbye unnecessary title.

  5. Right-click in the toolbar and uncheck "Show Text". Goodbye unnecessary text.

  6. Make sure "Lock the Taskbar" is unchecked and you can drag the toolbars around so they are placed however you like them. I like to put the quicklaunch bar next to the Start button where it belongs. Then lock the taskbar to prevent them from being moved accidently.

  7. In the quicklaunch toolbar I like to delete everything except Show Desktop and Internet Explorer, since those are the buttons I use all the time.

  8. My favorite step: Un"pin" everything that was pinned to the taskbar. I hate that feature.

  9. Right-click the taskbar, select "Properties".

  10. Check the box next to "Use small icons". Change "Taskbar Buttons" dropdown to "Never combine". click OK.

  11. This will show the program's title in the taskbar instead of just a single grouped icon. This is necessary for managing lots of Metatrader 4 installations. I do this on my Windows 7 PC as well.

The Windows Hibernation feature is a type of "sleep" that basically allows your PC to shut down while remembering the "state" that it was in (which software was open, etc). When your PC is powered back on, it retrieves the last state and resumes where you left off. It's basically a faster way of booting up your PC.

However, the hibernation file on the hard drive (hiberfil.sys) takes up a significant amount of space (4-8GB). While this is no big deal for a PC, it can represent a significant portion of your VPS's hard drive space. You can disable Hibernation and delete the hiberfil.sys file with a single command:

  1. Click Start and then "Run".

  2. In the "Run" box type:    cmd    and press Enter

  3. A command prompt will open (black screen with white letters). Type the following command:

         powercfg -h off

    and press Enter.
This will disable hibernation and delete the hiberfil.sys file.

By default, Windows Server runs a lot of services that we (Forex traders) don't need and won't use. Disabling these services can free up RAM and CPU usage and help the VPS to run more efficiently. Disabling these services is not required! I have simply found these services to be unnecessary and disabling them is helpful in speeding up the VPS.

To open the window for managing services, click Start then "Run" and type the command:


This will open the Services window with a list of all services that are available on the VPS (whether or not they are started and running). To adjust the settings for a service you can right-click on it and click "Properties".

Each service has 3 startup options:

  1. Automatic (delayed start)
  2. Automatic
  3. Manual
  4. Disabled

Here are a list of unnecessary services (in my experience) that I like to DISABLE.

  • Application Experience
  • Certificate Propagation
  • Desktop Window Manager
  • Diagnostic Policy Service
  • Diagnostic System Host
  • Function Discovery Resource Publication
  • IP Helper
  • Multimedia Class Scheduler
  • Print Spooler
  • Remote Registry
  • Secondary Logon
  • Windows Error Reporting Service
  • Windows Remote Management
  • KtmRm for Distributed Transactions

Here are some services that MAY be needed at times, but do not need to be started automatically. I set these to MANUAL. This means they'll start up if they're needed, but otherwise they'll remain stopped.

  • Com+ Event System
  • Distributed Transaction Coordinator
  • IKE and AuthIP IPsec Keying
  • IPsec Policy Agent
  • Microsoft .Net Framework NGE
  • System Event Notification service
  • Workstation

When your VPS is restarted (either on purpose or after a crash), it boots up to the login screen where the username and password must be entered. Until Windows is logged in, Metatrader 4 cannot be started. This is why traders like to set Windows to automatically log in.

Some vendors have a program available to enable automatic login and automatic starting of Metatrader (such as CNS's AutoBoot). If you don't want to use AutoBoot or if you have a VPS from another vendor, setting Windows to automatically log in is as easy as editing a registry entry.

But since editing registry entries is not easy, we wrote a small utility called SetupAutoLogin.exe to do it for you. Save this file on your VPS's desktop and double-click it to run it.

This software assumes the username is "Administrator". If your VPS's username is anything else, this software won't work.

If your VPS has a username other than Administrator, you can still create an easy script to take care of this. Copy and paste this text into a notepad window on the VPS:

Windows Registry Editor Version 5.00
; Set Automatic Logon
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

Change the red text to your actual username and password. SAVE the text document with a .reg extension. For example, save it as "autologon.reg". When you double-click this file, Windows will confirm that you want to add the script to the registry. Say yes and you're done. (Note: this script is also included in the zip file of scripts offered below.)

Note: Metatrader 4 platforms can only be automatically launched upon Windows logon. You must set Windows to automatically logon in order for this to work.

  1. Click Start, then Right-Click on "All Programs".

  2. Click "Open All Users". This opens a Windows Explorer window for your start menu.

  3. Browse to Programs, then the "Startup" folder.

  4. COPY any Metatrader 4 shortcuts from your desktop into this folder (be sure to 'copy' and not 'move' the shortcuts).

  5. Restart the VPS to test it. Wait a few minutes (for the VPS to restart) and when you log in again, you should see Metatrader 4 already up and running.

    • If MT4 is not running, it means the shortcut was not copied to the Startup folder properly.

    • If MT4 wasn't running but launches immediately after you log into the VPS, it means that the shortcut is in the Startup folder, but Windows did not logon automatically after the VPS restarted! Check your Windows logon settings.
Sometimes third-party software is available for this purpose. If you use a CNS VPS, you can use the AutoBoot software. Since we have run up to 20 platforms on a single VPS, Forex Verified had special software created that automatically launched all the platforms (but only one at a time to prevent conflicts). For most users, the Startup folder works fine.

Some Expert Advisors depend on DLL files in Windows that are not installed by default. These DLL files are often found in the Visual C++ Runtime Files pack from Microsoft. If you have an Expert Advisor that simply "doesn't work", this could be the reason. I always install both the 2008 and 2010 runtime files to cover the dependancies of most Expert Advisors.

Here are the download pages at the Microsoft website. Download the "x86" (32-bit version) even if you have a 64-bit VPS. Metatrader 4 and Expert Advisors are 32-bit programs that will use the 32-bit versions of these DLL files.

This is a quick and easy way to hide all the Program Files folders that you'll never use, making the Metatrader 4 installation folders super easy to find and access.

  1. Go to the Program Files (or Program Files (x86)) folder.
  2. Highlight all of the folders. Right-click on one and select "Properties".
  3. Check the box next to "Hidden".
  4. Click "OK" and then change the selection to "Apply only to selected items" (not all sub-folders and sub-items!)
Don't delete these program folders, just hide them! :)

Here are some other miscellaneous things that I do on a VPS:

  • Disable the Screen Saver (especially if you're connecting using VNC)

  • Set the Internet Explorer home page to a fast-loading page (not, ugh!) such as the Forex Verified Links Page. We don't update this Links page very often (oops) but it can be a quick and handy resource for MT4 installation files.

  • Defragment. Everyone has a different opinion about defragmenting in a VPS. Technically speaking, your VPS has a "virtual hard drive" that exists as a single file on the hardware node's hard disks. That large single file should be defragmented, but that's handled by the hardware node. So-called "fragmentation" in your VPS may or may not actually affect the performance of the VPS because the fragmentation is not real: it's virtual. Either way, I like to defragment every few months just in case it helps.

Because of the performance testing we do, I have gone through the process of setting up dozens (maybe hundreds?) of servers. I wrote some scripts that help me automate some of the tasks that I suggest on this page. I've bundled all of the scripts together in a zip file that I am making available for download here.

WARNING: These scripts may not have been tested on all types of VPS from all vendors. Use at your own risk. These scripts are unsupported. Feel free to edit/view them before running. We only suggest using these on new VPS setups. If anything goes wrong, you can ask your VPS vendor to re-create the VPS. Even though we have never had to do that when using these scripts, it could happen.

Zip file with the scripts:

This zip file contains:
  • Server 2003 and 2008 (folder)

    • Set AutoLogin.reg - Right-click and edit this file and enter your Windows login credentials. Then run the script to set Windows to automatically login.

    • Update RDP to Port 1311.reg - a pre-made registry file that updates RDP to use Port 1311. Don't run this file until after you have opened port 1311 in your firewall.

    • Visual C++ 2008 Runtime - a website link to the 2008 runtime download page.

    • Visual C++ 2010 Runtime - a website link to the 2010 runtime download page.

  • Server 2003 Only (folder)

    • Add Open File Location Option to Right-Click.reg - a script that allows you to right-click an MT4 desktop shortcut and click "Open File Location" to go right into the MT4 folder (handy for installing EA's)

    • VPS-Tuneup.bat - A batch file made for Server 2003 that disables all the unnecessary services, disables hibernation, and disables the screen saver.

    • Show Desktop - A special shortcut file for Beeks VPS. The Quicklaunch toolbar on their servers is missing the "Show Desktop" shortcut, so I have to paste it into the Quicklaunch bar manually.

  • Server 2008 Only (folder)

    • Firewall - Open port 1311.bat - a script for Server 2008's firewall to open port 1311. (run this before changing the RDP port)

    • Firewall - Close port 3389.bat - a script for Server 2008's firewall to close access to port 3389. Don't run this until after you've updated RDP, restarted the VPS, and connected to it using the new port. Then you can close port 3389.

    • Path to Quicklaunch.txt - a text file with the most common path to the QuickLaunch folder so I can copy and paste it when adding the new toolbar.

    • VPS-Tuneup.bat - A batch file made for Server 2008 that disables UAC, disables all the unnecessary services, disables hibernation, and disables the screen saver.

    • Expand C Drive.bat - sometimes Windows Server 2008 VPS's are automatically created with smaller hard drives than they should have. Vendors usually include detailed instructions to "expand" the VPS C: drive to use all of the available disk space. This script is simply an automated way to do it.

    • diskpart-script.txt - This file is used by the Expand C Drive script. I couldn't put all the commands in the batch file: it needs to load an external script file and that's what this is. Just ignore it.

This is a little complicated to explain but it is EXTREMELY important when using Windows Server 2003. Please bear with me.

Windows Server editions have the ability to operate multiple "sessions" simultaneously. This means that multiple people can be remotely connected to a machine and using it "as if" they were the only person on the computer (they don't see what the other people are doing). A single Windows Server can sometimes have up to 25 people all logged in and working on it at the same time (depending on licensing restrictions).

The "console session" is a term that describes the session of Windows that is being used as if you were sitting in front of the machine in real life with the physical keyboard and mouse in your hands. If you walked into your company's server room and stood in front of the server, you would be looking at the "console" session. The console session is always Session ID# 0.

Why is this important? Because of the way that Metatrader and trading software work. If you remotely log into your VPS under session '1' and run Metatrader 4, your trading platform will be running in Session 1. If you disconnect and log back into the VPS the next day, it may log you into a new session (for example '2'). If you are logged into Session 2, you will not see your Metatrader 4 platform which is running in Session 1.

The first instinct is to think that MT4 crashed and re-open it. Or maybe your MT4 is set to automatically run when you log into Windows. Suddenly you have a situation where MT4 is running in BOTH active Sessions at the same time. When terminal.exe is running twice, your EA's are also running twice. This will result in unpredictable behavior that includes duplicate trades being executed, trades being missed, EAs crashing or MT4 crashing.

This is why VPS vendors that sell Server 2003 use special instructions or utilities to force you to log into the "console" session. The console session is the only non-virtual session that is not dynamically created, so it will be the same every time you log into it. It's the only way to guarantee your MT4 platforms do not get launched again and duplicated. It's very important to follow the VPS vendor's instructions to log into the console session.

CNS offers a utility that is pre-installed called "Double Login Defender" that can warn you if a new Windows session is created, but most VPS vendors do not have warnings like this available.

How to see if you have a duplicate session running, or which session you're logged into: While in the VPS, simply right-click the taskbar at the bottom of your screen and click "Task Manager". Click the "Users" tab. This will show you all logged-in users and the session ID. If you are using Windows Server 2003, the ID should be '0' and there should only be one entry in this window.

Note: "Console" session was the original term. A few years ago Microsoft started calling it the "Admin" session, but it refers to the same thing. Many people still use the word "console" to describe Session #0.

Server 2008 note: My experience with Server 2008 is limited but my observation is that it forces all connections from the same username into the same session. So as long as you always log in with the same username (such as "Administrator") you have nothing to worry about. All my Server 2008 connections are on session ID '1' and I have not had issues with duplicate sessions being created. I can't guarantee this and I have not researched it thoroughly but it's my observation so far.

The two most popular ways of connecting to a remote machine (like a VPS) are RDP and VNC.

Remote Desktop Protocol (RDP) is a feature built into Windows XP and later. RDP is ideal for Windows Server 2008 because it is faster and smoother than VNC and the issues related to duplicate sessions in Windows is not a problem.

VNC is an open-source infrastructure for connecting to remote computers. There are lots of software companies that have released versions of VNC (UltraVNC, RealVNC, TightVNC, etc.) It is not built into Windows automatically. The 'server' software needs to be installed and a password configured. The 'client' software can usually be downloaded and run without requiring installation (depending on the version).

VNC is fast and smooth on Server 2003, but after Windows Vista was released, something changed in the Windows desktop interface that causes VNC to be extremely laggy. This laggy experience occurs on Windows Vista, 7, and Server 2008.

RDP only allows 1 person to be connected to a session at a time. RDP can create virtual sessions that allow multiple users to log into unique sessions.

VNC always runs on the console session and never creates virtual sessions. It allows multiple simulatneous connections and everyone sees the same screen (ideal for 'watching' while a technical support agent helps you fix an issue).

We prefer VNC for various reasons (speed, copy & paste to upload/download files, multiple simultaneous login, etc.) but only when using Server 2003. We use RealVNC Enterprise (paid version). When using Server 2008, you are better off using RDP.

I can only offer a comparison of VPS services that I have actually used. This comparison is more about my "experience" than "features". There are many VPS vendors out there. Each has a particular service and pricing that is suited to certain traders. No particular VPS vendor is perfect for all traders. Here are some highlights:

Commercial Network Services (CNS) (Server 2003)

  • One of my favorite choices for overall speed and performance. I have ordered and used many of their servers.

  • Out-dated website can be difficult to navigate but this only affects you during the order process. :)

  • Order the "Trader's VPS Value Edition", not the "Windows VPS". Yes, they are a little different.

  • The basic Server 2003 Value Edition costs $30 per month and includes 384mb RAM. I suggest upgrading to 512mb RAM (+$2.56), or 1GB RAM if you are a heavy user (+$12.80). (prices are accurate as of January 2013 and subject to change).

  • During the checkout, you can select the operating system. Choose "Traders VPS Win2K3x64 Enterprise Edition R2". It is the 64-bit version instead of 32-bit (which is labeled as x86).

  • CNS VPS orders are approved manually so do not expect the VPS to be created immediately. It can take 6-12 hours for approval and VPS creation. Once the VPS is created, you are emailed the IP address and password.

  • You can choose between the NYC datacenter (default) or the UK. Most Forex brokers have servers in NYC but you should check to see if the UK is a better selection for your broker.

  • Good discount when purchasing 12 months in advance ($300 per year instead of $30 per month).

  • Email and web-based Live Chat support options.

Beeks FX VPS (Server 2003)

  • Good VPS vendor that has partnered with many brokers (including ForexFS) to provide their VPS service free of charge if you meet certain minimum requirements.

  • My experience is limited to setting up and supporting the free VPS's provided with a trading account - I've never gone through the actual ordering process.

  • Good CPU availability and speed. Default 1GB of RAM is nice.

  • Incredible value when obtained free from your broker. These are not your typical "freebie vps". The quality is good.

  • Note the price is quoted in GBP (such as £25 per month) which is a bit higher than USD (check current exchange rates).

  • Good discount when purchasing 12 months in advance (£250 per year instead of £25 per month).

  • Minor complaint #1: The "Show Desktop" shortcut is missing from the Quicklaunch toolbar. I have to put one there manually.

  • Minor complaint #2: The connection utility that is used to log into the VPS doesn't remember your password so it has to be entered each time. However, if you want to, you can custom-make your own RDP file that connects to the Windows console session and use it instead of their connection utility.

  • NYC Datacenter with extremely low latency to brokers with New York servers.

  • While you shouldn't select a broker solely based on the perks/freebies they offer, I would suggest taking a free BeeksFX VPS into consideration when it comes time to select your next Forex brokerage firm.

  • Email and web-based Live Chat support options.

4xHosting (4xSolutions) VPS (Server 2008)

  • Only offers Windows Server 2008 hosting (no Server 2003). This isn't necessarily bad or good, just a fact.

  • Servers are located in the UK for good latency to brokers across Europe. NYC options may be coming soon.

  • Support option for only £10 per month and they will assist in supporting anything on your VPS (such as MT4 and EA installation, etc.), including phone support.

  • The high-end server option (Professional VPS) is expensive but powerful enough that we have run up to 20 MT4 platforms on it without any problem. This means they have very high CPU and HDD resources (which are very difficult to measure and compare among VPS vendors).

  • Email and web-based Live Chat support options. Telephone support for £5/mo or Total support for only £10/mo.

SolarVPS (Server 2008)

  • As of January 2013: Not currently recommended due to issues with servers crashing and suddenly rebooting. Technicians insist this is temporary and they are working on resolving the issues, so SolarVPS may be a viable Forex VPS option in the coming months.

  • New Jersey datacenter with low latency to NYC brokers.