限时抢购 50% 全场服务器优惠 最后一天!
距结束还剩: 00D 00H 00M 00S
background image
Game Servers 380 7 Days to Die 4 Abiotic Factor 2 Aloft 2 alt:V 2 Americas Army Proving Grounds 2 Among Us 2 Archean 2 ARK Survival Ascended 6 ARK Survival Evolved 3 Arma 3 3 Arma Reforger 2 Aska 2 AssaultCube 2 Assetto Corsa 3 Astro Colony 2 Astroneer 2 Automobilista 2 2 Avorion 2 Banana Shooter 2 Barotrauma 3 BATTALION Legacy 2 BeamNG.drive (BeamMP) 2 Black Mesa 2 Brickadia 2 Call of Duty 2 Citadel: Forged with Fire 2 ClassiCube 2 Clone Hero 2 Colony Survival 2 Conan Exiles 4 Contagion 2 Core Keeper 2 Counter-Strike 2 3 Craftopia 2 CryoFall 2 CS2D 2 Cube 2: Sauerbraten 2 Cubic Odyssey 2 DayZ 4 DDNet 2 DDRaceNetwork 2 Dead Matter 2 Dont Starve Together 4 Eco 2 Empyrion Galactic Survival 2 Enshrouded 3 Escape from Tarkov 2 Euro Truck Simulator 2 2 Factorio 2 Farming Simulator 25 2 Fistful of Frags 2 FiveM 3 FortressCraft Evolved 2 Foundry 2 Foundry VTT 2 Frozen Flame 2 FTL Tachyon 2 Garrys Mod 3 Ground Branch 2 Half-Life 2 Deathmatch 2 Hogwarp 2 Holdfast: Nations at War 2 HumanitZ 2 Hurtworld 2 Hytale 1 Icarus 2 Insurgency Sandstorm 2 IOSoccer 2 Just Cause 3 Multiplayer 2 Kerbal Space Program 2 Killing Floor 2 3 LeagueSandbox 2 Left 4 Dead 2 Left 4 Dead 2 3 Longvinter 2 Los Angeles Crimes 2 Medal of Honor 2 Midnight Ghost Hunt 2 Mindustry 2 Minecraft 4 Minetest 2 Modiverse 2 Mordhau 3 Mount & Blade II: Bannerlord 2 Myth of Empires 2 Nazi Zombies Portable 2 Necesse 2 NeosVR 2 Neverwinter Nights EE 2 Night of the Dead 2 Nightingale 2 No Love Lost 2 No More Room in Hell 2 No One Survived 2 Nova-Life Amboise 2 Nuclear Option 2 Onset 2 Open Fortress 2 OpenArena 2 OpenRA 2 OpenRCT2 2 OpenTTD 2 Operation Harsh Doorstop 2 Palworld 3 Path of Titans 2 Pavlov VR 3 PixARK 2 Plains of Pain 2 Portal Knights 2 Post Scriptum 2 Project Zomboid 8 Puck 2 Quake Live 2 R5Reloaded 2 RedM 2 Renown 2 Resonite 2 Return to Moria 2 Rimworld Together 2 Rising World 2 Risk of Rain 2 1 Rust 4 Satisfactory 1 SCP Secret Laboratory 3 SCUM 2 Smalland 2 Solace Crafting 2 Soldat 2 Soldat 2 2 Sonic Robo Blast 2 2 Sons of the Forest 2 Soulmask 2 SourceCoop 2 Space Engineers 3 Space Station 14 2 Squad 3 Starbound 3 StarMade 2 Stationeers 2 Stormworks 2 Subnautica Nitrox 2 Sunkenland 2 SuperTuxKart 2 Sven Co-op 2 Swords 'n Magic and Stuff 2 Team Fortress 2 3 Teeworlds 2 Terraria 3 TerraTech Worlds 2 TF2 Classified 2 The Forest 3 The Front 2 The Isle 2 Tower Unite 2 Trackmania 2 Unturned 4 Urban Terror 2 V Rising 3 Valheim 3 VEIN 2 Veloren 2 Vintage Story 3 Voyagers of Nera 2 Wolfenstein: Enemy Territory 2 Wreckfest 2 Wurm Unlimited 2 Xonotic 2 Zandronum 2 Getting Started 2 Network & Connectivity 1 Server Management 2
分类

Terraria 服务器设置指南


本指南涵盖了 Terraria 专用服务器的设置,包括世界配置、serverconfig.txt 设置以及从游戏客户端连接的方法。

快速参考: 您的服务器控制面板位于 https://gpanel.legionhosting.net。除非另有说明,以下所有文件路径均相对于服务器的根目录。

服务器配置:serverconfig.txt

Terraria 服务器的主要配置文件是 serverconfig.txt,位于服务器根目录中。此文件控制世界选择、网络设置、玩家限制等。更改将在下次服务器重启时生效。

关键设置

设置 示例值 描述
world /home/container/saves/Worlds/MyWorld.wld 要加载的世界文件的绝对路径。必须与 saves/Worlds/ 目录中现有的 .wld 文件匹配。
worldpath /home/container/saves/Worlds 存储世界文件的目录。此值由面板管理 — 请勿更改。
worldname MyWorld 世界名称。在自动创建新世界时使用(参见 autocreate)。
autocreate 1 如果指定的 world 文件不存在,则自动创建新世界。值:1 = 小(默认),2 = 中,3 = 大。
seed 12345 世界生成种子。留空则使用随机种子。仅在通过 autocreate 创建新世界时适用。您可以在 GPanel 中设置此项。
port 服务器监听的网络端口。请勿更改 — 面板会自动分配此端口。
maxplayers 8 服务器允许的最大同时在线玩家数。
password mysecretpass 可选的加入密码。留空则无需密码。玩家连接时需要输入此密码。
difficulty 0 世界难度。0 = 普通,1 = 专家,2 = 大师,3 = 旅途。在世界创建时设置 — 创建后更改无效。

serverconfig.txt 示例

world=/home/container/saves/Worlds/MyWorld.wld
worldpath=/home/container/saves/Worlds
worldname=MyWorld
autocreate=1
seed=
maxplayers=8
password=
difficulty=0
motd=Welcome to the server!
注意: difficulty 设置仅在通过 autocreate 创建新世界时适用。它无法更改现有世界文件的难度。

世界文件和大小

世界文件使用 .wld 扩展名,存储在服务器的 saves/Worlds/ 目录中。创建世界时,Terraria 会自动生成此文件。

世界大小选项(autocreate)

大小 大致尺寸
1 小(默认) 4200 x 1200 格
2 6400 x 1800 格
3 8400 x 2400 格

要使用现有世界,请通过 SFTP 将您的 .wld 文件上传到 saves/Worlds/ 目录(请参阅 如何通过 SFTP 上传文件),然后将 serverconfig.txt 中的 world 设置更新为该文件的完整绝对路径。


连接到您的服务器

在连接之前,请确保您有服务器的 IP 地址和端口。您可以在 GPanel 仪表板中找到这些信息 — 请参阅 如何查找您的服务器 IP 和端口

连接步骤

  1. 在您的电脑上启动 Terraria。
  2. 在主菜单中,点击 Multiplayer(多人游戏)。
  3. 选择要使用的角色。
  4. 点击 Join via IP(通过 IP 加入)。
  5. 在第一个字段中输入您服务器的 IP 地址
  6. 在第二个字段中输入端口(显示在 GPanel 仪表板中)。
  7. 如果设置了密码,请在提示时输入。
您服务器的 IP 和端口显示在 GPanelhttps://gpanel.legionhosting.net)的服务器连接详情中。

文件和目录参考

路径 内容
serverconfig.txt 主服务器配置(世界、端口、密码、最大玩家数等)
saves/Worlds/ 世界存档文件(.wld 格式)

相关文章


需要更多帮助? 请在 https://legionhosting.net/submitticket.php 提交支持工单,我们的团队将为您提供帮助。

这篇文章对您有帮助吗?

Ready to Get Started?

The servers are booted, select your plan and become our latest satisfied client.