This page is a work in progress and could be pending updates.
Server Config Settings
Instance
Multiple instances are supported. Each instance has its own node in the config file.
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AckSendingDelayMilliseconds | Long | 5 | – | How long the server waits before sending an ACK, allowing it to piggyback onto a data packet. Doesn't increase latency. |
| AOInitialQueueSize | Long | |||
| AOMaxConsecutiveOperations | Long | |||
| AppDataInactivityTimeout | Long | A timeout for the application (managed code) if it doesn't get any data, as opposed to low-level (native code) keep-alive pings. | ||
| DatagramSocketAllocatorPoolSize | Short | – | – | Number of datagram sockets kept in the pool for later reuse. Trade-off of speed vs resources. |
| DatagramSocketMaxConsecutiveOperations | Short | |||
| DatagramSocketMaxPooledBuffers | Short | |||
| DataSendingDelayMilliseconds | Long | 5 | – | How long the server waits to accumulate more data before sending. Larger = fewer datagrams but higher latency. |
| DefaultPacketThrottle | Long | |||
| DisplayName | String | – | LoadBalancing (MyCloud) | Optional display name for this instance, shown in Photon Control. |
| DumpType | Full, Maxi, Mini | Full | – | Type of crash dumps: "Full", "Maxi", or "Mini". Less info but less disk space from first to last. |
| EnableInstanceCounters | Bool | – | – | |
| EnablePerformanceCounters | Bool | – | – | Determines whether performance counters are enabled. Requires suitable privileges for shared memory segment creation. |
| EnableTotalCounters | Bool | – | – | |
| EncTypesAllowed | ALL|CLEAR|CBC|GCM | ALL | ||
| ENETBufferAllocatorPoolSize | Long | – | – | Number of ENet buffers kept in pool for reuse. Trade-off of speed vs resources. |
| LogFileLocation | String | – | – | Sets the path for logfiles. Can be absolute or relative to PhotonSocketServer.exe. |
| LogFileName | String | – | – | |
| LoggingEnabled | Bool | – | – | |
| LogUnimportantExceptions | Bool | |||
| MaxDumpsToAttemptToProduce | Long | 10 | – | |
| MaxDumpsToProduce | Long | 10 | – | Maximum number of dump files written. New ones can be written if old files are moved/deleted. |
| MaximumRetransmitTimeout | Long | 0 | – | Maximum retransmission time. 0 = feature is turned off. |
| MaximumTimeout | Long | 30000 | 30000 | Maximum time before an ENet peer's lack of response causes a timeout disconnect. Determined dynamically per peer based on RTT. |
| MaxInboundQueuedDataPerPeer | Long | |||
| MaxMessageSize | Long | – | 512000 | Max bytes for a UDP, TCP or WebSocket message. Exceeding disconnects the client. Can be overridden per listener. |
| MaxQueuedDataPerPeer | Long | 163840 | 512000 | Max reliable data a peer can queue. Once exceeded, future reliable sends return an error code. |
| MinimumRetransmitTimeout | Long | 200 | – | Minimum retransmission time. Low-latency peers may be delayed. Reduces server load. |
| MinimumTimeout | Long | 5000 | 5000 | Minimum time before an ENet peer timeout disconnect. Determined dynamically per peer based on RTT. |
| Name | String | Instance name. | ||
| PacketThrottleAcceleration | Long | |||
| PacketThrottleCounter | Long | |||
| PacketThrottleDeceleration | Long | |||
| PacketThrottleEnabled | Bool | – | – | |
| PacketThrottleScale | Long | |||
| PacketThrottlInterval | Long | |||
| PacketTraceRingBufferSize | Long | |||
| PeerMaxPooledBuffers | Long | |||
| PerPeerMaxReliableDataInTransit | Long | 16384 | 51200 | Max reliable data in-flight (bytes) before queuing. Once reached, future reliable data is queued. |
| PerPeerTransmitRateLimitKBSec | Long | 256 | 256 | Max data (reliable + unreliable) per second in KB. When reached, reliable data queued, unreliable dropped. |
| PerPeerTransmitRatePeriodMilliseconds | Long | – | 200 | How often the transmit rate limit is checked. Smaller = smoother; larger = less resources. |
| PingIntervalMilliseconds | Long | – | – | How often a ping is sent when no data flows. Larger = less server load. Defaults to ENet standard 500ms. |
| ProduceDumps | Bool | TRUE | – | Enable or disable crash dump file creation. |
| ReportOnJob | Bool | – | – | Determines if Photon is running inside a Win32 job object and reports on imposed limits. |
| RoundTripThrottleMultiplier | Long | |||
| RTTACKAdjustmentTimeout | Long | 0 | – | When set, uses last retransmit-timeout (fast resend) instead of ×2 if peer received data during this period. 0 = off. |
| SchemaValidationFailureIsFatal | Bool | Set to false to prevent schema validation errors being fatal during startup. | ||
| ShutdownTimeout | Long | 60000 | – | Timeout (ms) before forcibly killing the Photon process on shutdown. Minimum value is 60000. |
| StreamSocketAllocatorPoolSize | Short | – | – | Number of TCP sockets kept in pool for reuse. Trade-off of speed vs resources. |
| StreamSocketMaxConsecutiveOperations | Short | – | – | |
| StreamSocketMaxPooledBuffers | Short | |||
| TCPBufferAllocatorPoolSize | Long | – | – | Number of TCP data transfer buffers kept in pool for reuse. |
| TCPBufferSize | Long | – | – | Size of buffer for TCP data transfer. Doesn't restrict message size. Ideally slightly more than average message size. |
| UnreliableQueueTimeout | Long | |||
| UnsequencedFragments | Bool | FALSE | – | Fragmented messages for non-reliable data will be sent as Unsequenced. |
| ValidateSchema | Bool | Set to false to prevent schema validation errors being detected at startup. |
IOPool
Handles all I/O operations: datagram sending/reception, TCP read completions, etc. Can also handle ENet protocol operations if ENetThreadPool\OnlyDispatchTimers is "true".
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| NumThreads | Short | 4 | – | Number of threads for socket I/O. 4–8 is good. 0 = 2× CPU cores. |
| NumEntriesPerCall | Short | – | – |
ENetThreadPool
Used for all ENet protocol operations: deblocking inbound datagrams, ACK handling, retransmission, and ping generation.
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| DispatchTimeout | Long | 100 | – | If a work item isn't picked up within this many ms, a new thread may be started. |
| InitialThreads | Short | 8 | – | Number of threads the pool starts with. |
| MaxDormantThreads | Short | 8 | – | Max idle threads before excess are shut down. |
| MaxThreads | Short | 8 | – | Max threads. If Initial=Min=Max, pool is static (more efficient). |
| MinThreads | Short | 8 | – | Minimum threads in the pool. |
| OnlyDispatchTimers | Bool | FALSE | – | If true, only ENet timer operations use this pool. If false, all ENet protocol operations are dispatched here. |
| PoolMaintPeriod | Long | 5000 | – | How often (ms) the pool checks on and shuts down dormant threads. |
Runtime
Defines the Photon Runtime behavior.
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| ApplicationRootDirectory | String | – | – | |
| Assembly | String | – | PhotonHostRuntime, Culture=neutral | Photon Runtime assembly. MUST be signed by Exit Games key. PublicKeyToken must NOT be specified. |
| CLRBaseDirectory | String | – | – | |
| CLRVersion | String | – | – | Load a specific .NET runtime version (e.g. "v4.0" or "v2.0"). By default uses latest. |
| EnableMDA | Bool | FALSE | – | Enables managed debugging assistants. Configure with a .mda.config file. |
| GCConcurrent | Bool | TRUE | – | |
| GCServer | Bool | TRUE | – | |
| GCTrimming | Bool | TRUE | – | |
| NoiseyManagedFailures | Bool | |||
| Type | String | – | PhotonHostRuntime .PhotonDomainManager | Domain manager type. MUST derive from IPhotonDomainManager. |
| UnhandledExceptionPolicy | Ignore, TerminateProcess | TerminateProcess | TerminateProcess | ReloadAppDomain value is OBSOLETE. |
Applications
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Default | String | – | NameServer | Default application if none specified. |
| PassUnknownAppsToDefaultApp | Bool | FALSE | – | If true, unknown app names use default. If false, fatal error terminating the connection. |
Application
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| ApplicationRootDirectory | String | – | – | |
| Assembly | String | – | – | Assembly to use. Can include full specification with PublicKeyToken. |
| BaseDirectory | String | – | – | Should contain a "bin" folder with all assemblies and config files. |
| Name | String | – | – | Arbitrary name for dispatch. |
| StartTimeoutMilliseconds | Long | 0 | – | Photon shuts down if app doesn't start in time. 0 = no timeout. |
| StopTimeoutMilliseconds | Long | 0 | – | Photon shuts down if app doesn't stop in time. 0 = no timeout. |
| Type | String | – | – | Type loaded as the application. MUST derive from IPhotonApplication. |
TCPListener
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AppDataInactivityTimeout | Long | Timeout for managed code if no data received (vs native keep-alive pings). | ||
| CertificatePath | String | |||
| CertificateValidationExceptions | String | |||
| CipherList | String | |||
| CounterName | String | |||
| Counters | Bool | |||
| CustomConnectMessageIsRequired | Bool | – | FALSE | If true, a custom prefix/suffix is required on each Connect message. |
| CustomConnectMessagePrefix | String | – | – | String ignored if sent as prefix of a client's connect message. |
| CustomConnectMessageSuffix | String | – | – | String ignored if sent as suffix of a client's connect message. |
| DefaultApplication | String | – | – | Default app for this listener if client connects to an unloaded app. Overrides global Default. |
| DefaultDomain | String | |||
| Disabled | Bool | FALSE | ||
| DisableNagle | Bool | TRUE | TRUE | If true, Nagle is disabled; outbound TCP data sent immediately. May improve latency. |
| FlowControlMaxQueuedBytes | Long | |||
| InactivityTimeout | Long | 5000 | 5000 | Time (ms) between data receipts before connection is aborted. 0 = disabled. |
| IPAddress | String | 0.0.0.0 | – | IP to listen on. 0.0.0.0 = all interfaces. |
| IPAddressIPv6 | String | :: | – | IPv6 address to listen on. :: = all interfaces. |
| ListenBacklog | Short | – | 150 | Size of listen backlog queue. Affects simultaneous connection establishment, not active connections. |
| LoggingEnabled | Bool | TRUE | ||
| MaxInboundMessageSize | Long | – | – | Max inbound message bytes. Default is MaxMessageSize. |
| MaxMessageSize | Long | |||
| MaxOutboundMessageSize | Long | – | – | Max outbound message bytes. Default is MaxMessageSize. |
| MaxProtocolVersion | String | |||
| MessageRateLimit | Long | |||
| MessageRateLimitPeriod | Long | |||
| MinProtocolVersion | String | |||
| OverrideApplication | String | – | – | Override application for this connector. Client selection is ignored. |
| ParentCounters | String | |||
| PolicyFile | – | – | ||
| Port | UShort | 4530 | 4530 | Port to listen on. |
| RateLimitKBSec | Long | |||
| RateLimitMessageSec | Long | |||
| RateLimitPeriod | Long | |||
| RateLimitRate | Short | |||
| RecvBufferSize | Long | – | 0 | TCP recv buffer / window size. 0 = OS default. |
| RootCertificates | String | |||
| Secure | Bool | |||
| SendBufferSize | Long | – | 0 | TCP send buffer size. 0 = OS default. |
| SupportClearTextConnections | Bool | |||
| ValidClientCertificateDomains | String |
ServerCertificate (TCP)
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Certificate | String | |||
| Key | String | |||
| Path | String |
UDPListener
To define a list of UDP/ENet listeners.
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| DefaultApplication | String | – | – | See TCPListener. |
| Disabled | Bool | FALSE | – | |
| EncTypesAllowed | ALL|CLEAR|CBC|GCM | ALL | – | |
| IPAddress | String | 0.0.0.0 | 0.0.0.0 | IP to listen on. 0.0.0.0 = all interfaces. |
| IPAddressIPv6 | String | :: | – | IPv6 address. :: = all interfaces. |
| ListenBacklog | Short | – | 500 | See TCPListener. |
| MaxInboundMessageSize | Long | – | – | See TCPListener. |
| MaxMessageSize | Long | – | – | |
| MaxOutboundMessageSize | Long | – | – | See TCPListener. |
| Name | String | |||
| OverrideApplication | String | – | – | See TCPListener. |
| PacketTraceRingBufferSize | Long | – | – | |
| PerPeerMaxReliableDataInTransit | Long | – | – | |
| PerPeerTransmitRateLimitKBSec | Long | – | – | |
| Port | UShort | 5055 | 5055 | Port to listen on. |
| RecvBufferSize | Long | – | – | |
| SendBufferSize | Long | – | – | |
| TraceAllPeers | Bool | FALSE | – | |
| TraceEnabled | Bool | FALSE | – | |
| TracePeerTimeouts | Bool |
PolicyFileListener
Same as TCPListener plus additional settings.
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AppDataInactivityTimeout | Long | Timeout for managed code if no data received. | ||
| CertificatePath | String | |||
| CertificateValidationExceptions | String | |||
| CipherList | String | |||
| CounterName | String | |||
| Counters | Bool | |||
| CustomConnectMessageIsRequired | Bool | – | FALSE | If true, custom prefix/suffix required on Connect. |
| CustomConnectMessagePrefix | String | – | – | See TCPListener. |
| CustomConnectMessageSuffix | String | – | – | See TCPListener. |
| DefaultApplication | String | – | – | See TCPListener. |
| DefaultDomain | String | |||
| Disabled | Bool | FALSE | ||
| DisableNagle | Bool | TRUE | TRUE | See TCPListener. |
| FlowControlMaxQueuedBytes | Long | |||
| InactivityTimeout | Long | 5000 | 5000 | See TCPListener. |
| IPAddress | String | 0.0.0.0 | – | See TCPListener. |
| IPAddressIPv6 | String | :: | – | See TCPListener. |
| ListenBacklog | Short | – | 150 | See TCPListener. |
| LoggingEnabled | Bool | TRUE | ||
| MaxInboundMessageSize | Long | – | – | See TCPListener. |
| MaxMessageSize | Long | |||
| MaxOutboundMessageSize | Long | – | – | See TCPListener. |
| MaxProtocolVersion | String | |||
| MinProtocolVersion | String | |||
| OverrideApplication | String | – | – | See TCPListener. |
| ParentCounters | String | |||
| PolicyApplication | String | |||
| PolicyFile | – | – | ||
| Port | UShort | 4530 | 4530 | Port to listen on. |
| RateLimitKBSec | Long | |||
| RateLimitPeriod | Long | |||
| RateLimitRate | Short | |||
| RecvBufferSize | Long | – | 0 | See TCPListener. |
| RootCertificates | String | |||
| Secure | Bool | |||
| SendBufferSize | Long | – | 0 | See TCPListener. |
| SupportClearTextConnections | Bool | |||
| ValidClientCertificateDomains | String |
ServerCertificate (Policy)
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Certificate | String | |||
| Key | String | |||
| Path | String |
S2S
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AppDataInactivityTimeout | Long | Timeout for managed code if no data received. | ||
| Certificate | String | |||
| CertificatePath | String | See TCPListener. | ||
| CipherList | String | See TCPListener. | ||
| ConnectTimeout | Long | |||
| DisableNagle | Bool | – | TRUE | See TCPListener. |
| FlowControlMaxQueuedBytes | Long | See TCPListener. | ||
| InactivityTimeout | Long | See UDPListener. | ||
| Key | String | |||
| LoggingEnabled | Bool | TRUE | See TCPListener. | |
| MaxInboundMessageSize | Long | – | – | See UDPListener. |
| MaxMessageSize | Long | See UDPListener. | ||
| MaxOutboundMessageSize | Long | – | – | See UDPListener. |
| MaxProtocolVersion | String | |||
| MinProtocolVersion | String | |||
| Password | String | |||
| PingFrequency | Short | – | 2500 | How often a ping is sent when no data is flowing. |
| RateLimitKBSec | Long | See TCPListener. | ||
| RateLimitPeriod | Long | See TCPListener. | ||
| RateLimitRate | Short | See TCPListener. | ||
| RecvBufferSize | Long | – | – | See UDPListener. |
| RootCertificates | String | See TCPListener. | ||
| Secure | Bool | See TCPListener. | ||
| SendBufferSize | Long | – | – | See UDPListener. |
| WriteCompletionTimeout | Long |
SecurePorts / SecurePort
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Port | UShort | – | – |
HTTPListener
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AppDataInactivityTimeout | Long | Timeout for managed code if no data received. | ||
| CertificatePath | String | – | See TCPListener. | |
| CertificateValidationExceptions | String | See TCPListener. | ||
| CipherList | String | – | See TCPListener. | |
| CounterName | String | See TCPListener. | ||
| Counters | Bool | See TCPListener. | ||
| CustomConnectMessagePrefix | String | See TCPListener. | ||
| CustomConnectMessageSuffix | String | See TCPListener. | ||
| DefaultApplication | String | – | – | |
| DefaultDomain | String | See TCPListener. | ||
| Disabled | Bool | FALSE | See UDPListener. | |
| DisableNagle | Bool | See TCPListener. | ||
| FlowControlMaxQueuedBytes | Long | See TCPListener. | ||
| InactivityTimeout | Long | 10000 | 10000 | See UDPListener. |
| IPAddress | String | 0.0.0.0 | 0.0.0.0 | See UDPListener. |
| IPAddressIPv6 | String | :: | – | See UDPListener. |
| ListenBacklog | Short | – | – | See UDPListener. |
| LoggingEnabled | Bool | See TCPListener. | ||
| MaxHeaders | Long | |||
| MaxHeadersLength | Long | |||
| MaxInboundMessageSize | Long | – | – | See TCPListener. |
| MaxMessageSize | Long | |||
| MaxOutboundMessageSize | Long | – | – | See TCPListener. |
| MaxProtocolVersion | String | |||
| MaxUriLength | Long | |||
| MinProtocolVersion | String | See TCPListener. | ||
| NoCache | Bool | |||
| OverrideApplication | String | – | – | See TCPListener. |
| ParentCounters | String | See TCPListener. | ||
| PeerType | Simple, Reliable, WebSocket | |||
| PermittedOrigins | String | |||
| Ping | Bool | |||
| PolicyFile | String | |||
| Port | UShort | – | 9091 | See UDPListener. |
| RateLimitKBSec | Long | See TCPListener. | ||
| RateLimitPeriod | Long | See TCPListener. | ||
| RateLimitRate | Short | See TCPListener. | ||
| RecvBufferSize | Long | See UDPListener. | ||
| RouteCounters | Bool | |||
| Secure | Bool | FALSE | See TCPListener. | |
| SendBufferSize | Long | See UDPListener. | ||
| SupportClearTextConnections | Bool | See TCPListener. | ||
| Url | String | |||
| ValidClientCertificateDomains | String | See TCPListener. | ||
| WebHook | Bool |
ServerCertificate (HTTP)
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Certificate | String | |||
| Key | String | |||
| Path | String |
StandardHeaders (HTTP)
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Name | String | |||
| Value | String |
Routing / Route
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| AppDataInactivityTimeout | Long | Timeout for managed code if no data received. | ||
| CounterName | String | |||
| Counters | Bool | |||
| DefaultApplication | String | |||
| DisableNagle | Bool | See TCPListener. | ||
| InactivityTimeout | Long | – | ||
| MaxInboundMessageSize | Long | |||
| MaxMessageSize | Long | |||
| MaxOutboundMessageSize | Long | |||
| Name | String | |||
| NoCache | Bool | |||
| OverrideApplication | String | – | ||
| ParentCounters | String | |||
| PeerType | Simple, Reliable, WebSocket | |||
| PermittedOrigins | String | |||
| Ping | Bool | |||
| PingEvery | Long | Only WebSockets. | ||
| SubProtocols | String | Only WebSockets. | ||
| Url | String | |||
| WebHook | Bool |
StandardHeaders (Route)
| Setting | Type | Photon Default | Config Default | Description |
|---|---|---|---|---|
| Name | String | |||
| Value | String |