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 configuration | Explanation |
|---|
address | The IP address where the server can be reached (e.g. 192.168.0.157) |
port | The associated and required port (e.g. 49200 —> 192.168.0.157:49200) |
name | The name of the chat server (server name) (e.g. My personal Server!) |
description | A description of the chat server (e.g. This is my personal chat server) |
edition_key | A non-developed argument for configuring an edition |
update | The update channel of the chat server (stable, dev, canary) |
config_ver | Version value of the configuration. Should not be changed. |
| General configuration | Explanation |
|---|
max_message_length | Maximum length of a message (e.g. 256) |
max_users | Maximum number of online users (e.g. ‘32’) |
max_registered_users | Maximum number of registered users (e.g. ‘64’) |
max_username_length | Maximum length of the username (e.g. 32) |
max_password_length | Maximum length of the password (e.g. 32) |
recv_allowed_bytes | Maximum size of the allowed received bytes (e.g. 32) |
watchdog_timeout | Time at which the watchdog should restart the server in the event of a freeze (e.g. 4) |
| Flag configuration | Explanation |
|---|
enable_messages | Activates or deactivates the logging of user messages (true, false) |
enable_queue | Activates or deactivates the queue (true, false) |
debug_mode | Activates or deactivates the debug mode. Useful for tracking errors more easily (true, false) |
online_mode | Activates or deactivates the online mode. This disables all functions of the Strawberry API (Not recommended) (true, false) |
admins_wait_queue | Activates or deactivates whether admins have to wait in the queue. (true, false) |
bots_wait_queue | Activates or deactivates whether bots have to wait in the queue. (true, false) |
special_messages | Activates or deactivates s p e c i a l messages (true, false) |
| Security configuration | Explanation |
|---|
require_signing | Activates or deactivates the need for a verified client. However, this feature is not yet available (true, false) |
signing_key | The signing key for the verified clients |
banned_ips | A list of banned IP addresses (e.g. [192.168.0.157]) |
| Database configuration | Explanation |
|---|
driver | The driver used for database administration (sqlite, mysql) |
check_same_thread | Activates or deactivates the detection of whether something is running in the same thread (true, false) |
host | MySQL database host |
port | MySQL database port |
user | MySQL database username |
password | MySQL database user password |
database_name | MySQL database name |
database_table | MySQL 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 configuration | Explanation |
|---|
language | The language of the client (de_DE, en_US) |
update_channel | The update channel of the client (stable, dev, canary) |
detect_same_system_messages | Activates or deactivates the recognition of identical system messages (true, false) |
config_ver | Version value of the configuration. Should not be changed. |
enable_notifications | Activates 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.0networking:
online_mode: false
keep_alive: true
latency_mode: false
latency_mode_time: 1
| Networking configuration | Explanation |
|---|
online_mode | Activates or deactivates the online mode. This disables all functions of the Strawberry API (Not recommended) (true, false) |
keep_alive | Enables or disables keep-alive pings to the server. Deactivating causes you to be disconnected from the server after a certain time. (true, false) |
latency_mode | Activates or deactivates the latency mode. This is used to continue to offer stability with a slow connection (true, false) |
latency_mode_time | The 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 configuration | Explanation |
|---|
enabled | Activates or deactivates autoserver (automatic connection to a server when the client is started) (true, false) |
server_id | Server ID of the server (e.g. 1, 2) |
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 configuration | Explanation |
|---|
name | Name of the server (e.g. My server) |
address | IP address of the server (e.g. 127.0.0.1) |
port | Port of the server (e.g. 8080) |
type | A separate type description of the server (e.g. programming, school) |
autologin | Activates or deactivates Autologin for this server (true, false) |
compatibility_mode | Activates or deactivates the compatibility mode for this server (true, false) |
credentials/username | The user name required for Autologin (e.g. user) |
credentials/username | The password required for Autologin (e.g. password) |
The compatibility_mode argument is only available for v2.5.0 or higher.