Server Configuration - SignatureBeef/Terraria-s-Dedicated-Server-Mod GitHub Wiki
The server can be pre-configured with certain settings such as port, world file to use, and password so that you do not need to specify them at run time or interactively with the server. You can however specify them on the command line instead. I won't go into a whole lot of detail on this subject here, because it's mostly done for us already on the official Terraria Wiki. So refer to that page to actually configure your server. Here, you will learn about how to run the server with the configuration file, and it's mainly here to note any differences or additions to the config file from the official one.
You can download the official Terraria server config file.
Or download the TDSM config file with all the additional TDSM options added.
Run With Config File
Windows
There are a a few options. You may use a shortcut, use the command line, or use a batch script. The main thing you should remember is to launch the server like this.
tdsm.exe -config <config file>
Replace <config file>
with the name of an actual file, for example: tdsm.exe -config server.config
Linux
Requirement: Mono is required to run the server on Linux. Please see the Mono page.
On linux, it's basically the same as on windows. You only need to add mono to the beginning, before tdsm.exe. For example: mono tdsm.exe -config <config file>
Command Line
The -config option is a command line option, there are others such as -world that allow you to specify world right on the command line if you prefer to do it that way. Just remember that if you don't use a config file, you will be using defaults for all the TDSM specific options.
Command Line Options (from gamepedia.com)