Didstopia / 7dtd-server

Provides a dedicated linux server for 7 Days to Die running inside a Docker container.
MIT License
108 stars 45 forks source link

Persistent save games #20

Closed steilerDev closed 5 years ago

steilerDev commented 5 years ago

HI Dev,

I am using your docker container to host a server for me and my friends. Upon docker-compose down the save files for our map were removed, even though I mapped /steamcmd/7dtd into my host explicitly. Are the save states for the server kept in a different location?

This is important, because moving the containers between hosts, depending on load is my main goal for using this setup.

Thank you!

Dids commented 5 years ago

Can you show the Docker compose file for reference? Are you only running it on one host/server now, and plan on manually moving data between servers later on?

steilerDev commented 5 years ago

Hi @Dids ,

thanks for your reply. I plan to manually move the data later, when e.g. I find a better hosting solution or just better hardware. However if you would docker-compose down in order to save resources and docker-compose up later, this would also destroy your save states if you did not map the correct folders.

However, I think I found the right folders to map to the host, in order to move the states. My docker-compose.yml for references:

version: '2'
services:
  7dtd:
    image: didstopia/7dtd-server
    container_name: 7dtd
    restart: unless-stopped
    ports:
      - "26900:26900/tcp" # Game (Game details query port)
      - "26900:26900/udp" # Game (Steam's master server list interface)
      - "26901:26901/udp" # Game (Steam communication)
      - "26902:26902/udp" # Game (networking via RakNet)
      - "26903:26903/udp" # Game (networking via UNET)
      - "8080:8080/tcp" # Web based control panel
      - "8082:8082/tcp" # Web Panel of the Server fixes
      - "8081:8081/tcp" # Telnet
    volumes:
      - /opt/steilerGroup-Docker/7dtd/volumes/data:/steamcmd/7dtd
      - /opt/steilerGroup-Docker/7dtd/volumes/save:/root/.local/share/7DaysToDie/Saves
    environment:
      SEVEN_DAYS_TO_DIE_UPDATE_CHECKING: "1"
      SEVEN_DAYS_TO_DIE_START_MODE: "2"
networks:
  default:
    external:
      name: steilerGroup

/root/.local/share/7DaysToDie/Saves seems to be the place. Maybe you can note that in your documentation.

Thanks,

Frank

xXZaretXx commented 5 years ago

Since 17.2 you can change the save folder in the server config file :)

Dids commented 5 years ago

Pushing out a fix now that takes this into consideration, and also changes how the default config file is handled/generated.

SirBastol commented 3 years ago

mbround18/valheim_latest is a steam dedicated server setup with autobackups and exports to a local directory outside teh container for persistance and to no lose world data wehn updates or restarts.

is there any wawy to set this up for this image ? because i am ahving problems editing the config files and keeping them edited.. (im a noob to docker. and used to nano and VI in linux and both arent there.. )