Jump to content

Domtron Vox

Vintarian
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

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

Domtron Vox's Achievements

Wolf Bait

Wolf Bait (1/9)

4

Reputation

  1. ################## Top Information ################## Disclaimer: I'm fairly new to docker and brand new to VS server hosting, So it is very likely I'm missing something. That said What I have below is working for me so far. Credit: I've based this off of the docker file and launch script that you can see here in snook9's repo (MIT License). My tweaks allow you to set the version you want as an environment variable (in a docker compose for example) as well as make sure the data and server folders are easily accessible on the host system. I will also note I saw Devidian's repo, but did not particularly like the need to wait for them to put out a new container for the next version. This of course means that if the server setup instructions changes for some reason The dockerfile below will need updating. I believe that is a fairly low chance at this point, but it is possible. The way I'm doing it also provides the chance that the user will enter a wrong version number and cause issues, but that is IMO worth the flexibility provided. This is broken into two sections. In the first I'm going to just provide the needed files that any experienced docker user should be able to use. In the second section, I'll give more details on how to set this up via Portainer. ########################## The Files ########################## There are 2 files attached to this post. Dockerfile launcher.sh The dockerfile and launcher.sh go together. You need to make sure the launcher script is accessible when the dockerfile is used to build the container (I do an ADD launcher.sh in the dockerfile). I tag the container as vintage_story_server:any as you can see in the below compose file. Here is the docker compose I use to actually spin up the container. version: "3.9" services: vsserver: image: vintage_story_server:any container_name: vintagestory_server ports: - "42420:42420" volumes: - /path-to-your-data-folder/vintage_story/server:/home/vintagestory/server - /path-to-your-data-folder/vintage_story/data:/var/vintagestory/data environment: - VS_VERSION=1.18.1 You obviously want to set the volume paths to the correct location. You will also want to run chown 1000:1000 on these folders on your host system so the container can access them. You can also update VS_VERSION to any version of vintage story. An important note: the launcher script is what downloads and installs the right vintage story archive. When the container is started the launcher script checks if the ./server.sh exists in the server folder. When it doesn't the script downloads the version indicated in the environment variable then stops the server. On the next run, it will see the file there and run the server. This makes updates very easy, you delete the server folder contents and leave the data folder alone. Update the version environment variable then restart the container and the new server version will be downloaded and use your existing server data. I highly suggest backing up the data folder when you do this to make sure your data isn't corrupted when running the new server version. I've done this once from 1.18.0 to 1.18.1 and it was seamless (though obviously a very minor update). #################### Setup With Portainer #################### This assumes you have the Portainer web interface setup and running. First we need to build the container image. Log into Portainer and Switch to the Local Environment. Go to Images in the side panel. Click on the Build a new Image button. Enter vintage_story_server:any for the name. Select Web Editor (selected by default usually) and enter the full text contents of the Dockerfile file attached to this post, and downloadable from here: Dockerfile Under the box you pasted the Dockerfile into, you will see an option to upload files. Click the Select files button and upload the launcher.sh file attached to this post, and downloadable from here: launcher.sh Once all that is done, go to the very bottom under the Actions section and click Build the image. This can take a while. When it is done the window will automatically switch to a log file viewer. You should see successful in the very last line. If it says error, you will need to figure out what went wrong. You should now be able to go to the Images section and see your new container image in the list there. looking under the tag column you should see the vintage_story_server:any. You now need to actually use the image to create your server. First, You will need to SSH into your server or use whatever method your host provides to create a folder for vintage story. Under this folder you should add a data and server folder. You then need to set these folders ownership to use the user ID and group id 1000. In ssh you would use chown 1000:1000 server then do the same for the data folder. This allows the container to save the server files and data to these folder. Optional: While you are here, it is a good idea to create a serverconfig.json in the data folder that is configured to your needs. If you do not, when the server is run, it will create this file using vintagestory server's defaults which need at least some tweaking by you even if it's just the name and description fields. Second, You should still be logged into Portainer and in your local environment. If not do so now. in the side bar go to Stacks. You will then want to click the Add stack button. Name the stack whatever you want. In the Web Editor section you will want to paste in the below Docker Compose info. Note this uses Yaml formatting, so if you make changes you will need to follow those conventions. version: "3.9" services: vsserver: image: vintage_story_server:any container_name: vintagestory_server ports: - "42420:42420" volumes: - /path-to-your-data-folder/vintage_story/server:/home/vintagestory/server - /path-to-your-data-folder/vintage_story/data:/var/vintagestory/data environment: - VS_VERSION=1.18.1 You need to change the volumes to be paths on your host server that you can access. You also need to change VS_VERSION to the version of VS you want to be running. All the way at the bottom, you should now be able to click the Deploy the stack button. You will be taken to the stack details page if nothing goes wrong. You will see in the container section that your container is either running or stopped. If it is running you will want to wait until it has stopped, then you can start it again. What is happening is during this first run of the container the launcher script is downloading the version of VS indicated in the environment variable VS_VERSION. Once it is done the container will STOP. The second run will then boot up the vintage story server and you should be able to connect via a Vintage story client. If you are concerned you can click on the log file icon on the container and see what exactly is going on. You should see a lot of lines indicating download progress then at the end it will tell you to restart. If you've already restarted it will tell you vinage story is running (or indicate an error of why it isn't). in logs You are done and should be able to access the server. ################# Troubleshooting ################# TODO Reserved for solutions to issues anyone has. If I make changes to the dockerfile I will update this guide and change the file that is attached. ############## Attached files ############## Dockerfile launcher.sh
  2. The ability to pick up small animals. Chickens, chicks, baby sheep(or are they goats?), and wolf pups. Put them in your off hand and don't allow moving them anywhere else until you put them back down. Or maybe a cage backpack like the bee hive things where you put it on then somehow get the target creature into it. Better way to set spawn. I've never found a temporal gear meaning I either have to set up right at spawn or trek all the way from spawn to home. The method for setting spawn should be a peaceful path IMO, I.e. collect some materials and craft a spawn point. (or am I missing something?)
×
×
  • 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.