Skip to content

Commit 1f84079

Browse files
committed
Update Docs
1 parent 74add23 commit 1f84079

13 files changed

+240
-159
lines changed

docs/development/setup-minetrax-locally-for-dev.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ For development, we will need the following software:
2323
1. A Web Server. Apache or Nginx
2424
1. Git
2525
1. Node.js
26-
1. PHP 8.1+
26+
1. PHP 8.3+
2727
1. Composer
2828
1. MySQL 8+
2929
1. Redis Server

docs/installation/setup-web-autoinstaller.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,15 @@ If you looking for affordable & good VPS providers, you can try [DigitalOcean](h
4040

4141
## Installation
4242
:::caution
43-
AutoInstaller should only be used in a fresh VPS/Dedicated Server. Do not use it on a server with any other software installed, use [Manual Installation](../installation/setup-web-manually) instead for such case.
43+
**AutoInstaller should only be used in a fresh VPS/Dedicated Server.**
44+
45+
DO NOT use it on a server with any other software already installed as it might override your existing files and data.
46+
47+
Use [Manual Installation](../installation/setup-web-manually) instead for such case. When in doubt, contact us on [Discord](https://discord.gg/Hzfj27k).
4448
:::
4549

50+
51+
4652
SSH into your VPS/Dedicated Server and run the following command (Make sure to run the script with `root` user, if you are not logged in as root, you can switch to root using `sudo su root` command):
4753

4854
```

docs/installation/setup-web-manually.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Web requires a VPS or Dedicated Server with atleast 2GB of RAM and 1 CPU. Ubuntu
2727

2828
Software Dependencies:
2929

30-
- PHP 8.1+
30+
- PHP 8.3+
3131
- MySQL 5.7+ or MariaDB 10.2.7+
3232
- Apache2 or Nginx
3333
- NodeJS 12+
@@ -59,14 +59,15 @@ sudo apt install software-properties-common && sudo add-apt-repository ppa:ondre
5959
sudo apt update
6060
```
6161

62-
Install PHP 8.2 and all required extensions.
62+
Install PHP 8.4 and all required extensions.
6363

6464
```bash
65-
sudo apt -y install curl php8.2 php8.2-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip,intl,redis}
65+
sudo apt -y install curl php8.4 php8.4-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip,intl,redis}
6666
```
6767

6868
### MySQL / MariaDB
6969

70+
7071
:::caution
7172
Make sure to only install one. Either MySQL or MariaDB. If installing MariaDB, make sure its version is >10.2.7.
7273
:::
@@ -101,7 +102,7 @@ Make sure to only install one. Either Nginx or Apache2.
101102
Install Apache2 server and php extension for it.
102103

103104
```bash
104-
sudo apt install apache2 libapache2-mod-php8.2
105+
sudo apt install apache2 libapache2-mod-php8.4
105106
sudo systemctl restart apache2
106107
```
107108

@@ -110,7 +111,7 @@ sudo systemctl restart apache2
110111
Install Nginx server and php-fpm runner.
111112

112113
```bash
113-
sudo apt install nginx php8.2-fpm
114+
sudo apt install nginx php8.4-fpm
114115
```
115116

116117
</TabItem>

docs/upgrade.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ It is highly recommened to always keep your version updated to get latest featur
2020
| 3.5.0 | 3.5.0 | | `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
2121
| 4.3.0 | 4.0.2 | | `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
2222
| 5.1.0 | 5.0.0 | | `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
23-
| 6.0.0 | 6.0.0 | | `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
24-
| <b>6.3.0</b> | <b>6.3.0</b> || `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
23+
| 6.0 | 6.0 | | `8.1+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20` |
24+
| <b>7.0</b> | <b>7.0</b> || `8.3+` | `1.16`, `1.17`, `1.18`, `1.19`, `1.20`, `1.21` |
25+
2526

2627
You can update your Web using either Automatic or Manual method.
2728

docs/web/askdb-ai-bot-feature.md

Lines changed: 117 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,146 @@ id: askdb-ai-bot
66

77
AskDB is a powerful AI base database query system that allows you to ask questions about your server and players. You can ask questions like "How many players joined my server in the last 24 hours?" or "What is the average player rating of my server?" and AskDB will answer them for you.
88

9-
![AskDB](../../static/img/tutorial/askdb1.png)
9+
![AskDB](../../static/img/askdb-light2.png)
1010

1111
## How it works?
1212

13-
AskDB uses OpenAI GPT-3 to answer your questions. It uses the data from your server to answer your questions.
14-
Since it uses OpenAI APIs, you need to have an OpenAI account and API key to use AskDB.
13+
AskDB uses various LLM (Large Language Model) providers to answer your questions. It uses the data from your server to answer your questions.
14+
Since it uses LLM APIs, you need to have an account on any supported LLM provider and their respective API key to use AskDB.
1515

16-
:::info OpenAI Pricing
17-
OpenAI is a paid service and it charges you for every API request you make.
18-
You can check the pricing of OpenAI [here](https://openai.com/pricing/).
16+
## Supported LLM Providers
1917

20-
Its always good to be careful and add usage limit in your OpenAI account setting.
21-
22-
_Rough Cost Estimate: 1 query to AskDB will cost you around $0.0010 in OpenAI usage._
23-
:::
18+
- OpenAI (GPT-3.5, GPT-4)
19+
- Anthropic (Claude)
20+
- Ollama (Local models)
21+
- Mistral
22+
- Groq
23+
- XAI (Xai)
24+
- Google (Gemini)
25+
- DeepSeek
2426

2527
## How to enable AskDB?
2628

2729
AskDB is disabled by default. To enable it, you need to follow these steps:
2830

29-
### 1. Create an OpenAI account
31+
### 1. Choose and Setup an LLM Provider
32+
33+
By default, AskDB uses OpenAI's GPT-4 Turbo model. You only need to set different environment variables if you want to use a different provider or model.
34+
35+
:::note Model Selection
36+
The models(AI_MODEL) listed below are examples as of March 2024. Each provider frequently releases new and improved models. When setting up AskDB, check your chosen provider's documentation for their latest available models and choose one that best fits your needs in terms of capabilities and cost. The model names and capabilities might have changed since this documentation was written.
37+
:::
38+
39+
#### OpenAI (Default)
40+
1. Go to [OpenAI](https://openai.com/) and create an account (Login if you already have one)
41+
2. Navigate to `API Keys` section in your account settings
42+
3. Create a new API key
43+
4. Use these environment variables:
44+
```env
45+
AI_PROVIDER=openai # Optional, this is default
46+
OPENAI_API_KEY=sk-...
47+
AI_MODEL=gpt-4o-mini # Optional, this is default
48+
```
49+
50+
#### Anthropic (Claude)
51+
1. Go to [Anthropic](https://www.anthropic.com/) and create an account
52+
2. Get your API key from the dashboard
53+
3. Use these environment variables:
54+
```env
55+
AI_PROVIDER=anthropic
56+
ANTHROPIC_API_KEY=sk-ant-...
57+
AI_MODEL=claude-3-opus-20240229 # Latest Claude model with similar capabilities
58+
```
59+
60+
#### Ollama (Local Models)
61+
1. [Install Ollama](https://ollama.ai/) on your system
62+
2. Start the Ollama server
63+
3. Use these environment variables:
64+
```env
65+
AI_PROVIDER=ollama
66+
OLLAMA_API_BASE=http://localhost:11434
67+
AI_MODEL=mixtral # Mixtral 8x7B model recommended for similar capabilities
68+
```
69+
70+
#### Mistral
71+
1. Go to [Mistral AI](https://mistral.ai/) and create an account
72+
2. Get your API key from the platform
73+
3. Use these environment variables:
74+
```env
75+
AI_PROVIDER=mistral
76+
MISTRAL_API_KEY=...
77+
AI_MODEL=mistral-large-latest # Latest large model
78+
```
79+
80+
#### Groq
81+
1. Sign up at [Groq](https://www.groq.com/)
82+
2. Generate your API key from the dashboard
83+
3. Use these environment variables:
84+
```env
85+
AI_PROVIDER=groq
86+
GROQ_API_KEY=gsk_...
87+
AI_MODEL=mixtral-8x7b-32768 # Mixtral model on Groq's infrastructure
88+
```
89+
90+
#### XAI
91+
1. Get access to XAI's platform
92+
2. Generate your API credentials
93+
3. Use these environment variables:
94+
```env
95+
AI_PROVIDER=xai
96+
XAI_API_KEY=...
97+
AI_MODEL=xai-large # Their most capable model
98+
```
99+
100+
#### Google (Gemini)
101+
1. Go to [Google AI Studio](https://makersuite.google.com/)
102+
2. Create a project and get your API key
103+
3. Use these environment variables:
104+
```env
105+
AI_PROVIDER=gemini
106+
GEMINI_API_KEY=...
107+
AI_MODEL=gemini-pro # Their most capable text model
108+
```
30109

31-
Go to [OpenAI](https://openai.com/) and create an account (Login if you already have one).
32-
Then go to `Manage Account` and then `API Keys` and create a new API key.
110+
#### DeepSeek
111+
1. Visit [DeepSeek](https://deepseek.ai/) and create an account
112+
2. Generate your API key
113+
3. Use these environment variables:
114+
```env
115+
AI_PROVIDER=deepseek
116+
DEEPSEEK_API_KEY=...
117+
AI_MODEL=deepseek-chat-67b # Their most capable chat model
118+
```
33119

34120
### 2. Enable AskDB
35121

36-
Open .env file of your MineTrax Installation and change these two variables:
122+
Open .env file of your MineTrax Installation and edit these variables:
37123

38124
```env
125+
AI_ENABLED=true
39126
ASKDB_ENABLED=true
127+
```
128+
129+
Add/Edit the environment variables for the LLM provider you chose in the previous step.
130+
Eg: If you chose OpenAI, add the following variables:
131+
```env
132+
AI_PROVIDER=openai
40133
OPENAI_API_KEY=sk-...
134+
AI_MODEL=gpt-4o-mini # Optional, this is default
41135
```
42136

43-
Make sure to replace `sk-...` with your OpenAI API key.
137+
### 3. Run update
44138

45-
### 3. Done!
139+
Run the update script to apply the changes.
46140

47-
Now you can go to AskDB section of your web admin sidebar and start asking questions.
141+
```bash
142+
cd /var/www/minetrax
143+
sh update.sh
144+
```
48145

146+
### 4. Done!
147+
148+
Now you can go to AskDB section of your web admin sidebar and start asking questions.
49149

50150
## Permissions
51151

docs/web/banwarden-feature.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Key Features:
1212

1313
- View all the punishments in your server.
1414
- View the details of the punishment.
15-
- Manage the punishments (add, remove). (not implemented yet)
15+
- Remove/Pardon punishments from web.
16+
- Add new punishments from web. (not implemented yet)
1617
- Attach evidence to the punishment.
1718
- AI scoring for the punishment.
1819

@@ -68,12 +69,31 @@ If you have old punishments that you want to sync with BanWarden, you can do so
6869

6970
BanWarden uses AI to score the punishments. You can enable or disable this feature using `BANWARDEN_AI_INSIGHTS_ENABLED` .env variable.
7071

71-
This feature also requires OpenAI API key set.
72+
This feature also requires AI to be enabled in the `.env` file with a supported LLM provider.
73+
74+
1. Enable BanWarden AI Insights in the `.env` file.
7275
```php
7376
BANWARDEN_AI_INSIGHTS_ENABLED=true
74-
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
7577
```
7678

79+
2. Enable AI in the `.env` file. with a supported LLM provider.
80+
Eg: for OpenAI,
81+
```php
82+
AI_ENABLED=true
83+
AI_PROVIDER=openai
84+
OPENAI_API_KEY=YOUR_OPENAI_APIKEY
85+
```
86+
87+
Check [AskDB AI Bot Feature](./askdb-ai-bot-feature.md) for more details on supported LLM providers.
88+
89+
3. Run update
90+
91+
```bash
92+
cd /var/www/minetrax
93+
sh update.sh
94+
```
95+
96+
7797
### BanWarden Evidence
7898

7999
You can allow your staff to attach evidence to a punishment by giving them the permission `create banwarden_punishments_evidence` & `read create banwarden_punishments_evidence`.

docs/web/change-player-password-feature.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,6 @@ This feature requires your minecraft server to have webquery enabled where the p
2626

2727
## Permissions
2828

29+
- `reset any_player_password` - This is staff(admin) permission. This allows staffs to reset password of any player.
30+
2931
- `cannot player_password_reset` - Sometime you want to restrict this feature to some specific roles (eg: staffs). You can give this permission to the roles which you want to restrict from using this feature.

docs/web/discord-integration-feature.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Currently MineTrax has these integration with Discord:
88

99
1. Social Authentication (OAuth)
1010
2. Discord Notifications (with Bot)
11+
3. Discord Server Auto-Join when user login with Discord.
1112
3. Serverlog (Webhook)
1213

1314
Future planned integrations:
@@ -78,3 +79,31 @@ For notification to work for a user, they will need to login with Discord at lea
7879
7980
Next time whenever your user login with Discord, it will automatically link their account with Discord and do everything require to send notifications to him in DM.
8081
:::
82+
83+
84+
## Discord Server Auto-Join Feature
85+
86+
You can auto-join your users to a specific Discord Server when they login with Discord.
87+
88+
For this feature to work, you need to follow these steps:
89+
90+
1. Make sure you follow the [Setup Discord OAuth and Bot for Notifications](#setup-discord-oauth-and-bot-for-notifications) guide to setup your bot and Discord OAuth is enabled.
91+
92+
93+
2. Make sure your bot has the following additional permissions: (if not, go to Discord Developers Portal and add it)
94+
- `CREATE_INSTANT_INVITE`
95+
96+
3. Open `Admin > Settings > General` and fill your Discord Server ID in `Discord Server ID` field and save it.
97+
98+
4. Open `.env` file in your minetrax directory and update the following variables:
99+
```php title=".env"
100+
DISCORD_FORCE_JOIN_SERVER=true
101+
```
102+
103+
5. Run update `sh update.sh` so that the changes get reflected in the application.
104+
```
105+
cd /var/www/minetrax
106+
sh update.sh
107+
```
108+
109+
6. Now whenever your user login with Discord, they will be auto-joined to the Discord Server.

docs/web/dot-env.file.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ MAXMIND_LICENSE_KEY=
8888
GITHUB_OAUTH_ENABLED=false # Set this true if you want to enable Login with GitHub.
8989
GITHUB_CLIENT_ID= # This is used to set the github client id. It is required if you are using github for oauth.
9090
GITHUB_CLIENT_SECRET= # This is used to set the github client secret. It is required if you are using github for oauth.
91-
GITHUB_AUTH_REDIRECT=http://minetrax.world/auth/callback/github # Just change the domain part of this url to your domain. You will need this url while creating github oauth app.
91+
GITHUB_AUTH_REDIRECT=http://minetrax.world/auth/github/callback # Just change the domain part of this url to your domain. You will need this url while creating github oauth app.
9292

9393
GOOGLE_OAUTH_ENABLED=false # Set this true if you want to enable Login with Google.
9494
GOOGLE_CLIENT_ID= # This is used to set the google client id. It is required if you are using google for oauth.
9595
GOOGLE_CLIENT_SECRET= # This is used to set the google client secret. It is required if you are using google for oauth.
96-
GOOGLE_AUTH_REDIRECT=http://minetrax.world/auth/callback/google # Just change the domain part of this url to your domain. You will need this url while creating google oauth app.
96+
GOOGLE_AUTH_REDIRECT=http://minetrax.world/auth/google/callback # Just change the domain part of this url to your domain. You will need this url while creating google oauth app.
9797

9898
FACEBOOK_OAUTH_ENABLED=false # Set this true if you want to enable Login with Facebook.
9999
FACEBOOK_CLIENT_ID= # This is used to set the facebook client id. It is required if you are using facebook for oauth.
@@ -111,7 +111,7 @@ DISCORD_CLIENT_SECRET= # This is used to set the discord client secret. It is re
111111
DISCORD_REDIRECT_URI=http://minetrax.world/auth/discord/callback # Just change the domain part of this url to your domain. You will need this url while creating discord oauth app.
112112
DISCORD_BOT_TOKEN= # Bot token for discord bot.
113113

114-
SETTINGS_CACHE_ENABLED=false # It is recommended to keep it as it is.
114+
SETTINGS_CACHE_ENABLED=true # It is recommended to keep it as it is.
115115
RANDOM_USER_AVATARS=true # User who haven't uploaded any profile image get a unique randomly generated profile image by default. Set this false if you want to disable this feature.
116116

117117
APP_LOCALE=en # This is used to set the app locale. Change it to your locale if you want to change the app locale. Eg: `de`
@@ -138,7 +138,16 @@ ALLOW_ANY_PROVIDER_SOCIAL_AUTH=false # By default, When a user signup using a So
138138

139139

140140
ASKDB_ENABLED=false # Enable AskDB - AI Based Database Query Feature.
141-
OPENAI_API_KEY= # OpenAI API Key used by AskDB.
141+
142+
AI_ENABLED=true # Enable AI Based Features.
143+
OPENAI_API_KEY=
144+
GROQ_API_KEY=
145+
ANTHROPIC_API_KEY=
146+
OLLAMA_URL=
147+
MISTRAL_API_KEY=
148+
XAI_API_KEY=
149+
GEMINI_API_KEY=
150+
DEEPSEEK_API_KEY=
142151

143152
BACKUP_ENABLED=true # Automatic Daily backup of database and files.
144153
BACKUP_APP_NAME="${APP_NAME}-backup" # It is recommended to keep it as it is.
@@ -168,4 +177,16 @@ PLAYER_SKIN_CHANGER_ENABLED=true # Enable Player Skin Changer Feature.
168177
PLAYER_SKIN_CHANGER_COOLDOWN_IN_SECONDS=60 # Cooldown in seconds for changing skin.
169178

170179
HIDE_PLAYER_NEXT_RANK=false # Hide player's next rank in player profile.
171-
```
180+
181+
# BanWarden
182+
BANWARDEN_ENABLED=true # Enable BanWarden.
183+
BANWARDEN_AI_INSIGHTS_ENABLED=true # Enable AI Insights.
184+
BANWARDEN_AI_INSIGHTS_TYPES=ban,mute,kick,warn # Types of AI Insights.
185+
BANWARDEN_SHOW_PUBLIC=true # Should banwarden publishment data be shown to public.
186+
BANWARDEN_SHOW_MASKED_IP_PUBLIC=false # Should show masked ip to public or hide it completely.
187+
BANWARDEN_MODULE_DISK=private # Disk where BanWarden evidence should be stored.
188+
BANWARDEN_EVIDENCE_MAX_COUNT=2 # Maximum number of evidence allowed per punishment.
189+
BANWARDEN_EVIDENCE_ALLOWED_MIMETYPES=jpg,png,gif,bmp,webp,mp4,avi,mov,mkv,webm,zip,rar # Allowed mime types for evidence.
190+
BANWARDEN_EVIDENCE_MAX_SIZE_KB=51200 # Maximum size of evidence in KB.
191+
BANWARDEN_ALLOW_CONTROL_FROM_WEB=true # Should allow control from web. (If wanna allow staff to pardon players from web)
192+
```

0 commit comments

Comments
 (0)