I was able to find out how to get the server running using the recommended method (a dedicated "vintagestory" user without sudo to run the start script) on minimum install Debian 12. Here is the full process, which is a combination of the process outlined on the wiki here and here.
1. Install dependencies. Then, create a dedicated user and start a bash session as the user; we can effectively log into the user by telling it to use bash as its shell temporarily despite having its default shell be /sbin/nologin:
sudo apt install -y procps screen wget
useradd vintagestory -s /sbin/nologin -m
sudo -u vintagestory bash
2. Now that we are in a bash shell as vintagestory, we continue the setup by navigating to the user's home directory and setting it up for the server by making a data and server directory:
cd ~ && mkdir data server
3. Now we install the proper .NET runtime with
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 7.0
4. There should now be a hidden ".dotnet" folder in /home/vintagestory, you can check with a quick ls -a. But now we can go into the server directory and download the server files and give execute perms to the startup script.
cd server
wget https://cdn.vintagestory.at/gamefiles/stable/vs_server_linux-x64_1.20.9.tar.gz
tar xzf vs_server_linux-x64_*.*.*.tar.gz && rm vs_server_linux-x64_*.*.*.tar.gz
chmod +x server.sh
5. Now, we have to make a small edit to the script so that we set up the proper environment. We have to add the .NET binaries to this user's PATH so the server can find them. This amounts to adding the following lines to server.sh (I put them just before the "INVOCATION" line):
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
6. Edit whatever firewall settings you have to in order for the server, on whatever port you set (42420 by default) will make it through your firewall (Step 6 here has details).
7. We can now verify if the server can start properly, since we are still "logged in" as vintagestory we can simply execute
./server.sh start
8. The server should start correctly, stop it with the stop command before continuing. Now we can exit the bash session (type exit or hit Ctrl+D). Next, we want to set up a systemd service so that we have full logging, the ability to enable the service at startup, and also have it restart on a crash. We will create a service file
sudo rnano /etc/systemd/system/vs_server.service
and paste in the following settings:
[Unit]
Description=Vintage Story Dedicated Server
After=network.target
[Service]
Type=forking
User=vintagestory
WorkingDirectory=/home/vintagestory/server
ExecStart=/home/vintagestory/server/server.sh start
ExecStop=/home/vintagestory/server/server.sh stop
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
9. Now we should be able to manage the server using normal systemctl commands. To start it up now and enable the service use:
sudo systemctl enable --now vs_server
10. The server will ultimately exist in the background now, but if we ever want to open up the server console and type in some commands, we can simply pull up the screen session the startup script created.
sudo -u vintagestory screen -D -R vintagestory_server
You can type commands here as usual and they will be sent to the server. You can exit the session by hitting Ctrl+A and then D. There may be another way to do this besides the sudo shananigans, but this works so .
Hopefully that helps some people!