You can change the world difficulty by editing difficulty variables in configuration -> startup parameters.
Normal = 0
Expert = 1
Master = 2
Journey = 3
You can't edit this setting for existing maps. You will have to generate a new world after changing this option by changing the World Name as well.
If editing this setting does not work for you for whatever reason you can always generate a map locally and upload it to your server. Once uploaded to the Worlds directory and changing the World Name variable to match the uploaded level.
For tModloader we recommend always generating the map on your local machine with your preferred settings and then uploading it to the server. Once uploaded you can set the server to load your map.