How to Set an Admin on a Factorio Server
Last modified on Sep 2, 2022 in factorio
By Dalton Whalen
Overview
As you expand your empire on a Factorio server, the need to access server commands is sure to arise. Whether a server owner needs to moderate other players to remove troublemakers or to enable a variety of cheats, all of this requires a promotion to the admin role. Once promoted, admins will be able to refill resources, enable cheat mode, adjust inventories, and even manipulate the world itself. With Apex Hosting, promoting a player is as easy as typing in a console command, so we have created this tutorial to guide you through the necessary steps of setting an admin on a Factorio server.
Using the Server Console
- Navigate to the Apex Server Panel, then access your Factorio server.
- In the left-hand menu, select the
Console
option. - Here, enter the following into the text box:
/promote [PlayerName]
- Replace
[PlayerName]
with the desired player’s username. - Press
Enter
or theSend
button to execute the command. - The server should respond with the following:
[PlayerName] was promoted to admin by server
In order to remove a player’s admin access, simply use the following command in the server console, replacing the name like the previous steps:
/demote [PlayerName]
Manually Setting Admins
If you wish to manually remove a player or see a list of all current admins, this can be done by manually adjusting a file within the FTP File Access.
- Return to the Apex Panel, then stop the server.
- In the left-hand menu, select the
FTP File Access
option. - Once logged in, scroll down to the
server-adminlist.json
file. - (Optional) If not present, use the
New File
option to create the file. - On the far-right, press the
Edit
button to open up the text editor. - Use the following format to add players:
[ "PlayerName1", "PlayerName2" ]
- Once complete, press the
Save
button, then restart the server.
Notable Admin Commands
To use commands on a Factorio server, press the ~
key to open the text bar. Then simply enter the desired command starting with a /
.
There are a multitude of commands that are available to admins while on a Factorio server. Below are some examples of commands that you may find beneficial for use on the server. For a full list of commands, visit the Factorio Wiki Page.
/admin - Opens the player management GUI
/ban [Player] [Reason] - Ban a specified player from the server.
/kick [Player] [Reason] - Kick a specified player from the server.
/mute [Player] - Prevents a player from speaking in the server chat.
/server-save - Saves the game on the server.
Common Issues
Using the promote command in the console does not work:
Oftentimes, this is caused by incorrect typing of the command. When using the command, ensure the text begins with a /
, otherwise no results will occur. If the console claims a user is promoted but no in-game commands function, ensure the username was spelled correctly, then restart the server to ensure it is loaded.
Adding players manually does not function:
This often occurs due to the formatting within the server-adminlist.json file. To ensure it is formatted properly, highlight all of the text within the file, then paste in the code example from above. If you only wish to have one user promoted, simply remove the “PlayerName2” line, as well as the comma on the end of the first user. Afterwards, save the file and restart the server to check the results once more.