Skip to main content

Server Configuration

Every server needs to have a valid configuration file.

Default config (located at cfg/config.json):

{
"name": "Just Cause 4 Multiplayer Server",
"description": "A default server for Just Cause 4 Multiplayer",
"port": 7777,
"max_players": 100,
"password": "",
"announce": true,
"key": "",
"steam_web_api_key": "",
"icon_url": "",
"banner_url": "",
"acl": {},
"update_url": "https://servers.jc4mp.com/api/v1/servers",
"startup_resources": [
"resource1",
"resource2",
"resource3"
]
}

name (string)

This is the name of your server that will appear in the server list.

description (string)

This is the description of your server that will appear in the server list.

port (number)

This is the port that your server will use to allow players to connect to it. This value should be between 1 and 65535, and is 7777 by default. The server also hosts a HTTP server on the port specified in this field + 1. The HTTP server is used to serve information about the server and mods to players.

Make sure that you allow both ports through your firewall, otherwise players will not be able to connect to your server.

max_players (number)

This is the maximum players that can be connected to your server at the same time.

password (string)

This is the password for your server. If it is a valid string, then players who want to connect to your server will be required to enter the correct password before connecting. The default value is an empty string, which means that there will be no password for the server and anyone can connect.

announce (boolean)

Set this to true if you would like to announce your server to the JC4MP server list, allowing anyone to see it and connect to it. If this is false, your server will still run properly, but it will not appear in the server list, so players will need to direct connect with your server's IP instead.

Keep in mind that you also need to have a valid key and update_url for your server to appear on the server list - setting this to true is not enough.

startup_resources (string array)

This field is a list of resources to load when the server starts up.

acl (object)

This field is used to specify the access control list roles for players on your server. The default value is an empty object, which means that all players will have the default role.

Valid roles are:

  • owner
  • admin
  • moderator
  • normal

The default role is normal.

Example of roles for players via Steam ID:


{
"name": "Just Cause 4 Multiplayer Server",
"description": "A default server for Just Cause 4 Multiplayer",
"port": 7777,
"max_players": 100,
"password": "",
"announce": true,
"key": "",
"steam_web_api_key": "",
"icon_url": "",
"banner_url": "",
"acl": {
"76561198000000000": "owner",
"76561198000000001": "admin",
"76561198000000002": "moderator"
},
"update_url": "https://servers.jc4mp.com/api/v1/servers",
"startup_resources": [
"resource1",
"resource2",
"resource3"
]
}

key (string)

This is your personal server key obtained from the JC4MP Server Dashboard. It should be in this format: JC4MP_pBJVVEZXi3V1e3FDTC039hnc2QYAXloP, where it begins with JC4MP_ and has a random sequence of letters and numbers after it. This server key is used to announce your server to the JC4MP server list. Only one key may be used by a single server at the same time. If you have multiple servers running at the same time that you want on the server list, you should use different server keys.

If this field is empty or the key is not valid, the server will not appear on the server list.

steam_web_api_key (string)

This is your personal Steam Web API key obtained from here. Do not share this with anyone. This is required to enable your server to authenticate players through Steam. You can use the same Steam Web API key for all your servers.

icon_url (string)

URL to an image to use as your server's icon image when shown in the server browser. Maximum and recommended size is 512x512. Aspect ratio should be square. Google drive is not recommended since the URL can change. Supported image formats include png, jpg, and webp. Example image URL: https://jc4mp.com/favicon.png. Maximum file size is 1MB. Supported image hosting domains include: Imgur, Steam, Gravatar, ImageKit, and Cloudinary. Using inappropriate or offensive images will result in your server being blocked from the server list.

URL to an image to use as your server's banner image when shown in the server details page. Maximum size is 1280x720, and recommended size is 766x192. Aspect ratio should be landscape. Supported image formats include png, jpg, and webp. Example image URL: https://jc4mp.com/tornado.webp. Maximum file size is 2MB. Supported image hosting domains include: Imgur, Steam, Gravatar, ImageKit, and Cloudinary. Using inappropriate or offensive images will result in your server being blocked from the server list.


Advanced Configuration

The following fields are advanced configuration options that can break your server if used incorrectly.

mods (boolean)

This field is used to enable or disable mods on your server. If this field is true, the server will load mods from the "mods" folder in the server's root directory. If this field is false, the server will not load any mods. Think of the "mods" folder like the "dropzone" folder you're use to - just put all the mods you want everyone to have in there, and the server will automatically sync them to all players. If you add new mods, you will need to restart the server for them to take effect.

Refer to the Mods Guide for more information on how to use mods on your server.

mods_endpoint (string)

This field is used to specify the endpoint to load mods from. If this field is empty, the server will serve mods from the "mods" folder in the server's root directory. This can cause additional load on the server, so it is recommended to host mods on a separate server and use this field to point to it. Even if you use a different endpoint, you must have the exact same mods in the "mods" folder that you have on the server you're pointing to.

mods_fallback_to_server (boolean)

This field is used to specify whether the server should fallback to the server's own mods if the mods endpoint is not available. If this field is true, the server will fallback to the server's own mods if the mods endpoint is not available. If this field is false, the server will not fallback to the server's own mods if the mods endpoint is not available.

update_url (string)

This field describes the update URL to be used to announce the server to the JC4MP server list. The default value is https://servers.jc4mp.com/api/v1/servers and usually should not be changed.

If this field is empty, the server will not appear the server list.