What I need to host a java server

To host an app online, I can deploy with Apache Tomcat. But to host a java server, what I need?

id depends of the kind of server you want to use, but if you want to make a game server,

create the server with Java SE and ( with the ports and all the logic of the game ), after that run the server,
the clients will be connected to the IP of your server in certain ports ( stablished for you )

in resume a server is like another program made with java but this is listening in certain port for connections and requests

A computer that is always connected to the internet from a static IP that you have control over.

VPS hosting is a simple and cheap way to get started. It’s essentially a computer in the “cloud” that you connect to with root privileges over terminal/console/puTTY/ssh.

TBH, people asking those questions shouldn’t host servers and shouldn’t administrate servers. It’ll only be a new spam system in a few days / weeks.

…but people need to start somehow…

Play with VirtualBox: it’s free, easy to grasp, and it doesn’t matter when you lock yourself out.

make your computer the host, and then use a DNS free like noip.com, you need to learn how to do it , before you use a profesional host,

or make you host locally

Well, it depends on the point of view. I am torn on this one, therefore I gave noctarius a medal AND replied that people should start somehow.

It’s for sure not a task one should take lightly and go on naively installing everything with default settings or throw configuration you don’t understand at it 'til it works, because this will lead to a new spam system ^^

So for hosting something by yourself, you should practice with some VM lab, do some research and have some practice (best would be a coaching by somebody working in the field). It might be fun, too…

Edit: And try to break/intrude it - this might be even more fun :wink:

Kinda agreed with jonjava


No purpose was specified, might as well have been a server for himself and to learn how to do it… so…

I know I can use my PC, I know I can host my own Server and I already did using kryonet and libgdx (this community helped by the way)

I was trying to ask about hosting online in 3rd, what I need ? something similar to Tomcat? dedicated server? VPS ?(thanks for the VPS suggestion, I’m testing some stuff here).
I know I didn’t ask clearly, I could have been more specific.

This is what you say when someone is trying to understand or learn something?

Apache Tomcat is essentially a (java) web server. A web server in its simplest form is a program that listens for incoming connections on port 80 (web browsers do this automatically which is why you don’t have to type it in the address bar) and sends (usually html) files back as a response from a specific folder.

The how and what kinds of agreed upon commands a web server should interpret and respond with is described in the hypertext transfer protocol (http) which is text based. Web browsers automatically render these html files as web pages.

If you have your own game server then you probably have your own custom networking system between your server and your clients. So all you need to do is run the server program on your “cloud computer” wherever it may be and simply connect to its IP and port number (or have a webserver in front to proxy specific requests to a subdomain or path locally to your server programs port) from your clients.

Cheap 5$/month VPS are a dime a dozen you can start to get your hands dirty with.

Get a cloud server from Digital Ocean - $5/month - they’re awesome! :wink:

Slightly surprised that Tomcat isn’t one of their one-click install options though. Still, lots of documentation from them on how to set it up.

No this is what I’m saying if somebody tries to do something he’s obviously not ready for. Server administration is probably one of the hardest thing to get right. Try it at home, try it with virtual machines, nobody cares but using a VPS or dedicated system, not being able to administrate it (because you don’t know better YET!) is a very very very bad idea and people will have taken over your system almost instantly. I’ve seen this so often in the past and it really is a very bad idea, just don’t do it. Often hosters also just cut your connection if your dedicated is used for spam, ddos or similar things. It is up to you then, to somehow regain access - most often it means plain reinstall, go over configuration again, bla bla bla… It just doesn’t make sense without at least basic knowledge on how to setup things right and your initial question just doesn’t give the slightest feeling you know what you’re doing, that’s basically it.

I agree with @noctarius. Just don’t do it. Pay him to do it for you.

Never said that, actually I wouldn’t even offer nor do it :slight_smile: