1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#debian 11.3
apt install -y wget unzip
apt install openjdk-17-jdk -y
apt install openjdk-17-jre -y
apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
--dearmor
apt-get update
apt-get install -y mongodb-org
systemctl start mongod
cd ~
mkdir genshin
cd genshin
wget https://gitlab.com/YuukiPS/GC-Resources/-/archive/4.0/GC-Resources-4.0.zip
unzip GC-Resources-4.0.zip
rm GC-Resources-4.0.zip
cd GC-Resources-4.0
mv Resources /~/genshin/resources
cd /~/genshin
rm -r GC-Resources-4.0
wget https://github.com/Grasscutters/Grasscutter/releases/download/v1.7.2/grasscutter-1.7.2.jar
java -jar grasscutter-1.7.2.jar #报错后输入stop
>stop
vim config.json #修改config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
"folderStructure": {
"resources": "./resources/",
"data": "./data/",
"packets": "./packets/",
"scripts": "resources:Scripts/",
"plugins": "./plugins/",
"cache": "./cache/"
},
"databaseInfo": {
"server": {
"connectionUri": "mongodb://localhost:27017",
"collection": "grasscutter"
},
"game": {
"connectionUri": "mongodb://localhost:27017",
"collection": "grasscutter"
}
},
"language": {
"language": "en_US",
"fallback": "en_US",
"document": "EN"
},
"account": {
"autoCreate": true,
"EXPERIMENTAL_RealPassword": false,
"defaultPermissions": [],
"maxPlayer": -1
},
"server": {
"debugWhitelist": [],
"debugBlacklist": [],
"runMode": "HYBRID",
"logCommands": false,
"fastRequire": true,
"http": {
"startImmediately": false,
"bindAddress": "0.0.0.0",
"bindPort": 修改为服务器端口,
"accessAddress": "修改服务器ip",
"accessPort": 0,
"encryption": {
"useEncryption": true,
"useInRouting": true,
"keystore": "./keystore.p12",
"keystorePassword": "123456"
},
"policies": {
"cors": {
"enabled": true,
"allowedOrigins": [
"*"
]
}
},
"files": {
"indexFile": "./index.html",
"errorFile": "./404.html"
}
},
"game": {
"bindAddress": "0.0.0.0",
"bindPort": 22102,
"accessAddress": "修改服务器ip",
"accessPort": 0,
"useUniquePacketKey": true,
"loadEntitiesForPlayerRange": 300,
"enableScriptInBigWorld": true,
"enableConsole": true,
"kcpInterval": 20,
"logPackets": "NONE",
"isShowPacketPayload": false,
"isShowLoopPackets": false,
"cacheSceneEntitiesEveryRun": false,
"gameOptions": {
"inventoryLimits": {
"weapons": 2000,
"relics": 2000,
"materials": 2000,
"furniture": 2000,
"all": 30000
},
"avatarLimits": {
"singlePlayerTeam": 4,
"multiplayerTeam": 4
},
"sceneEntityLimit": 1000,
"watchGachaConfig": false,
"enableShopItems": true,
"staminaUsage": true,
"energyUsage": true,
"fishhookTeleport": true,
"trialCostumes": false,
"questing": {
"enabled": true
},
"resinOptions": {
"resinUsage": false,
"cap": 160,
"rechargeTime": 480
},
"rates": {
"adventureExp": 1.0,
"mora": 1.0,
"leyLines": 1.0
},
"handbook": {
"enable": false,
"allowCommands": true,
"limits": {
"enabled": false,
"interval": 3,
"maxRequests": 10,
"maxEntities": 25
},
"server": {
"enforced": false,
"address": "127.0.0.1",
"port": 443,
"canChange": true
}
}
},
"joinOptions": {
"welcomeEmotes": [
2007,
1002,
4010
],
"welcomeMessage": "Welcome to a Grasscutter server.",
"welcomeMail": {
"title": "Welcome to Grasscutter!",
"content": "Hi there!\r\nFirst of all, welcome to Grasscutter. If you have any issues, please let us know so that Lawnmower can help you! \r\n\r\nCheck out our:\r\n<type=\"browser\" text=\"Discord\" href=\"https://discord.gg/T5vZU6UyeG\"/>\n",
"sender": "Lawnmower",
"items": [
{
"itemId": 13509,
"itemCount": 1,
"itemLevel": 1
},
{
"itemId": 201,
"itemCount": 99999,
"itemLevel": 1
}
]
}
},
"serverAccount": {
"avatarId": 10000007,
"nameCardId": 210001,
"adventureRank": 1,
"worldLevel": 0,
"nickName": "Server",
"signature": "Welcome to Grasscutter!"
},
"visionOptions": [
{
"name": "VISION_LEVEL_NORMAL",
"visionRange": 80,
"gridWidth": 20
},
{
"name": "VISION_LEVEL_LITTLE_REMOTE",
"visionRange": 16,
"gridWidth": 40
},
{
"name": "VISION_LEVEL_REMOTE",
"visionRange": 1000,
"gridWidth": 250
},
{
"name": "VISION_LEVEL_SUPER",
"visionRange": 4000,
"gridWidth": 1000
},
{
"name": "VISION_LEVEL_NEARBY",
"visionRange": 40,
"gridWidth": 20
},
{
"name": "VISION_LEVEL_SUPER_NEARBY",
"visionRange": 20,
"gridWidth": 20
}
]
},
"dispatch": {
"regions": [],
"dispatchUrl": "ws://127.0.0.1:1111",
"encryptionKey": "ThnaOWibPlZ1vWN35q66wIM2l4nz89mq49I7d90Ir1o=",
"dispatchKey": "538iiGNe1v9dNJUybZj/+ZCWD6lAFaoChdRBiYZo/xs=",
"defaultName": "Grasscutter",
"logRequests": "NONE"
},
"debugMode": {
"serverLoggerLevel": {
"levelInt": 10000,
"levelStr": "DEBUG"
},
"servicesLoggersLevel": {
"levelInt": 20000,
"levelStr": "INFO"
},
"logPackets": "ALL",
"isShowPacketPayload": false,
"isShowLoopPackets": false,
"logRequests": "ALL"
}
},
"version": 13
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
java -jar grasscutter-1.7.2.jar #再次启动
----------------------------------------
15:35:46 <INFO:Grasscutter> Loading Grasscutter...
15:35:47 <INFO:Grasscutter> Starting Grasscutter...
15:35:47 <INFO:Grasscutter> Game version: 4.0.0
15:35:47 <INFO:Grasscutter> Grasscutter version: 1.7.2-3094facb8
15:35:50 <WARN:HttpServer> [Dispatch] No SSL cert found! Falling back to HTTP server.
15:35:51 <INFO:ResourceLoader> Loading resources...
15:36:07 <INFO:ResourceLoader> Finished loading resources.
15:36:08 <INFO:HttpServer> [Dispatch] Dispatch server started at 127.0.0.1:443
15:36:08 <INFO:GameServer> Grasscutter is FREE software. If you have paid for this, you may have been scammed. Homepage: https://github.com/Grasscutters/Grasscutter
15:36:08 <INFO:GameServer> Game Server started at 127.0.0.1:22102
15:36:08 <INFO:Grasscutter> Done! For help, type "help"
>