Configuration

Server

We use YAML for the configuration of Strawberry Chat. So that you don’t have to write the whole configuration yourself, we have a sample configuration (Legacy/Stable) However, to fully understand which value configures what, you can have a look at this table:

Server configurationExplanation
addressThe IP address where the server can be reached (e.g. 192.168.0.157)
portThe associated and required port (e.g. 49200 —> 192.168.0.157:49200)
nameThe name of the chat server (server name) (e.g. My personal Server!)
descriptionA description of the chat server (e.g. This is my personal chat server)
edition_keyA non-developed argument for configuring an edition
updateThe update channel of the chat server (stable, dev, canary)
config_verVersion value of the configuration. Should not be changed.
Flag configurationExplanation
enable_messagesActivates or deactivates the logging of user messages (true, false)
enable_queueActivates or deactivates the queue (true, false)
max_message_lengthMaximum length of a message (e.g. 256)
max_usersMaximum number of online users (e.g. ‘32’)
max_registered_usersMaximum number of registered users (e.g. ‘64’)
debug_modeActivates or deactivates the debug mode. Useful for tracking errors more easily (true, false)
online_modeActivates or deactivates the online mode. This disables all functions of the Strawberry API (Not recommended) (true, false)
admins_wait_queueActivates or deactivates whether admins have to wait in the queue. (true, false)
bots_wait_queueActivates or deactivates whether bots have to wait in the queue. (true, false)
special_messagesActivates or deactivates s p e c i a l messages (true, false)
Security configurationExplanation
require_signingActivates or deactivates the need for a verified client. However, this feature is not yet available (true, false)
signing_keyThe signing key for the verified clients
banned_ipsA list of banned IP addresses (e.g. [192.168.0.157])
Database configurationExplanation
driverThe driver used for database administration (sqlite, mysql)
check_same_threadActivates or deactivates the detection of whether something is running in the same thread (true, false)
hostMySQL database host
portMySQL database port
userMySQL database username
passwordMySQL database user password
database_nameMySQL database name
database_tableMySQL database table

Some arguments are only available for v1.9.0 (v1.9.0-vacakes-std_stmbv2).

These include: enable_queue, max_users, max_registered_users, admins_wait_queue, bots_wait_queue, special_messages

Some arguments are only available for v1.10.0 (v1.10.0-vacakes-std_stmbv2).

These include: banned_ips, driver, check_same_thread, host, port, user, password, database_name, database_table.

Client

We also use YAML for the configuration of our client. So that you don’t have to write the entire configuration yourself, we have a sample configuration (Legacy/Stable/Main) However, to fully understand which value configures what, you can have a look at this table:

Client configurationExplanation
languageThe language of the client (de_DE, en_US)
update_channelThe update channel of the client (stable, dev, canary)
detect_same_system_messagesActivates or deactivates the recognition of identical system messages (true, false)
config_verVersion value of the configuration. Should not be changed.
enable_notificationsActivates or deactivates the chat notification (true, false)

The argument enable_notifications is only available for v2.6.0 or higher.


Networking

This configuration part refers to the network behavior of the client. The following code block only works as of v2.6.0

networking:
  online_mode: false
  keep_alive: true
  latency_mode: false
  latency_mode_time: 1
Networking configurationExplanation
online_modeActivates or deactivates the online mode. This disables all functions of the Strawberry API (Not recommended) (true, false)
keep_aliveEnables or disables keep-alive pings to the server. Deactivating causes you to be disconnected from the server after a certain time. (true, false)
latency_modeActivates or deactivates the latency mode. This is used to continue to offer stability with a slow connection (true, false)
latency_mode_timeThe time between certain latency events (e.g. 1, 2, 0.5)

Some arguments are only available for v2.6.0. These include: latency_mode, latency_mode_time.


Autoserver

This configuration section refers to the autoserver behavior of the client.

autoserver:
  enabled: false
  server_id: 2
Autoserver configurationExplanation
enabledActivates or deactivates autoserver (automatic connection to a server when the client is started) (true, false)
server_idServer ID of the server (e.g. 1, 2)

Preconfigured servers

This configuration section refers to preconfigured servers. An example configuration could be structured as follows:

2: 
name: localhost
address: 127.0.0.1
port: 8080
type: Local Development Server
autologin: true
compatibility_mode: false
credentials:
    username: username
    password: password
Server configurationExplanation
nameName of the server (e.g. My server)
addressIP address of the server (e.g. 127.0.0.1)
portPort of the server (e.g. 8080)
typeA separate type description of the server (e.g. programming, school)
autologinActivates or deactivates Autologin for this server (true, false)
compatibility_modeActivates or deactivates the compatibility mode for this server (true, false)
credentials/usernameThe user name required for Autologin (e.g. user)
credentials/usernameThe password required for Autologin (e.g. password)

The compatibility_mode argument is only available for v2.5.0 or higher.