1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Running Dedicated Server as a Service With Parameters

Discussion in 'Groups & Dedicated Servers' started by Phantasmogasm, Jun 1, 2014.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    First a little pretext:

    i have a mini home-server esk machine currently serving as an FTP server, that is running W7 and the FileZilla Server software (I promise i'm going somewhere with this) FileZillla runs as a service on start up, meaning i don't even have to log-on to run or make use of it, as long as the machine is running its working.

    I want to do something similar with my SE Dedicated server, all i need to do is turn my computer on, and the server will start as a service, select as specified instance, and then load the world. however i'm not sure how i could get that to happen, asking a friend yielded the result "a custom service wrapper wouldn't be too hard, but you would need to know the parameters for selecting the instance and loading the world"

    Anyone with experience in this sort of thing know how this might be accomplished?
     
  2. Vdragon

    Vdragon Apprentice Engineer

    Messages:
    326
    Just create a new instance with the server's gui:
    https://www.spaceengineersgame.com/dedicated-servers.html
    Detailed here.
     
  3. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    aaaaaand how might i do that if the computer isnt even logged in?
    If the instance is run as a service already thats great thats 1 problem down, but how do i then run that service with parameters that auto load the world?
     
  4. Vdragon

    Vdragon Apprentice Engineer

    Messages:
    326
    I don't know, with windows server 2008 R2, it launch the service even when no user is logged in.
    For editing the world name:
    Edit the SpaceEngineers-Dedicated.cfg into your instance folder in C:\ProgramData (<LoadWorld>WorldFolderPath...)
    If it's not in C:\ProgramData, then it's not running as a service.
     
  5. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    what im getting at is im not really sure how to turn an executable ( the server app) into an auto running service that starts the world, at run time (bearing in mind that you have to click save config and start in order to run the server)
     
  6. Sibz

    Sibz Apprentice Engineer

    Messages:
    361
    You should be able to go into computer management -> services, find the SE service and set to automatic, this in theory should start the service on boot.
     
  7. Vdragon

    Vdragon Apprentice Engineer

    Messages:
    326
    Just damn read that page! All is written on it!
     
  8. TechyBen

    TechyBen Junior Engineer

    Messages:
    542
    No, no it is not. That tells you how to run a service... not how to manage services on a server (presuming Windows 2003, though most are probably trying on XP/Vista/7).

    Poor questioning from the OP, but they are asking a different question to the one you think they are asking. Though if the answer is "the Space Engineers sets a service to automatically start on windows/server start" then that's ok. It's not documented that "server will automatically start" though.
     
  9. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    Thank you, sorry my question probably could have been worded better. And yes, that was my issue, i wasnt sure that the server/world would start automatically when the service was started
     
  10. Sibz

    Sibz Apprentice Engineer

    Messages:
    361
    I think start -> run, type services.msc will bring up services on server 2012, then you can check if the SE service is set to automatic.
     
  11. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    yeah i'd spotted you said that earlier in the thread, thanks ill check that once ive finished setting up the server configs
     
  12. TechyBen

    TechyBen Junior Engineer

    Messages:
    542
    I can confirm for those using vinilla Windows that games DO automatically start as services. Remember this, as you could end up with 1/2/3/4+ servers running on startup even when your not playing if you forget to turn it off. :woot:

    The instructions are not clear (to us non-trained-server-admins) on what the local / console and "instance" options mean. So "Local/Console" is a start on demand option as a program window only, and all "instances" will run as automatic services only? That's helpful to know, and it would be nice for that clarity in the instructions. :)
     
  13. Phantasmogasm

    Phantasmogasm Trainee Engineer

    Messages:
    12
    As in if i dont manually stop the server before restarting the PC it will have 2 instances running on restart?
     
  14. Vdragon

    Vdragon Apprentice Engineer

    Messages:
    326
    No, if you shut down the PC, every process will end.
    The number of server starting at the PC start is defined by the number of services created by the space engineers server gui, you can disable their automatic start by editing the entry into the service menu (set it to manual start, or delete them).
    Or even with regedit.
     
  15. Bobtrl

    Bobtrl Trainee Engineer

    Messages:
    20
    The Local/Console server will run as the username you are logged into the computer with, thus the process will be killed should you log out of Windows. The Service option, however, is useful because the service (and therefore the application process) runs as the Local System account, which can be logged in and actively running processes even when you are not actually logged into your computer. The service will either start automatically or need to be started manually depending on the Startup Type setting for the service.

    In order to change the startup type you can follow the directions below:

    1. Access your service manager by entering services.msc into the Windows Run Prompt (WindowsKey+R).

    2. Locate the service installed for your dedicated server instance. The service will be named the same as your server instance that you created in the GUI.

    3. Right-click on the service and hit Properties.

    4. Open the Startup Type drop-down menu and choose your setting (Automatic in this case so that the dedicated server instance will be started with the system even without logging in).

    5. Click Apply and OK to commit the changed setting.

    You could also easily write a short bat file to execute at will in order to start/stop the service(s). it should be noted that there will be a separate service installed for each server instance you've created.
     
  16. TechyBen

    TechyBen Junior Engineer

    Messages:
    542
    If I could, I'd sticky your post Bobtrl. :)
     
  17. joebopie

    joebopie Apprentice Engineer

    Messages:
    296
    the devs have said they WILL add this as a Feature of the dedicated server. so just wait and it will become easy
     
  18. gimmilfactory

    gimmilfactory Junior Engineer

    Messages:
    523
    Here you go.
    https://forums.keenswh.com/post/services-command-prompt-control-for-servers-6942494?trail=15#1

    Any normal service should start at bootup once your system gets to the login prompt screen.
    If you are having issues with this not being the case, follow the service delete and create steps, but change the start= auto to start= boot.
     
Thread Status:
This last post in this thread was made more than 31 days old.