Web hosting for custom server code

Started by
4 comments, last by Novadust 11 years, 10 months ago
OK, so I have begun doing some network programming recently mostly with the Winsock2 API, but also doing equivalent things using the original BSD implementation to learn that as well. I have created some basic clients and servers and have ran these fine on my PC. In the server code I bind on my local ip and that is just fine, but I have been trying to figure this out: If I have a web hosting account somewhere (but do not physically have the server), is it possible for me to upload my custom server code to one of these accounts and have it run on that server? Or do I need physical access to the machine that my game server will be running on. If so is it possible to get a hosting account with a dedicated server and do this?

If I understand right, most web hosting accounts that you can get online will set you up on a shared server with serveral hosted accounts on each one. These servers are going to be running its own server software (likely HTTP), probably apache2 or something. I guess it is not possible for me to upload say a multi-client chat server to a hosted account like this?
That which doesn't kill you makes you stronger.
Advertisement
Typical web-hosting most likely doesn't let you run your server code. The ones running apache, php, mysql etc are specifically meant for hosting web-pages. What you are probably looking for is a virtual private server. Most of these are running virtual machines containing linux or bsd variants and you (normally) get remote root access.
This is answered in detail in the FAQ for the forum, as well as multiple threads on the first and second pages.
In brief: You don't need physical access, but you DO need a "self-managed server" or "virtual private server" or similar hosting plan. Regular "web hosting" won't work.
enum Bool { True, False, FileNotFound };
OK, thanks that is the answer I was looking for. Looks like something like that will run me about ~$60/month. I have a dual-boot system on my laptop, running both Windows 7 and Ubuntu 12.04. If I wanted to host it on my own linux box then there would be no need to install apache or anything like that. I can simply run the program from any location on my drive and keep it running hosting it on my own computer that way?
That which doesn't kill you makes you stronger.
I can simply run the program from any location on my drive and keep it running hosting it on my own computer that way? [/quote]

If you can make the program open a port and listen for connections, and make the machine stay connected to the internet, and make sure that external clients can get to the machine (firewalls, etc,) then yes, you are hosting the game. There's no magic needed in that particular part. It's what happens once users connect, and then once malicious users connect, that's interesting :-)
enum Bool { True, False, FileNotFound };

OK, thanks that is the answer I was looking for. Looks like something like that will run me about ~$60/month. I have a dual-boot system on my laptop, running both Windows 7 and Ubuntu 12.04. If I wanted to host it on my own linux box then there would be no need to install apache or anything like that. I can simply run the program from any location on my drive and keep it running hosting it on my own computer that way?


You can easily get a $10/month non-managed VPS . You just have to install everything and configure it all with probably very minimal support apart from reboots.

This topic is closed to new replies.

Advertisement