x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do I host a dedicated server on Steam?

Is it possible using the developer appId? How is it achieved? Can you test from a single computer?

Product Version: UE 4.7
Tags:
more ▼

asked May 13 '15 at 11:27 PM in C++ Programming

avatar image

Spiris
1.1k 41 35 76

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You start dedicated server you need to start your game with -server option, here docs about it:

https://wiki.unrealengine.com/Networking/Replication

You can't host dedicate server on Steam, you or user of your game will need to host it somewhere. You don't need Steam to do that, you connect to server using IP address, but you will need service that lists IPs of servers that are online, to so called master server and Steam provides that. As i lurked in engine code OnlineSubsystem sends heartbeats (information that server is online so master server keep server entry) when you use OnlineSubsystem Session system the SteamOnlineSubsystem support that, i'm not sure if you need any code intervention to make it send hearthbeat or it does that on his own when you run a server (whatever if it's a client host or dedicated) with just configurating SteamOnlineSubsystem.

You can test it on your single computer, start server and then client, connect to it via your IP (the private one, if you want to make it work with public IP you will need to forward the port in router configuration) or using loopback ip 127.0.0.1

As for AppID i'm not sure, my intuition tells me it should work on test one, but server list will be filled with incompatible servers of other testers ;p but again you don't need Steam to connect, all you need is IP

more ▼

answered May 13 '15 at 11:57 PM

avatar image

Shadowriver
37.8k 937 172 1123

avatar image Spiris May 14 '15 at 04:16 PM

Thanks for your response!
So currently I am hosting the server on my local machine, doing so makes it so that any instances of my game run on steam fail to initialize the steam online subsystem. I am able to initialize the subsystem on a separate machine.
I cannot find the session using FindSession, or any method, and therefor cannot join the session, or server, without using open 'ip'. I have tried using the open 'ip' method before and it succeeds in connecting to the server, but limits my client's access to everything session related. (voice, achievements, etc)
Is this working for other people? I would really like to know how.

avatar image Shadowriver May 15 '15 at 08:21 PM

Do your server is accessable thru public IP, keep in mind Steam don't see your LAN

avatar image Spiris May 16 '15 at 04:26 PM

Yes, I set up the suession with LAN disabled.

avatar image Shadowriver May 18 '15 at 12:05 AM

There no diffrence between LAN and Public, only way of annouceing the server is diffrent, if you won't do port forwarding your server will be accessable only in LAN. So try connecting by typing your public IP

avatar image Spiris May 18 '15 at 06:48 AM

I will check to make sure the port is forwarded when I get back to it tomorrow. Thanks for your help.

avatar image MADHOUSE Jun 07 '15 at 03:28 AM

Hi! I have been dealing with the same kind of problems, I have been attempting to host a dedicated server with the steam online subsystem but with no luck. The server never gets listed through steam. Is there realy no way of hosting a dedicated server with steam? Hosting servers from clients works perfectly. /regards

avatar image Spiris Jun 07 '15 at 06:21 AM

It is definitely possible, I currently have a server running with steam advertising it. However, there are quite a few choke points that it could be being blocked by. A few of which I found a little absurd.
First, make sure both your server machine and client machine are separate machines.
Second, make sure that both machines have Steam installed, updated, and an account logged in. Yes, even the server.
Finally, like Shadowriver mentioned above, make sure all of the ports are opened on the router and firewall that are listed on Steam's website. Doing this with Microsoft Azure's service was fairly painless, you set up endpoints through their portal upon creation of your server, or after. While doing this on your local router requires you connecting to your router and telling it what ports you need.
It is worth mentioning that I did all of these things without a huge concern for security or 'the way it is supposed to be done' so if anyone wants to throw pointers on that topic, please do.

avatar image MADHOUSE Jun 10 '15 at 09:26 PM

Thanks for your input! I will have a look at Azure, im not quite shure how that works. It is possible I have some issue with ports in the router.

Both client and dedicated have unique steam logins active while running on 2 different computers.

Is there any specific reason hosting servers from the game client works fine, but not the dedicated? Perhaps the client sets up some successfull UPnP where as the dedicated does not? hmmm

avatar image Spiris Jun 11 '15 at 03:06 AM

I would assume they use the same port. I noticed some strange behavior when I first tried hosting dedicated servers as the code would never actually host an internet session from the default 'create server' node.
I dont know exactly what kind of setup you are running or if any of this advice even applies to you, but I can give pointers based on my own limited experience.

avatar image MADHOUSE Jun 13 '15 at 08:24 PM

Okej, so Ive signed up for Azure and setup a VM server, and I can succesfully run the server executable, but again nothing shows up when searching for games :(

I even got steam running on the server aswell. I have added all related steam and UE4 endpoints, and configured the firewall, even tried turning the firewall off.

what create server node do you refere to? there are no nodes in the dedicated server build executable, it just shows a log window and launches the server by it self.

https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux)

I really appreciate all help!

avatar image MADHOUSE Jun 13 '15 at 08:57 PM

I also tried to connect to the server with the console command "open ip.adress:7777" but nothing happens, and after a while I get "connection timed out".. its really frustrating

edit: if I run the game client instead of the dedicated on the WM server and host, it will show up in the server search window and connect properly.......

avatar image MADHOUSE Jul 11 '15 at 03:45 PM

Seems there might be some inherit problems with using the steam test dev app ID for dedicated servers, anyone who can confirm this?

avatar image Scienziatogm Jan 22 '16 at 05:51 PM
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question