3. SquadJS Bot Setup

Admin the easy way! (Skynet not included...)

When you first get your SquadJS bot hosted through Southnode, it comes non-configured. Due to the complex nature of SquadJS and the utility it can provide, we find this to be more fitting so you can properly configure this to your standards and needs.

The bot needs to be updated with a few pieces of information - within Southnode's control panel (if your game server is also hosted through us) this information is found by clicking on your Squad Server, and scrolling down to the notes section - if your game server is not hosted through us, you will require FTP access to the box this is hosted on. Please contact your provider for this information (we can highly recommend one provider if you don't have one already...). Please make sure that any " , and : symbols within this config.json file remain in place and in order. If you do not, you will break the bot and it will not function. This looks like such:

Southnode Server Notes - southnode.net

The main file we're looking to configure for SquadJS is located in the root of the Files tool called config.json. To access this, please use the Files tool by clicking on the blue wrench beside your bot's name within the Southnode control panel, and click Files. You may then select the config.json file. Within the config.json file you will find many different parameters to make this bot your own - however there are a few spots that are required for the bot to run in the first place - below is an extract from this config.json file - this part is located at the very top of the file:

{
"server": {
"id": 1,
"host": "123.12.34.244",
"queryPort": 21111,
"rconPort": 27822,
"rconPassword": "verystrong",
"logReaderMode": "ftp",
"logDir": "/SquadGame/Saved/Logs/",
"ftp": {
"port": 21,
"user": "[email protected]",
"password": "testing",
"useListForSize": false
},

"host": within the " " where in this example is the IP address "123.12.34.244" you will need to substitute this IP address with the IP of your server. For Southnode clients this is found in the notes section for your Squad server.

"queryPort": where in this example the queryPort is listed as 21111 you will need to substitute this port for the Query Port of your server. For Southnode clients this is found in the notes section for your Squad server.

"rconPort": where in this example the rconPort is listed as 27822 you will need to substitute this port for the RCON Port of your server. For Southnode clients this is found in the notes section for your Squad server.

"rconPassword": where in this example the rconPassword is listed as "verystrong" you will need to substitute this port for the RCON Password of your server. For all servers this is found in the Rcon.cfg file within your server.

"logDir": where in this example the logDir is listed as "/SquadGame/Saved/Logs/" you will need to specify the FTP log directory for your server. For Southnode clients you put the name that you have set for your server within our control panel before the rest of the directory. For example if your Squad server was called "Squad - Linux - 5555" in the panel, you would have a logDir that was "Squad - Linux - 5555/SquadGame/Saved/Logs/". Otherwise you can find this exact directory using Filezilla, connecting to the FTP server that the bot will connect with using the same credentials, navigating to the correct folder, and copying the "Remote site:" folder paths (Note an FTP server may change special characters such as / and | to -'s.

"user": where in this example the user is "[email protected]" you will need to substitute this for your FTP login username. For Southnode customers this is the same username as you use to login to the control panel (your email).

"password": where in this example the password is "testing" you will need to substitute this for your FTP password. For Southnode customers this is the same password as you use to login to the control panel.

One more piece of information are required further down within the config.json file, where you will look for text that resembles the following:

"connectors": {
"discord": "123sdf1231asdghd23123asdasdasd",
"awnAPI": {
"orgID": "YourOrgID",
"creds": {
"username": "AwnUsername",
"password": "AwnPassword"
}
},

"discord": This is your Discord bot token. You are required to have a unique token for each discord bot, and SquadJS is no exception. For information on how to obtain this bot token, please visit our page on how to obtain a bot token for use within your own discord bots. Once you have a token, you can copy and paste it as a substitution for what in this example is "123sdf1231asdghd23123asdasdasd", making sure to maintain the " and , within the line. FYI - This token is quite long. The rest of this block isn't required to be changed.

Once these steps have been completed. You can save the file, go back to the main menu, and start your bot!

For more information and in-depth support on how to further customise your SquadJS bot, please head to the Squad RCON Discord by clicking here, or visit their Github page by clicking here!

Full credit goes to Thomas Smyth who built SquadJS along with the Squad RCON team. Visit them on Discord and Github for more!

 

Notes:

There may be edge-cases where the FTP server you are connecting to is slower than expected, or that there are many requests coming in causing SquadJS to timeout. This timeout function normally results in a reconnect, but can cause SquadJS itself to crash.

To avoid this, you can implement a timeout function by adding timeout to the FTP section as below - this timeout by default is set to 2000, however we have found setting it to 10000 may help in some edge-cases:

{
"server": {
"id": 1,
"host": "123.12.34.244",
"queryPort": 21111,
"rconPort": 27822,
"rconPassword": "verystrong",
"logReaderMode": "ftp",
"logDir": "/SquadGame/Saved/Logs/",
"ftp": {
"port": 21,
"timeout": 10000,
"user": "[email protected]",
"password": "testing",
"useListForSize": false
},

Was this answer helpful? 2 Users Found This Useful (2 Votes)