Difference between revisions of "Headless Client/Configuration File"

From Neos Wiki
Jump to navigation Jump to search
Line 81: Line 81:
 
|-
 
|-
 
|'''allowedUrlHosts'''
 
|'''allowedUrlHosts'''
|<code>array,null</code>
+
|<code>string array</code>
 
|A list of hosts which will automatically be allowed for in-Neos HTTP/WebSocket operations
 
|A list of hosts which will automatically be allowed for in-Neos HTTP/WebSocket operations
 
|No
 
|No
 
|-
 
|-
 
|'''autoSpawnItems'''
 
|'''autoSpawnItems'''
|<code>array,null</code>
+
|<code>string array</code>
 
|A list of item URIs to spawn in when a world starts.
 
|A list of item URIs to spawn in when a world starts.
 
|No
 
|No

Revision as of 10:17, 24 October 2021

Headless Clients have a lot of configuration potential. To achieve this a configuration file is used. Configuration files are written in JSON.

Default Configuration File

A default configuration file can be found within the Headless Client installation directory's Config subdirectory. It is named DefaultConfig.json.

Creating your own Configuration File

To get started configuring things, copy the DefaultConfig.json file to a new file called Config.json. This will be automatically picked up when you run a Headless Client. Once copied we recommend editing the comment property to be something which describes the function of this file. Its value from the default file is incorrect so give it a comment which reflects what you intend to use it with.

After this you can proceed to edit your configuration file, following the Configuration File Format.

Using multiple configuration files

When running Neos.exe you can use the command line option -c to specify a configuration file. This lets you maintain multiple configuration files for multiple projects or events. For example you could create and use:

  • Neos.exe -c Config/CoolConvention.json - For a large Convention or event
  • Neos.exe -c Config/SeriousBusinessMeeting.json - For a very serious business meeting.

It's up to you but feel free to write and use as many files as you'd like.

File Format

The headless configuration file has a lot of options and most of them are optional.

Name Type Description Required
comment string An optional free form comment for this file. Used for identification for your configuration. No
loginCredential string Neos username for this Headless Server to use. ✓ Yes
loginPassword string Neos user password for the Headless Server to use. ✓ Yes
startWorlds See #Start Worlds An array of worlds/sessions to start/create when this Headless Server starts. ✓ Yes
universeId string Optionally, specifies which universe this Headless Server will be in. See our wiki article on Universes for more info. No
tickRate number Configures how many ticks(updates), should occur per second. Default is 60. No
maxConcurrentAssetTransfers integer Specifies the maximum concurrent asset transfers for this headless server. Default is 4. No
usernameOverride string Configures a username which will override LoginCredential, within the world browser etc. No
dataFolder string Optionally, override the folder which Neos will use to store data for this Headless Server. No
cacheFolder string Optionally, override the folder which Neos will use to store cache for this Headless Server. No
logsFolder tring Optionally, override the folder which Neos will use to store logs for this Headless Server. No
allowedUrlHosts string array A list of hosts which will automatically be allowed for in-Neos HTTP/WebSocket operations No
autoSpawnItems string array A list of item URIs to spawn in when a world starts. No
metamovieRoles object Legacy content for the MetaMovie Project. Feel Free to ignore No