Jump to content

ChuckGlarman

Very supportive Vintarian
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ChuckGlarman's Achievements

Wolf Bait

Wolf Bait (1/9)

4

Reputation

  1. Hey! I never had my notifications setup so I completely forgot about this thread... sorry! If you haven't figured it out yet I would love to help! Also goes for everyone else experiencing issues here. Without the logs its hard to debug this, but we can check the dotnet install. Can you post an ls of the dotnet directory and the dotnetinstall/tools directory? Others should have execute perms on all of that or else VS can't use it. Also, check perms directory by directory, including the game data directory (wherever you set it) and Logs directory therein. My guess is it can't access those even though the directory with the start script is all good. Remember that chown and chmod don't work recursively very well: i.e. chmod -R g+rw ./* will only go one layer deep. If it hits a directory it will apply the perms to the directory but will not go inside it. So, even though a directory somewhere has the right perms, but the files inside it don't, the server will not start. In the meantime I will try to get a docker image working with a barebones server in it as a proof of concept. One should be able to read the Dockerfile for all the step-by-step instructions for setting it up. As long as you have the correct versions of the dependencies I don't expect anything to be different between ubuntu/debian/Raspbian.
  2. 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!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.