tModLoader / tModLoader

A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
https://www.tmodloader.net/
MIT License
4.1k stars 1.86k forks source link

Linux Dedicated Server (Self-Hosted) documentation out of date #2650

Open mkogerd opened 2 years ago

mkogerd commented 2 years ago

Version

Latest 1.4-stable

OS

Linux

Platform

Steam

This bug affects

Gameplay as a Player

Description

Disclaimer: not a steam bug but I wasn't sure how else to file this

I'm trying to set up a tMod server on a dedicated Linux machine following these instructions: https://github.com/tModLoader/tModLoader/wiki/Command-Line#dedicated-server-self-hosted

When I try running the script specified there, it downloads tMLlatest.json properly but then fails at the next line since it can't find a linux-specific tar link within tMLlatest.json

Here's the failing script from the documentation with a comment added at the failure point

# Linux Server Install Script v1.1 by Chicken-Bones (some changes by jopojelly)
wget https://api.github.com/repos/tModLoader/tModLoader/releases/latest -O tMLlatest.json
tml=`sed -n 's/.*\(https.*Linux.*.tar.gz*\)".*/\1/p' tMLlatest.json` # ISSUE HERE - Nothing matches so tml doesn't get populated
wget $tml
tar xvzf tModLoader.Linux*.tar.gz
chmod a+x tModLoader tModLoader-* tModLoaderServer *.bin*
rm *.zip *.tar.gz *.jar tMLlatest.json

Seems like this documentation is out of date, can these instructions be updated?

Log File

No response

Steps to reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

Reproduction frequency

No response

Additional Information

No response

aembke commented 2 years ago

I haven't gotten far enough to test out the rest of the process, but this snippet seems to work as a replacement for the old example:

tml=`curl -s https://api.github.com/repos/tModLoader/tModLoader/releases/latest | jq -r '.assets | map(select(.name == "tModLoader.zip" )) | .[].browser_download_url'`
wget $tml
mkdir tModLoader
unzip tModLoader.zip -d tModLoader
chmod +x tModLoader/*.sh tModLoader/LaunchUtils/*.sh
rm tModLoader.zip

It looks like quite a bit has changed in the build process from the v0.11* versions, but I'll post back here if I'm able to get it working. After a quick glance at the launch scripts it looks like the init process is a bit more interactive now, so I'm guessing callers will need to get cute with tmux and/or expect to automate this.

btmnk commented 2 years ago

I'm generally confused what steps to follow to setup a tmodloader server.. I've found https://github.com/tModLoader/tModLoader/wiki/Starting-a-modded-server but there are quite a few things that don't add up or are not fully explained..

The setup script mentioned to install and update mods installs the mods somewhere but definitely not in a sibling directory. After defining absolute paths it did though but it only installs the mods and nothing else. So I wasn't sure if it failed or if I still should use the server scripts provided in the release zip?

But then again the guide explains to use "modpath=/home//.local/share/Terraria/ModLoader/Mods" for the modpath but the setup script doesn't install the mods there in the first place? Is this configuration line obsolete then and the server finds the workshop items automagically? Should I just pass the path to the workshop directory then?

When I run the server script with my config it installs a few things and at the end just says "Launched Using Local Dotnet".. Is it a background process now? Should I use the server without steam? When I use it without steam it seems to work so far but of course it's not loading the mods..

I think it should be more clearer what to do when using steamcmd and what to do when not using steamcmd regarding mods..

Pomegranate123 commented 2 years ago

I agree, I was trying to set up a tModLoader server for a few hours and I have no idea what I'm doing wrong

PaienNate commented 2 years ago

I think they should load workshop mode although steam is not for use. Now steam workshop folder is not very easy to get mod, if make modpack, only a "install.txt" will be given, and in server it's no use for server without steam.

Chicken-Bones commented 1 year ago

@JavidPack can you update the mentioned wiki pages with new info from #2817

Vam-Jam commented 1 year ago

Are you still looking for help with this? If so I'd be happy to pick up this issue.