Config Settings

Note: These configuration settings are in the config.json file created in the TShock folder automatically when TShock starts. These are separate from config.txt and other systems that ship with Terraria.

Server Settings

ServerPassword

TypeString
DescriptionThe server password required to join the server.
Default""

ServerPort

TypeInt32
DescriptionThe port the server runs on.
Default7777

MaxSlots

TypeInt32
DescriptionMaximum number of clients connected at once. If you want people to be kicked with "Server is full" set this to how many players you want max and then set Terraria max players to 2 higher.
Default8

ReservedSlots

TypeInt32
DescriptionThe number of reserved slots past your max server slots that can be joined by reserved players.
Default20

ServerName

TypeString
DescriptionReplaces the world name during a session if UseServerName is true.
Default""

UseServerName

TypeBoolean
DescriptionWhether or not to use ServerName in place of the world name.
Defaultfalse

LogPath

TypeString
DescriptionThe path to the directory where logs should be written to.
Default"tshock"

DebugLogs

TypeBoolean
DescriptionWhether or not the server should output debug level messages related to system operation.
Defaulttrue

DisableLoginBeforeJoin

TypeBoolean
DescriptionPrevents users from being able to login before they finish connecting.
Defaultfalse

IgnoreChestStacksOnLoad

TypeBoolean
DescriptionAllows stacks in chests to go beyond the stack limit during world loading.
Defaultfalse

Backup and Save Settings

AutoSave

TypeBoolean
DescriptionEnable or disable Terraria's built-in world auto save.
Defaulttrue

AnnounceSave

TypeBoolean
DescriptionEnable or disable world save announcements.
Defaulttrue

ShowBackupAutosaveMessages

TypeBoolean
DescriptionWhether or not to show backup auto save messages.
Defaulttrue

BackupInterval

TypeInt32
DescriptionThe interval between backups, in minutes. Backups are stored in the tshock/backups folder.
Default0

BackupKeepFor

TypeInt32
DescriptionFor how long backups are kept in minutes. eg. 2880 = 2 days.
Default60

SaveWorldOnCrash

TypeBoolean
DescriptionWhether or not to save the world if the server crashes from an unhandled exception.
Defaulttrue

SaveWorldOnLastPlayerExit

TypeBoolean
DescriptionWhether or not to save the world when the last player disconnects.
Defaulttrue

World Settings

InvasionMultiplier

TypeInt32
DescriptionDetermines the size of invasion events. The equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health)).
Default1

DefaultMaximumSpawns|

TypeInt32
DescriptionThe default maximum number of mobs that will spawn per wave. Higher means more mobs in that wave.
Default5

DefaultSpawnRate|

TypeInt32
DescriptionThe delay between waves. Lower values lead to more mobs.
Default600

InfiniteInvasion

TypeBoolean
DescriptionEnables never ending invasion events. You still need to start the event, such as with the /invade command.
Defaulttrue

PvPMode

TypeString
DescriptionSets the PvP mode. Valid types are: "normal", "always" and "disabled".
Default"normal"

SpawnProtection

TypeBoolean
DescriptionPrevents tiles from being placed within SpawnProtectionRadius of the default spawn.
Defaulttrue

SpawnProtectionRadius

TypeInt32
DescriptionThe tile radius around the spawn tile that is protected by the SpawnProtection setting.
Default10

RangeChecks

TypeBoolean
DescriptionEnable or disable anti-cheat range checks based on distance between the player and their block placements.
Defaulttrue

HardcoreOnly

TypeBoolean
DescriptionPrevents non-hardcore players from connecting.
Defaultfalse

MediumcoreOnly

TypeBoolean
DescriptionPrevents softcore players from connecting.
Defaultfalse

DisableBuild

TypeBoolean
DescriptionDisables any placing, or removal of blocks.
Defaultfalse

DisableHardmode

TypeBoolean
DescriptionIf enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.
Defaultfalse

DisableDungeonGuardian

TypeBoolean
DescriptionPrevents the dungeon guardian from being spawned while sending players to their spawn point instead.
Defaultfalse

DisableClownBombs

TypeBoolean
DescriptionDisables clown bomb projectiles from spawning.
Defaultfalse

DisableSnowBalls

TypeBoolean
DescriptionDisables snow ball projectiles from spawning.
Defaultfalse

DisableTombstones

TypeBoolean
DescriptionDisables tombstone dropping during death for all players.
Defaulttrue

ForceTime

TypeString
DescriptionForces the world time to be normal, day, or night.
Default"normal"

DisableInvisPvP

TypeBoolean
DescriptionDisables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.
Defaultfalse

MaxRangeForDisabled

TypeInt32
DescriptionThe maximum distance, in tiles, that disabled players can move from.
Default10

RegionProtectChests

TypeBoolean
DescriptionWhether or not region protection should apply to chests.
Defaultfalse

RegionProtectGemLocks

TypeBoolean
DescriptionWhether or not region protection should apply to gem locks.
Defaulttrue

IgnoreProjUpdate

TypeBoolean
DescriptionIgnores checks to see if a player 'can' update a projectile.
Defaultfalse

IgnoreProjKill

TypeBoolean
DescriptionIgnores checks to see if a player 'can' kill a projectile.
Defaultfalse

AllowCutTilesAndBreakables

TypeBoolean
DescriptionAllows players to break temporary tiles (grass, pots, etc) where they cannot usually build.
Defaultfalse

AllowIce

TypeBoolean
DescriptionAllows ice placement even where a user cannot usually build.
Defaultfalse

AllowCrimsonCreep

TypeBoolean
DescriptionAllows the crimson to spread when a world is in hardmode.
Defaulttrue

AllowCorruptionCreep

TypeBoolean
DescriptionAllows the corruption to spread when a world is in hardmode.
Defaulttrue

AllowHallowCreep

TypeBoolean
DescriptionAllows the hallow to spread when a world is in hardmode.
Defaulttrue

StatueSpawn200

TypeInt32
DescriptionHow many NPCs a statue can spawn within 200 pixels(?) before it stops spawning. Default = 3.
Default3

StatueSpawn600

TypeInt32
DescriptionHow many NPCs a statue can spawn within 600 pixels(?) before it stops spawning. Default = 6.
Default6

StatueSpawnWorld

TypeInt32
DescriptionHow many NPCs a statue can spawn before it stops spawning. Default = 10.
Default10

PreventBannedItemSpawn

TypeBoolean
DescriptionPrevent banned items from being spawned or given with commands.
Defaultfalse

PreventDeadModification

TypeBoolean
DescriptionPrevent players from interacting with the world while they are dead.
Defaulttrue

PreventInvalidPlaceStyle

TypeBoolean
DescriptionPrevents players from placing tiles with an invalid style.
Defaulttrue

ForceXmas

TypeBoolean
DescriptionForces Christmas-only events to occur all year.
Defaultfalse

ForceHalloween

TypeBoolean
DescriptionForces Halloween-only events to occur all year.
Defaultfalse

AllowAllowedGroupsToSpawnBannedItems

TypeBoolean
DescriptionAllows groups on the banned item allowed list to spawn banned items even if PreventBannedItemSpawn is set to true.
Defaultfalse

RespawnSeconds

TypeInt32
DescriptionThe number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.
Default5

RespawnBossSeconds

TypeInt32
DescriptionThe number of seconds a player must wait before being respawned if there is a boss nearby. Cannot be longer than normal value now. Use at your own risk.
Default10

AnonymousBossInvasions

TypeBoolean
DescriptionWhether or not to announce boss spawning or invasion starts.
Defaulttrue

MaxHP

TypeInt32
DescriptionThe maximum HP a player can have, before equipment buffs.
Default500

MaxMP

TypeInt32
DescriptionThe maximum MP a player can have, before equipment buffs.
Default200

BombExplosionRadius

TypeInt32
DescriptionDetermines the range in tiles that a bomb can affect tiles from detonation point.
Default5

Login and Ban Settings

DefaultRegistrationGroupName

TypeString
DescriptionThe default group name to place newly registered players under.
Default"default"

DefaultGuestGroupName

TypeString
DescriptionThe default group name to place unregistered players under.
Default"guest"

RememberLeavePos

TypeBoolean
DescriptionRemembers where a player left off, based on their IP. Does not persist through server restarts. eg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location.
Defaultfalse

MaximumLoginAttempts

TypeInt32
DescriptionNumber of failed login attempts before kicking the player.
Default3

KickOnMediumcoreDeath

TypeBoolean
DescriptionWhether or not to kick mediumcore players on death.
Defaultfalse

MediumcoreKickReason

TypeString
DescriptionThe reason given if kicking a mediumcore players on death.
Default"Death results in a kick"

BanOnMediumcoreDeath

TypeBoolean
DescriptionWhether or not to ban mediumcore players on death.
Defaultfalse

MediumcoreBanReason

TypeString
DescriptionThe reason given if banning a mediumcore player on death.
Default"Death results in a ban"

EnableWhitelist

TypeBoolean
DescriptionEnable or disable the whitelist based on IP addresses in the whitelist.txt file.
Defaultfalse

WhitelistKickReason

TypeString
DescriptionThe reason given when kicking players for not being on the whitelist.
Default"You are not on the whitelist."

ServerFullReason

TypeString
DescriptionThe reason given when kicking players that attempt to join while the server is full.
Default"Server is full"

ServerFullNoReservedReason

TypeString
DescriptionThe reason given when kicking players that attempt to join while the server is full with no reserved slots available.
Default"Server is full. No reserved slots open."

KickOnHardcoreDeath

TypeBoolean
DescriptionWhether or not to kick hardcore players on death.
Defaultfalse

HardcoreKickReason

TypeString
DescriptionThe reason given when kicking hardcore players on death.
Default"Death results in a kick"

BanOnHardcoreDeath

TypeBoolean
DescriptionWhether or not to ban hardcore players on death.
Defaultfalse

HardcoreBanReason

TypeString
DescriptionThe reason given when banning hardcore players on death.
Default"Death results in a ban"

EnableIPBans

TypeBoolean
DescriptionEnables kicking banned users by matching their IP Address.
Defaulttrue

EnableUUIDBans

TypeBoolean
DescriptionEnables kicking banned users by matching their client UUID.
Defaulttrue

EnableBanOnUsernames

TypeBoolean
DescriptionEnables kicking banned users by matching their Character Name.
Defaultfalse

KickProxyUsers

TypeBoolean
DescriptionIf GeoIP is enabled, this will kick users identified as being under a proxy.
Defaulttrue

RequireLogin

TypeBoolean
DescriptionRequire all players to register or login before being allowed to play.
Defaultfalse

AllowLoginAnyUsername

TypeBoolean
DescriptionAllows users to login to any account even if the username doesn't match their character name.
Defaulttrue

AllowRegisterAnyUsername

TypeBoolean
DescriptionAllows users to register a username that doesn't necessarily match their character name.
Defaultfalse

MinimumPasswordLength

TypeInt32
DescriptionThe minimum password length for new user accounts. Can never be lower than 4.
Default4

HashAlgorithm

TypeString
DescriptionThe hash algorithm used to encrypt user passwords. Valid types: "sha512", "sha256" and "md5". Append with "-xp" for the xp supported algorithms.
Default"sha512"

BCryptWorkFactor

TypeInt32
DescriptionDetermines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. The number of computational rounds is 2^n. Increase with caution. Range: 5-31.
Default7

DisableUUIDLogin

TypeBoolean
DescriptionPrevents users from being able to login with their client UUID.
Defaultfalse

KickEmptyUUID

TypeBoolean
DescriptionKick clients that don't send their UUID to the server.
Defaultfalse

TilePaintThreshold

TypeInt32
DescriptionDisables a player if this number of tiles is painted within 1 second.
Default15

KickOnTilePaintThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the TilePaint threshold.
Defaultfalse

MaxDamage

TypeInt32
DescriptionThe maximum damage a player/NPC can inflict.
Default1175

MaxProjDamage

TypeInt32
DescriptionThe maximum damage a projectile can inflict.
Default1175

KickOnDamageThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the MaxDamage threshold.
Defaultfalse

TileKillThreshold

TypeInt32
DescriptionDisables a player and reverts their actions if this number of tile kills is exceeded within 1 second.
Default60

KickOnTileKillThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the TileKill threshold.
Defaultfalse

TilePlaceThreshold

TypeInt32
DescriptionDisables a player and reverts their actions if this number of tile places is exceeded within 1 second.
Default32

KickOnTilePlaceThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the TilePlace threshold.
Defaultfalse

TileLiquidThreshold

TypeInt32
DescriptionDisables a player if this number of liquid sets is exceeded within 1 second.
Default50

KickOnTileLiquidThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the TileLiquid threshold.
Defaultfalse

ProjIgnoreShrapnel

TypeBoolean
DescriptionWhether or not to ignore shrapnel from crystal bullets for the projectile threshold count.
Defaulttrue

ProjectileThreshold

TypeInt32
DescriptionDisable a player if this number of projectiles is created within 1 second.
Default50

KickOnProjectileThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the Projectile threshold.
Defaultfalse

HealOtherThreshold

TypeInt32
DescriptionDisables a player if this number of HealOtherPlayer packets is sent within 1 second.
Default50

KickOnHealOtherThresholdBroken

TypeBoolean
DescriptionWhether or not to kick users when they surpass the HealOther threshold.
Defaultfalse

Chat Settings

CommandSpecifier

TypeString
DescriptionSpecifies which string starts a command. Note: Will not function properly if the string length is bigger than 1.
Default"/"

CommandSilentSpecifier

TypeString
DescriptionSpecifies which string starts a command silently. Note: Will not function properly if the string length is bigger than 1.
Default"."

DisableSpewLogs

TypeBoolean
DescriptionDisables sending logs as messages to players with the log permission.
Defaulttrue

DisableSecondUpdateLogs

TypeBoolean
DescriptionPrevents OnSecondUpdate checks from writing to the log file.
Defaultfalse

SuperAdminChatRGB

TypeInt32
DescriptionThe chat color for the superadmin group. #.#.# = Red/Blue/Green Max value: 255
Default{ 255, 255, 255 }

SuperAdminChatPrefix

TypeString
DescriptionThe superadmin chat prefix.
Default"(Super Admin) "

SuperAdminChatSuffix

TypeString
DescriptionThe superadmin chat suffix.
Default""

EnableGeoIP

TypeBoolean
DescriptionWhether or not to announce a player's geographic location on join, based on their IP.
Defaultfalse

DisplayIPToAdmins

TypeBoolean
DescriptionDisplays a player's IP on join to users with the log permission.
Defaultfalse

ChatFormat

TypeString
DescriptionChanges in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.
Default"{1}{2}{3}: {4}"

ChatAboveHeadsFormat

TypeString
DescriptionChanges the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting. Same formatting as ChatFormat without the message.
Default"{2}"

EnableChatAboveHeads

TypeBoolean
DescriptionWhether or not to display chat messages above players' heads.
Defaultfalse

BroadcastRGB

TypeInt32
DescriptionThe RGB values used for the color of broadcast messages. #.#.# = Red/Blue/Green Max value: 255
Default{ 127, 255, 212 }

SQL Settings

StorageType

TypeString
DescriptionThe type of database to use when storing data (either "sqlite" or "mysql").
Default"sqlite"

SqliteDBPath

TypeString
DescriptionThe path of sqlite db.
Default"tshock.sqlite"

MySqlHost

TypeString
DescriptionThe MySQL hostname and port to direct connections to.
Default"localhost:3306"

MySqlDbName

TypeString
DescriptionThe database name to connect to when using MySQL as the database type.
Default""

MySqlUsername

TypeString
DescriptionThe username used when connecting to a MySQL database.
Default""

MySqlPassword

TypeString
DescriptionThe password used when connecting to a MySQL database.
Default""

UseSqlLogs

TypeBoolean
DescriptionWhether or not to save logs to the SQL database instead of a text file. Default = false.
Defaultfalse

RevertToTextLogsOnSqlFailures

TypeInt32
DescriptionNumber of times the SQL log must fail to insert logs before falling back to the text log.
Default10

REST API Settings

RestApiEnabled

TypeBoolean
DescriptionEnable or disable the REST API.
Defaultfalse

RestApiPort

TypeInt32
DescriptionThe port used by the REST API.
Default7878

LogRest

TypeBoolean
DescriptionWhether or not to log REST API connections.
Defaultfalse

EnableTokenEndpointAuthentication

TypeBoolean
DescriptionWhether or not to require token authentication to use the
Defaultfalse

RESTMaximumRequestsPerInterval

TypeInt32
DescriptionThe maximum REST requests in the bucket before denying requests. Minimum value is 5.
Default5

RESTRequestBucketDecreaseIntervalMinutes

TypeInt32
DescriptionHow often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.
Default1

ApplicationRestTokens

TypeDictionary<String, SecureRest.TokenData>
DescriptionA dictionary of REST tokens that external applications may use to make queries to your server.
Default{}