* Init docsify * Readme: fix build badge, remove contributors The "all contributors" section is woefully out of date and for many reasons, it's not something we're going to support. Going forward, we're going to try to find a different / better / more inclusive way of doing contributions in such a way that's meaningful to people. * Fix build badge again * Update experimental build download instructions * Remove note about Travis CI being available * Update install guide to use TShock.Server.exe. * ∆: minor changes to setup instructions? * Remove setup guide because it's out of date * Update non-dev readme with instructions on using tshock * Remove experimental downloads section from dev readme * Add a link to github to non-dev docs * Change example password * Update non-dev readme with more data * Move changelog to docs folder * Rehead installing tshock * Embed streamable video * Create CNAME * Update CNAME * Update index to be a little more cool * Rename homepage * Rename changelog to changelog * Document constileation and heaptile providers * More command line docs * Update developer readme * Augment the readme * Add nuget links * Add a space * What is the cost of lies? * Modernize cli docs * Document tile providers * Clarify provider slowness * Further doument tile providers * ∆: modify markdown output for permissions to add wikilinks * Remove AN
4.6 KiB
4.6 KiB
The following parameters can be added to TShock to alter the way a server initializes. Options set on the command line override any of their counterparts in the config file. These can be used either for personal use or in a GSP environment for easier hosting without hassle:
-ip- Starts the server bound to a given IPv4 address. For example:-ip 0.0.0.0will bind all interfaces. In contrast,-ip 127.0.0.1will bind only127.0.0.1. If your interface has another IP address assigned to it, you should be able to bind that.-port- Starts the server bound to a given port. For example:-port 7777will use the default port for Terraria.-port 25565will use the Minecraft default port. Ports below 1000 usually require administrator or root privileges to bind on most operating systems.-maxplayers, or-players- Starts the server with a given player count. For example:-maxplayers 5sets the maximum number of players to 5. The theoretical maximum is255. You can set-maxplayers 255for this.-world- Starts the server and immediately loads a given world file. Note: this parameter expects an absolute path. For example:-world C:\Terraria\MyWorld.wldor-world /root/MyWorld.wld.-worldselectpath- Starts the server and changes the location for worlds to be the specified path. The server will look in this path for worlds to load. For example:-worldselectpath /rootor-worldselectpath C:\Terraria.-worldname- Starts the server using the world name that exists in the setworld select path. For example, ifMyWorld.wldis insideC:\Terraria\and-worldselectpath C:\Terraria\is set, then-worldname MyWorldwill load that world.-autocreate- Starts the server and, if a world file isn't found, automatically create the world file with a given size, 1-3, 1 being small. For example, set-autocreate 3to create a large world.-config- Starts the server with a given config file. For example,-config C:\Terraria\config.json.-ignoreversion- Ignores API version checks for plugins allowing for old plugins to run.-forceupdate- Forces the server to continue running, and not hibernating when no players are on. This results in time passing, grass growing, and cpu running.-pass,-password- Sets the server password. For example,-pass mypasswordwill set the password tomypassword.-motd- Sets the base game MOTD. For example,-motd "Welcome to my server!"will set the MOTD toWelcome to my server!.-autoshutdown- Enables the base game's "auto shutdown" feature.-secure- Turns on the base game's "antispam" feature.-configpath- Specifies the path tshock uses to resolve configs, log files, and sqlite db.-logpath- Overrides the default log path and saves logs here.-logformat- Changes the format of the name of log files, subject to C# date standard abbreviations. For example,-logformat "yyyy-MM-dd"will create a new log file for each day. The default isyyyy-MM-dd_HH-mm-ss.-logclear- Overwrites old config if it exists. Useful for docker. For example,-logclear.-dump- Dumps permissions and config file descriptions for wiki use.-worldevil- Sets the world's evil state (random,corrupt, orcrimson). This only affects new worlds. For example,-worldevil randomwill set the world to a random evil state.-heaptile- Runs the server with the heaptile tile provider. HeapTile is an alternative ITile provider that uses less memory than the default. This is experimental and may cause issues.-constileationor-c- Runs the server with the Constileation tile provider. Constileation is an alternative ITile provider that uses less memory than the default. This is experimental and may cause issues.-difficulty- Sets the world's difficulty (0fornormal,1forexpert,2formaster,3forjourney). This only affects new worlds.-loadlib- Instructs the base game to load the library at the path. For example,-loadlib C:\Terraria\MyLibrary.dllwill load the libraryMyLibrary.dllfrom the pathC:\Terraria\.-crashdir- Instructs the base game to save crash dumps to the path. For example,-crashdir C:\Terraria\CrashDumpswill save crash dumps toC:\Terraria\CrashDumps.
These command line flags are in-addition to the ones that the Terraria server offers (for example, -lang is now a vanilla flag, and still works).
Autostarting TShock
If you want to start TShock automatically though a script, and bypass the interactive startup prompt, you need to specify a -world path, a -port, and -maxplayers.
For example: TShock.Server.exe -world C:\Terraria\worlds\MyWorld.wld -port 7777 -maxplayers 8