饥荒联机云服务器_饥荒联机专用服务器搭建教程
放假闲来无事,搭建一个饥荒联机专用服务器和朋友一起来玩玩。
docker搭建饥荒联机服务器
注意:如果你的linux服务器上还没有安装docker,那么请看Centos7 安装Docker。
注意:如果你的linux服务器上还没安装docker-compose,那么请看Centos7 安装docker-compose。
然后执行下面的命令来下载”饥荒联机服务器“镜像:
1$ docker pull jamesits/dst-server
镜像下载好之后,进入到~目录下
1$ cd ~
创建文件夹
1$ mkdir dont_starve_together
进入刚刚创建的文件夹,创建一个文件
1
2$ cd dont_starve_together
$ nano docker-compose.yml
填入以下内容
1
2
3
4
5
6
7
8
9
10
11
12
13version: "3"
services:
dst-server:
image: jamesits/dst-server:latest
deploy:
restart_policy:
condition: on-failure
ports:
- "10999-11000:10999-11000/udp"
- "12346-12347:12346-12347/udp"
volumes:
- ~/.klei/DoNotStarveTogether:/data
stop_grace_period: 6m
然后ctrl+x,输入y,回车保存该文件。
同时服务器需要开放10999-11000,12346-12347端口。如果你的服务器是在阿里云或者腾讯云等地方购买的,可以通过服务器控制台进行端口开放操作。
至此docker的配置工作已经完成,接下来执行以下命令即可(第一次执行该命令会初始化饥荒服务器配置,并不会直接启动饥荒服务器)
1$ docker-compose up -d
然后再执行以下的代码查看docker容器的id(饥荒服务器的id)
1$ docker ps
显示信息如下(我更改了一下输出格式)
1
2
3
4
5
6
7CONTAINER ID 8b1011687993
IMAGE jamesits/dst-server:latest
COMMAND "entrypoint.sh sup..."
CREATED 1 hours ago
STATUS ****
PORTS 0.0.0.0:10999-11000->10999-11000/udp, 0.0.0.0:12346-12347->12346-12347/udp
NAMES dont_starve_together_dst-server_1
确认启动起来之后我们停止掉饥荒服务器
1$ docker stop 你的容器id(我这里是8b1011687993,请替换成你的)
到了这里,我们docker搭建饥荒联机服务器步骤已经完成了,请继续进行下一步操作
配置服务器信息
现在来配置我们的饥荒游戏世界。
首先我们要准备以下材料:
KLEI用户IDKU_xxxxxx
服务器tokenpds-gKU_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+xxx
1) 准备好材料之后,进入到饥荒配置文件夹
1$ cd ~/.klei/DoNotStarveTogether/DoNotStarveTogether/Cluster_1/
查看一下该文件夹下有什么内容
1
2$ ls
adminlist.txt blocklist.txt Caves/ cluster.ini cluster_token.txt Master/ mods/ whitelist.txt
2) 接下来编辑管理员列表
1$ nano adminlist.txt
将上面材料中的”KLEI用户ID”填进去,然后ctrl+x,输入y,回车保存该文件
3) 编辑白名单列表
1$ nano whitelist.txt
同样将上面材料中的”KLEI用户ID”填进去,然后ctrl+x,输入y,回车保存该文件
4) 编辑cluster_token.txt文件
1$ nano cluster_token.txt
将上面准备的服务器token填进去,然后ctrl+x,输入y,回车保存该文件
5) 编辑cluster.ini文件
1$ nano cluster.ini
修改以下内容
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[NETWORK]
cluster_name = 这里填你的房间名称
cluster_description = 这里填你的房间说明
cluster_password =这里填你的房间密码
offline_cluster = false
lan_only_cluster = false
tick_rate = 30
whitelist_slots = 1
cluster_intention = social
autosaver_enabled = true
[GAMEPLAY]
game_mode = endless
max_players = 64
pvp = true
pause_when_empty = true
vote_kick_enabled = false
[STEAM]
steam_group_only = false
steam_group_id = 0
steam_group_admins = false
[MISC]
console_enabled = true
max_snapshots = 6
; ====================================================================
; 注意,下面的内容严禁修改.
; ====================================================================
[SHARD]
shard_enabled = true
bind_ip = 127.0.0.1
master_ip = 127.0.0.1
master_port = 10998
cluster_key = MsAhBOXhhnElO5IPKr4G
将上面的内容替换成你自己的,其它的配置自行百度,然后ctrl+x,输入y,回车保存该文件
到了这一步,如果你的饥荒服务器不使用mod的话,就可以直接进行第三步操作了
现在我们来配置服务器的mod
6) 首先进入到mods文件夹
1$ cd ~/.klei/DoNotStarveTogether/DoNotStarveTogether/Cluster_1/mods
7) 编辑dedicated_server_mods_setup.lua 文件
1nano dedicated_server_mods_setup.lua
填入以下内容(以下是我自用的一些mod,你可以替换成你自己的mod)
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--There are two functions that will install mods, ServerModSetup and ServerModCollectionSetup. Put the calls $
--ServerModSetup takes a string of a specific mod's Workshop id. It will download and install the mod to your$
--The Workshop id can be found at the end of the url to the mod's Workshop page.
--Example: http://steamcommunity.com/sharedfiles/filedetails/?id=350811795
--ServerModSetup("350811795")
--ServerModCollectionSetup takes a string of a specific mod's Workshop id. It will download all the mods in t$
--The Workshop id can be found at the end of the url to the collection's Workshop page.
--Example: http://steamcommunity.com/sharedfiles/filedetails/?id=379114180
--ServerModCollectionSetup("379114180")
ServerModSetup("345692228")
ServerModSetup("346968521")
ServerModSetup("347079953")
ServerModSetup("351325790")
ServerModSetup("352373173")
ServerModSetup("358749986")
ServerModSetup("367546858")
ServerModSetup("374550642")
ServerModSetup("375850593")
ServerModSetup("376333686")
ServerModSetup("378160973")
ServerModSetup("396026892")
ServerModSetup("398109522")
ServerModSetup("404161345")
ServerModSetup("430427326")
ServerModSetup("438293817")
ServerModSetup("444235588")
ServerModSetup("447092740")
ServerModSetup("453693119")
ServerModSetup("460972875")
ServerModSetup("463740026")
ServerModSetup("466732225")
ServerModSetup("572538624")
ServerModSetup("604761020")
ServerModSetup("609051112")
ServerModSetup("623749604")
ServerModSetup("656256171")
ServerModSetup("668708075")
ServerModSetup("678340265")
ServerModSetup("684098549")
ServerModSetup("684722436")
ServerModSetup("703758203")
ServerModSetup("720221857")
ServerModSetup("721491336")
ServerModSetup("780009141")
ServerModSetup("804317397")
ServerModSetup("884642675")
ServerModSetup("913454779")
ServerModSetup("917203276")
ServerModSetup("1108032281")
ServerModSetup("1166220990")
ServerModSetup("1181077385")
ServerModSetup("1217385169")
然后ctrl+x,输入y,回车保存该文件
8) 进入到Master文件夹
1$ cd ~/.klei/DoNotStarveTogether/DoNotStarveTogether/Cluster_1/Master
9) 创建文件modoverrides.lua
1$ nano modoverrides.lua
填入以下内容(这些内容是对mod的配置,不填的话,服务器显示无mod)
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
164return {
["workshop-1108032281"]={
configuration_options={
ExtraEquipSlot="Disabled",
wharang_dodge_key=114,
wharang_language="lan_en",
wharang_stat="stat_soul",
wharang_stat_key=107,
wharang_transform_key=118
},
enabled=true
},
["workshop-1166220990"]={ configuration_options={ attract=2, language=2 }, enabled=true },
["workshop-1181077385"]={ configuration_options={ }, enabled=true },
["workshop-1217385169"]={ configuration_options={ }, enabled=true },
["workshop-346968521"]={ configuration_options={ }, enabled=true },
["workshop-347079953"]={
configuration_options={ DFV_Language="EN", DFV_MinimalMode="default" },
enabled=true
},
["workshop-358749986"]={
configuration_options={ IndicatorSize=3, MaxIndicator=7000, PlayerIndicators=1 },
enabled=true
},
["workshop-375850593"]={ configuration_options={ }, enabled=true },
["workshop-378160973"]={
configuration_options={
ENABLEPINGS=true,
FIREOPTIONS=2,
OVERRIDEMODE=false,
SHAREMINIMAPPROGRESS=true,
SHOWFIREICONS=true,
SHOWPLAYERICONS=true,
SHOWPLAYERSOPTIONS=2
},
enabled=true
},
["workshop-396026892"]={ configuration_options={ OPT_DIFFICULTY=1 }, enabled=true },
["workshop-404161345"]={
configuration_options={
Allow_Harvesting="true",
Drop_Content="true",
Fortify_Building=0,
Ownership="Multi",
Player_Trap="false",
Share_Container="false",
Share_Equipments="true"
},
enabled=true
},
["workshop-430427326"]={
configuration_options={ beecbees=2, beechoney=4, beeckbees=2, beecpetals=4, rbeediffdef=2, rbeetech=2 },
enabled=true
},
["workshop-444235588"]={
configuration_options={
deluxeEndoFirepitBurnRate=0.75,
deluxeFirepitBurnRate=0.75,
dropLoot="yes",
endoDropLoot="yes",
heatStarBurnRate=0.9,
heatStarDropLoot="yes",
iceStarBurnRate=0.9,
iceStarDropLoot="yes",
recipeCost="standard",
starsSpawnHounds="no"
},
enabled=true
},
["workshop-447092740"]={ configuration_options={ }, enabled=true },
["workshop-463740026"]={ configuration_options={ ownership=false }, enabled=true },
["workshop-466732225"]={ configuration_options={ }, enabled=true },
["workshop-604761020"]={
configuration_options={
RUOYINXIAN=false,
SHENGDANSHI=false,
baoshibaolv=1,
blue_baoshi=1,
er_shuoming=0,
green_baoshi=1,
huangjinbaolv=1,
marble_suipian=1,
orange_baoshi=1,
purple_baoshi=1,
red_baoshi=1,
shishengzhang=0,
shitoubaolv=1,
thulecite_xiukuang=1,
wajuecishu=2,
yellow_baoshi=1,
yi_shuoming=0
},
enabled=true
},
["workshop-623749604"]={
configuration_options={
Craft="Normal",
Destroyable="DestroyByAll",
FoodSpoilage=1,
Language="En",
Position="Center",
Slots=80
},
enabled=true
},
["workshop-656256171"]={
configuration_options={ dont_give_dubloons=2, give_dubloons=1, position=1, rec_dubloon=3, rec_gold=3 },
enabled=true
},
["workshop-684098549"]={ configuration_options={ remilia_diet="blood" }, enabled=true },
["workshop-684722436"]={ configuration_options={ ccraft=1, lang=0 }, enabled=true },
["workshop-703758203"]={ configuration_options={ }, enabled=true },
["workshop-720221857"]={ configuration_options={ }, enabled=true },
["workshop-721491336"]={
configuration_options={
["Death Lv Drain (Trust)"]="Off",
["General Winter"]="On",
["Phoenix's Resilience"]="On",
["Survivor's Guilt"]="On",
Trustworthy="On"
},
enabled=true
},
["workshop-804317397"]={
configuration_options={
buffgo=false,
fhl_cos=0.05,
fhl_hjopen=false,
likeornot=false,
openli=false,
openlight=false,
zzj_cankanshu=false,
zzj_canuseashammer=false,
zzj_canuseasshovel=false,
zzj_canwakuang=false,
zzj_finiteuses=210,
zzj_fireopen=false,
zzj_pre=1
},
enabled=true
},
["workshop-884642675"]={
configuration_options={
["General Winter"]="On",
["Phoenix's Resilience"]="On",
["Survivor's Guilt"]="On",
Trustworthy="On"
},
enabled=true
},
["workshop-913454779"]={ configuration_options={ }, enabled=true },
["workshop-917203276"]={
configuration_options={
EQUIPMENT_SELF=true,
HAMBAT=true,
NIGHTSTICK=true,
NIGHTSWORD=1,
OTHER_EQUIPMENT=false,
PERISHABLE_WEARS=true,
TORNADO=false
},
enabled=true
}
}
然后ctrl+x,输入y,回车保存该文件
10) 复制文件modoverrides.lua 到Caves文件夹下
1$ cp modoverrides.lua ../Caves/
到了这里,我们配置服务器信息步骤已经完成了,请继续进行下一步操作
启动饥荒服务器
执行以下的代码查看docker容器的id(饥荒服务器的id)
1$ docker ps
显示信息如下(我更改了一下输出格式)
1
2
3
4
5
6
7CONTAINER ID 8b1011687993
IMAGE jamesits/dst-server:latest
COMMAND "entrypoint.sh sup..."
CREATED 1 hours ago
STATUS ****
PORTS 0.0.0.0:10999-11000->10999-11000/udp, 0.0.0.0:12346-12347->12346-12347/udp
NAMES dont_starve_together_dst-server_1
执行启动命令
1$ docker start 你的容器id(我这里是8b1011687993,请替换成你的)
然后等待饥荒服务器启动成功即可。
启动期间会自动下载steam创意工坊mod,花费时间比较长。你可以执行下面的代码查看服务器启动状态
1$ docker logs 你的容器id(我这里是8b1011687993,请替换成你的)
到这里就说的差不多啦。服务器启动成功与否,可以去游戏中,搜索你配置的房间名查看。
最后祝大家游戏愉快。
饥荒联机云服务器_饥荒联机专用服务器搭建教程相关推荐
- 饥荒联机云服务器_饥荒联机云服务器开档
解决问题: 问题1:如何设置云服务器putty(远程登录客户端:连接云服务器用) WinSCP(图形化 SFTP 客户端:用于本地和云服的文件传输)给的是安装包需要安装 开服脚本.steamcommu ...
- 饥荒联机云服务器_饥荒联机独立服务器搭建教程(三):配置篇
早在 2015 年底,Klei 就将整个饥荒的配置系统都换了,所以之前写的配置方法算是老古董没法用了,于是这不,博主更新了最新的配置方法. 说起来真是残念,在 2016 年 5 月初,我就差不多把整个 ...
- 饥荒联机云服务器_饥荒联机版 饥荒云服工具 可视化
今天为朋友们带来一款可视化搭建饥荒联机版云服的工具. 原作者发布界面:跳转至百度贴吧 [b]图片放在图床了,不要一看这么多图就给我删了哈 前期准备 服务器 系统版本:Ubuntu64位或者CentOS ...
- 饥荒联机云服务器_【教程】Steam饥荒联机版如何在云服务器上搭建专用服务器(常见问题解决方法)...
本篇主要讲述一下配置过程中常见的问题以及解决办法 问题一:无效令牌无效令牌 [00:00:04]: [200] Account Failed (6): "E_INVALID_TOKEN&qu ...
- 饥荒联机云服务器_WeGame饥荒联机版专用服务器多层世界搭建教程
最近一直在玩饥荒.刚开始自己一人玩.倒是没什么感觉.但是后面和朋友一起玩的时候,经常会发现自己不卡,但是朋友有些时候就会卡一下.为了解决这个问题,就想到了搭建独立的专用服务器.可能确实wg上面玩饥荒的 ...
- 云服务器建站PHP环境搭建教程总结(如何搭建)
在搭建网站的过程中,我们都需要用云服务器来搭建一个环境,部署PHP 项目,Node.js 项目等.这里整理了PHP环境搭建的大致过程,可以作为一个简单的参考. Php环境搭建的主要步骤和方法 如果你有 ...
- 饥荒联机版连不上服务器_饥荒无法连接klei服务器刷不出服务器解决办法
<饥荒:联机版>服务器卡顿原因分析及解决教程,很多在饥荒联机版的同学经常会遇见卡顿问题,而很多玩家为了解决卡顿问题都会选择自己建一个服务器在其中游玩.可是有些时候连自己建的服务器都会卡,这 ...
- 最优惠租云服务器_租一个云服务器一个月需要多少钱?
++++++++ 12.8日更新「2020双十二活动」 来不及解释了,该上车了!阿里云 双十二拼团会场www.aliyun.com腾讯云 双十二限时秒杀cloud.tencent.com 云服务器 ...
- win系统的阿里云服务器部署IDEASpringBoot项目保姆级教程
win系统的阿里云服务器部署SpringBoot项目保姆级教程 前言 配置阿里云服务器 配置环境 环境配置中的坑 还有别的坑的话,私信我我补充......毕竟配置是最基本的,还想咋样... jar包导 ...
最新文章
- 10行代码爬取全国所有A股/港股/新三板上市公司信息
- python 执行报错AttributeError: 'list' object has no attribute 'g'
- 重新复习基础草稿:可空类型
- datatables 获取 pageLength 和 pageStart,重新获取table数据
- java equals重写原则_java中为何重写equals时必须重写hashCode方法详解
- Hibernate缓存级别教程
- Swagger 注解~其他
- gz解压命令 linux_Linux日常篇-解压缩命令
- 超强1000个jquery极品插件!
- Scipy 基础 —— 稀疏矩阵
- kali Linux 系统安装教程
- php 获取当前、两个月之前的日期
- 我曾经在课间给学生讲过的金庸小说片段
- 新账户的收发邮件服务器,轻松使用新电子邮件系统-信息化建设与管理处
- PC能登录微信,但是不能访问网页/代理服务器没有响应
- 仓库出现了两个除了首字母大小写不一样的相同文件
- Qt 自定义标题栏,最小化、最大化、关闭窗口,双击最大化,鼠标拖动等效果实现
- 判断一个数是否为四叶玫瑰数_python
- 计算机病毒生命周期,计算机病毒的生命周期 -电脑资料
- ctf_show_misc_wp