Graceful server shutdown

Post Reply
Masher
Site Admin
Posts: 3617
Joined: Thu Apr 20, 2006 2:54 pm
Location: America's Heartland
Contact:

Graceful server shutdown

Post by Masher »

The panel, by default, when stopping servers simply kills the server process. This normally doesn't cause any issues. However, for games with persistent worlds this causes problems. Changes in the world aren't instantly saved to disk. If the server where to be stopped, all changes made since the last save would be lost. Because of this we implemented a way for the panel to stop the server and save the world before shutting down the server.

Supported games
  • Any game with RCON support that exposes a way to save/quit via RCON
The panel includes special functionality for these game types (requirements are show later in post)
  • 7 Days to Die
  • ARK: Survival Evolved
  • Atlas
  • Avorion
  • Dark and Light
  • Gary's Mod
  • Minecraft
  • Pocket Minecraft
  • Rust
  • Please contact us if you'd like this special functionality added to other game types
What's the difference between normal and special RCON support
Special RCON functionality allows the panel to automatically get the RCON password.

Games using normal graceful shutdown functionality will need to have the RCON password defied on the RCON tab for the server. If you need to allow users to update this value, set the RCON password to one of the custom variables (%Var1%-%Var12%). For the server make this variable public and advise users to update the value if they change the RCON password.

Pitfalls
Since we can't control how long the save world will take, some timeouts may be reached. These could be UGCC's timeouts or the web server's. You can simply wait for the panel to show the server as being down if a timeout should occur.

Verifying it works
The panel will log if it's able to shutdown a server 'gracefully'. If it encounters an error it'll log what is missing or what failed. You can use the Log Tool to look for these messages.

ARK: Survival Evolved
For ARK graceful shutdowns:
  • Game type for server needs to be set to 'Ark: Survival Evolved' (game type value must match ark)
  • The 'Query Address' and 'RCON Port' settings need to be set for the server and accurate.
  • The server's command line needs to contain '?ServerAdminPassword=admin_password' (admin_password should be your password) and '?RCONEnabled=True'
  • The panel will use this information to start a in game countdown to notify users and gracefully shut down the server.
Minecraft
For Minecraft to work:
  • Game type for server needs to be set to Minecraft in the panel (game type value must match mc)
  • The ‘Query Address’ and Rcon Port values for the specific server needs to be defined
  • RCON has to be enabled and a password set for the server in server.properties file.
  • The server.properties file needs to be accessible by the panel, and needs to be located in the directory set as the 'Working Directory' for the specific server. Typically this is the same folder as the server's .jar file.
  • Version 1.46 or better of UGCC
Rust
For Rust to work:
  • Only the new version of Rust is supported.
  • Game type for server needs to be set to Rust in the panel (game type value must match rust)
  • The ‘Query Address’ and Rcon Port settings for the specific server needs to be defined
  • You must have the rcon commands set in the command line or hidden command line (+rcon.port, +rcon.password, and +rcon.ip)
  • The rcon password MUST be in quotes (""), as shown in the example at http://rustdev.facepunchstudios.com/ded ... erver/rcon
  • Version 1.78 or better of UGCC
7 Days to Die
For 7 Days to Die graceful shutdown to work:
  • Game type for server needs to be set to 7 Days to Die in the panel (game type value must match 7dtd)
  • The ‘Query Address’ and RCON Port settings for the specific server needs to be defined
  • RCON Port value should be the telnet port
  • The panel will first look for myserverconfig.xml, if not found it'll use serverconfig.xml
  • In serverconfig file; 'TelnetEnabled' needs to be set to true, TelnetPort needs to be set, TelnePassword needs to be set.
  • The serverconfig file needs to be accessible by the panel, and needs to be located in the directory set as the 'Working Directory' for the specific server. Typically this is the same folder as the server's binary.
  • Version 1.772 or better of UGCC
Last edited by Masher on Sat Aug 29, 2020 11:09 pm, edited 1 time in total.
Reason: Updated info to align with changes that came with auto installer update
Masher
-----------
Please do not PM me unless asked to! We are a small company. If you have an issue or question it would be best to post it in the forums where it can help others in the future.

NEW Join our Discord!
Post Reply