Update setup page

This commit is contained in:
Maxim Khomutov 2023-07-23 00:10:07 +03:00
parent 8435b00617
commit 9253f24421
2 changed files with 60 additions and 34 deletions

View File

@ -1,31 +1,31 @@
# Greetings from KuiToi Server # Greetings from KuiToi Server
## Well, let's begin ## Well, let's start
###### _(Here are the commands for Linux)_ ###### _(Here are the commands for Linux)_
* **Python 3.10.x** is required to run the server! It won't work on Python 3.11... * **Python 3.10.x** is required to run it! Only this version works, it won't work on Python 3.11...
* You can check the version of your Python installation with the following command: * You can check your Python version like this (you have to laugh here):
```bash ```bash
python3 --version # Python 3.10.6 python3 --version # Python 3.10.6
``` ```
* Clone the repository and navigate to it. * Clone the repository and navigate to it
* Install everything that's needed. * Install everything necessary
* Then, using my "script", remove all unnecessary files and move to the core source code. * Then, using my "script", remove all unnecessary files and move to the core source
```bash ```bash
git clone -b Stable https://github.com/kuitoi/KuiToi-Server.git && cd KuiToi-Server git clone -b Stable https://github.com/kuitoi/KuiToi-Server.git && cd KuiToi-Server
pip install -r requirements.txt pip install -r requirements.txt
mv ./src/ $HOME/ktsrc/ && rm -rf ./* && mv $HOME/ktsrc/* . && rm -rf $HOME/ktsrc mv ./src/ $HOME/ktsrc/ && rm -rf ./* && mv $HOME/ktsrc/* . && rm -rf $HOME/ktsrc
``` ```
* Here's how to view information about the server and start it: * Here's how you can check server info and start it:
```bash ```bash
python3 main.py --help # Displays all available commands python3 main.py --help # Shows all available commands
python3 main.py # Starts the server python3 main.py # Starts the server
``` ```
## Configuration ## Configuration
* After starting the server, a `kuitoi.yaml` file will be created. * After starting, `kuitoi.yaml` will be created
* By default, it looks like this: * By default, it looks like this:
```yaml ```yaml
!!python/object:modules.ConfigProvider.config_provider.Config !!python/object:modules.ConfigProvider.config_provider.Config
@ -36,40 +36,53 @@ Game:
map: gridmap_v2 map: gridmap_v2
max_cars: 1 max_cars: 1
players: 8 players: 8
Server: Options:
debug: false debug: false
description: Welcome to KuiToi Server! encoding: utf-8
language: en language: en
log_chat: true
speed_limit: 0
use_lua: true
use_queue: false
Server:
description: Welcome to KuiToi Server!
name: KuiToi-Server name: KuiToi-Server
server_ip: 0.0.0.0 server_ip: 0.0.0.0
server_port: 30813 server_port: 30814
WebAPI: WebAPI:
enabled: false enabled: false
secret_key: <random_key> secret_key: 3838ccb03c86cdb386b67fbfdcba62d0
server_ip: 127.0.0.1 server_ip: 127.0.0.1
server_port: 8433 server_port: 8433
``` ```
### Auth ### Auth
* If you set `private: false` and do not set a `key`, the server will request a BeamMP key and will not start without it. * If you set `private: false` and don't set a `key`, the server will request a BeamMP key and won't start without it.
* By entering a BeamMP key, the server will appear in the launcher list. * After entering a BeamMP key, the server will appear in the launcher list.
* You can get a key here: [https://beammp.com/k/keys ↗](https://beammp.com/k/keys) * You can get the key here: [https://beammp.com/k/keys ↗](https://beammp.com/k/keys)
### Game ### Game
* `map` specifies only the name of the map. That is, open the mod with the map in `map.zip/levels` - the name of the map will be there, and that's what you need to insert. * `map` is only the name of the map, i.e. open the mod with the map in `map.zip/levels` - the name of the map will be there, that's what we insert.
* `max_cars` - the maximum number of cars per player * `max_cars` - Maximum number of cars per player
* `players` - the maximum number of players * `players` - Maximum number of players
### Options
* `debug` - Whether to output debug messages (for experienced users only, slightly reduces performance)
* `encoding` - Which encoding to use to open files
* `language` - Which language the server will start with (currently available: en, ru)
* `log_chat` - Whether to output chat to the console
* `speed_limit` - Download speed limit for mods (in MB/s)
* `use_lua` - Enable lua support
* `use_queue` - Download mods in queue, i.e. only 1 client can download at a time
### Server ### Server
* `debug` - should debug messages be displayed (for experienced users only; slightly affects performance) * `description` - Server description for the BeamMP launcher
* `description` - server description for the BeamMP launcher * `name` - Server name for the BeamMP launcher
* `language` - the language in which the server will run (currently available: en, ru) * `server_ip` - IP address to assign to the server (for experienced users only, defaults to 0.0.0.0)
* `name` - server name for the BeamMP launcher * `server_port` - On which port the server will work
* `server_ip` - the IP address to be used by the server (for experienced users only; defaults to 0.0.0.0)
* `server_port` - the port on which the server will run
### WebAPI ### WebAPI
##### _Docs are not ready yet_ ##### _Docs are not ready_

View File

@ -36,19 +36,24 @@ Game:
map: gridmap_v2 map: gridmap_v2
max_cars: 1 max_cars: 1
players: 8 players: 8
Server: Options:
debug: false debug: false
description: Welcome to KuiToi Server! encoding: utf-8
language: en language: en
log_chat: true
speed_limit: 0
use_lua: true
use_queue: false
Server:
description: Welcome to KuiToi Server!
name: KuiToi-Server name: KuiToi-Server
server_ip: 0.0.0.0 server_ip: 0.0.0.0
server_port: 30813 server_port: 30814
WebAPI: WebAPI:
enabled: false enabled: false
secret_key: <random_key> secret_key: 3838ccb03c86cdb386b67fbfdcba62d0
server_ip: 127.0.0.1 server_ip: 127.0.0.1
server_port: 8433 server_port: 8433
``` ```
### Auth ### Auth
@ -62,11 +67,19 @@ WebAPI:
* `max_cars` - Максимальное количество машин на игрока * `max_cars` - Максимальное количество машин на игрока
* `players` - Максимально количество игроков * `players` - Максимально количество игроков
### Server ### Options
* `debug` - Нужно ли выводить debug сообщения (только для опытных пользователей, немного теряется в производительности) * `debug` - Нужно ли выводить debug сообщения (только для опытных пользователей, немного теряется в производительности)
* `description` - Описания сервера для лаунчера BeamMP * `encoding` - С какой кодировкой открывать файлы
* `language` - С каким языком запустится сервер (Доступные на данный момент: en, ru) * `language` - С каким языком запустится сервер (Доступные на данный момент: en, ru)
* `log_chat` - Нужно-ли выводить чат в консоль
* `speed_limit` - Ограничение скорости на скачивание модов (В Мб/с)
* `use_lua` - Включить ли поддержку lua
* `use_queue` - Скачивать по очереди, т.е. в один момент может скачивать только 1 клиент
### Server
* `description` - Описания сервера для лаунчера BeamMP
* `name` - Названия сервер для лаунчера BeamMP * `name` - Названия сервер для лаунчера BeamMP
* `server_ip` - Какой IP адрес занять серверу (только для опытных пользователей, по умолчанию 0.0.0.0) * `server_ip` - Какой IP адрес занять серверу (только для опытных пользователей, по умолчанию 0.0.0.0)
* `server_port` - На каком порту будет работать сервер * `server_port` - На каком порту будет работать сервер