Web Hosting My Java Server Code - How?

Good morning JGO :slight_smile:

GOAL:

    I'm at the point of my game where I'm ready to have some remote connections via a client/server model.  I am currently borrowing a friend's server space which runs the client code (in applet form) of my game in entirety, connecting to a server and supporting X clients (the server is currently being ran on my localhost and the client code is just uploaded and being ran from a browser to get over that hurdle). 

    So, I'm looking to purchase a domain name and purchase webhosting [b]for the reason that the web provider runs my server code infinitely (as a dedicated server would, but also preferably in an environment where I can easily re-upload and re-start the server code, since I'm still going to be developing/debugging), which will allow remote connections from the client applet for kryonet connectivity[/b]. I've been a little caught up on how to get a remote server to actually 'run' my sever code. [b]Two questions: 1) How can this be done? 2) What is the top-tier hosting site for my needs?[/b] (I know they are basically all the same, wasn't sure if there was some standard around here).

Thanks guys,
Have a great Tuesday!

when you buy a server you will get a login, password.
You will need to then download some kind of program that allows you to connect to that server via console. Then, you will need to download and install java on via that console window to your server. Than you will need to upload your server file to your server. Now you will be able to do java -jar server.jar to start the server.

Oh awesome, thanks for the reply.

Do you recommend any specific host for what I’m trying to do?

No idea.

I mean, if you plan your game to be played only in your country, you should choose some hosting from your country. I mean, the further away from the players the server is, the more delay they will have.

Linode is quite nice. You can choose which data center your server is in, can choose from the US, London and Tokyo. You have to manage the VPS yourself, but it isn’t too hard. They have some great info here:


I suggest using a ā€œStackScriptā€, eg choose the ā€œLAMP Stackā€ script and it sets up Ubuntu or Debian with Apache, MySQL and PHP. After that you can setup Tomcat or whatever you like. Looks like this:

I’ve been using Linode for many years with no complaints. Occasionally they increase your RAM and HDD space when they revise their plans. FWIW, if you use this link I’ll get a $20 referral bonus if you stay with Linode for 3 months: :slight_smile:

Thanks Nate, I’ll definitely consider that :stuck_out_tongue:

I had a 123system VPS for a year, I found they were pretty good. I had some small issues, but I think most of them was my fault.

The node my VPS was on did go down, and I waited a few days for it to go back up but it didn’t, so I contacted them and they said the node my VPS was down and they were trying to fix it and should be a day or 2. after a few days, they offered to transfer people to a new node, but they would lose some stuff from the old VPS, or they could wait it out to how ever long it took to get repaired. I opted for a transfer, as I had nothing important on mine that I couldn’t redo in like 20 mins.

123Systems VPS’s are cheap, so I would suggest trying one of them, and seeing if you can manage to just use that without many problems.

I would suggest there OpenVZ VPS due to their cheap prices (e.g. 1gb ram is $19, 2gb ram is $30 USD for one year, 4gb ram is $59).

also here is my referral: https://123systems.net/billing/aff.php?aff=1311

not sure to much about their referral benefits.

I’ve used 123systems for a year or two now and never had any significant issues. It’s cheap, like 3€ a month or so, so it’s perfect for newbies and comes with all the jazz you’d expect from a VPS provider (Control Panel etc).

Keep in mind a VPS is just a computer somewhere on the internet that you connect to through the terminal/console. Most of these computers are unix based, since linux is a beast, so if you know unix (linux, OSX) you’ll feel right at home. If you’re on windows unix may seem unfamiliar since some of the commands are different than on the windows terminal but just take a look at a quick unix tutorial on youtube or something.

You should be familiar with using the terminal/console. You’ll be doing everything from the console.

In addition, all unix systems pretty much come with a so called ā€œpackage managerā€. This is a program installed by default in the OS that allows you to easily install other programs (such as java, gcc, apache, node.js etc).

There are a few package managers out there but they all pretty much work the same way (apt-get, yum etc).

You’ll use them for example something like this:

apt-get install java

Google is your friend when you need to install a program and don’t know what or how. "How to install on ".

Point is you should learn what a package manager is and how to use it and never need to install anything manually (although you can do this, of course).

+1
I also use linode, and Riven is also hosting JGO on the cheapest Linode (as far as I remember)

I use Linode (1GB) with their backup service, together $25/month.

Uptime: 812 days. All reboots prior to that were due to me screwing up or being in the ā€˜a reboot might fix this!’ Windows mindset.

Nothing really beats Linode, but you pay quite a lot for your ease of mind.