Actions

Editing SystemD Server Guide

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 +
<br>
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
  
Line 10: Line 11:
 
To maximize server security, we will be setting up a dedicated user that only has the privileges to run the dedicated server, and nothing else.
 
To maximize server security, we will be setting up a dedicated user that only has the privileges to run the dedicated server, and nothing else.
  
βˆ’
<code>sudo useradd -m -s /sbin/nologin stationeers</code>
+
<code>sudo useradd -m stationeers</code>
 +
 
 +
We won't need to log in with the user at all, so to increase security even more, let's prevent anyone from logging in with the user.
 +
 
 +
<code>sudo nano /etc/passwd</code>
 +
 
 +
Find the line that starts with <code>stationeers:x:</code> (it's most likely the last line in the file). Replace the path at the end of this line (probably says <code>/bin/bash</code>) with <code>/sbin/nologin</code>.
  
 
== Installing SteamCmd ==
 
== Installing SteamCmd ==
Line 45: Line 52:
 
<code>ExecStart</code> starts the Stationeers dedicated server. Be sure to replace all the UPPERCASE entries with what you want for your server. See here: https://github.com/rocket2guns/StationeersDedicatedServerGuide/blob/main/README.md<br>
 
<code>ExecStart</code> starts the Stationeers dedicated server. Be sure to replace all the UPPERCASE entries with what you want for your server. See here: https://github.com/rocket2guns/StationeersDedicatedServerGuide/blob/main/README.md<br>
 
<code>User</code> and <code>Group</code> ensures that the dedicated server runs with the user we set up earlier.<br>
 
<code>User</code> and <code>Group</code> ensures that the dedicated server runs with the user we set up earlier.<br>
βˆ’
<code>StandardOutput=journal</code> directs all log-messages to the system journal. If something goes wrong, you don't have to locate any log-files, you just run the command <code>journalctl -fu stationeers</code> to browse the journal for what the user <code>stationeers</code> has output.<br>
+
<code>StandardOutput=journal</code> directs all log-messages to the system journal. If something goes wrong, you don't have to locate any log-files, you just run the command <code>journalctl -fu stationeers</code> to browse the journal for what service </code>stationeers</code> has output.<br>
 
<code>Restart=on-failure</code> ensures that if the server crashes, it will automatically restart.<br>
 
<code>Restart=on-failure</code> ensures that if the server crashes, it will automatically restart.<br>
 
<code>WorkingDirectory=/home/stationeers</code> makes sure that everything we do assumes that we're standing in this folder when we do it. It's kind of redundant here, but I keep it in for safety.
 
<code>WorkingDirectory=/home/stationeers</code> makes sure that everything we do assumes that we're standing in this folder when we do it. It's kind of redundant here, but I keep it in for safety.

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)