Adding User Accounts to your Starbound Server
In order to control who joins your Starbound server, you can create "User Accounts" in the game's config files which will limit who can join your server. Each user account will allow only that player to connect to it, and each will have their own individual password.
Changing the Config File
The file that controls this is called starbound_server.config
, and is normally located in the /storage
folder.
Note: the entire /storage
folder, and the files inside of it, is only created on first start up. Start the server, let it finish, and then stop the server. If you do not do this, you will not find the file.
Once you have located the file starbound_server.config
in the Server Files, select it and then click the "edit" button. You should see something similar to this below:
Find the "ServerUsers" Line in the Config
Scroll down through the file, until you find a line that begins with "serverUsers"
. It will be followed by two curly brackets, {
and }
, looking something like this.
"serverUsers" : {
...
},
Please be careful in how you edit the file. The file is in .json
format, which is a very specific system for entering information. The formatting, syntax, curly brackets, and commas are all very important. If a single character is missing, it can keep the file from working properly.
You can copy and paste the following lines.
"username" : {
"admin" : false,
"password" : "userpassword"
}
When finished, it will look like this example below. This is for only one user account.
"serverUsers" : {
"username" : {
"admin" : false,
"password" : "userpassword"
}
},
Adding Additional Users
If you need to add multiple users, just keep adding more sections, one after the other.
It's very important that that whole block begin with and end with curly brackets, that were there originally. The following adds three user accounts.
"serverUsers" : {
"username" : {
"admin" : false,
"password" : "userpassword"
},
"username" : {
"admin" : false,
"password" : "userpassword"
},
"username" : {
"admin" : false,
"password" : "userpassword"
}
},
Enter User Names and Passwords
Now that the extra lines are entered in the config file, inside each one replace the text username
with each player's name, and then replace userpassword
with their chosen password.
Setting Admin
While you are editing this information, if any players are to be set as admins, you can do that too. Simply find the "admin"
line and change false
to true
. That will indicate they are an admin to the game.
Turn off "Anonymous" Connections
In the same config file, up near the beginning is a setting for "anonymous connections".
In order to finish the setup of user accounts, this needs to be set to false
. Otherwise, even though there are accounts setup, it will still let in any player, from anyplace.
Look for the following line, which will usually be line # 4 in the stock config file.
"allowAnonymousConnections" : true
Just change true
to false
.
Save the Config File, and Restart the Server
Save your changes to the config file. Following a restart of the server, only those users in the config file will be able to join, using their passwords!
Your server is now set to private!