mathielo / dst-dedicated-server

Don't Starve Together dedicated server guide for all platforms (Linux, Mac, Windows) with Docker. Extensive documentation covering mods installation, server config and performance, world generation and setting up admins.
MIT License
292 stars 56 forks source link

Why create docker volume, and nothing in volume directory? and question about migrate dst-server. #21

Closed test482 closed 4 years ago

test482 commented 4 years ago

I am sorry for my poor English.

I started a dst server three months ago, everything is fine.

but, today i want migrate dst-Server to my new VPS. At the beginning, i don't know how to migrate, when i run docker volume ls, i see two volumes listed: docker-volume

and when i run docker inspect dst_master and docker inspect dst_caves: dst_master dst_caves

when i cd to the directory which listed on docker inspect:

root@aliyun-beijing-ecs:/var/lib/docker/volumes/4fe500065c7034d12927b5d58667d18b1e2b48b9326ea8e155cb8f8522697d50/_data# tree .
.
└── DSTWhalesCluster

1 directory, 0 files

it is nothing in there, only one directory DSTWhalesCluster, same as other volume.

My doubt is i see below text on docker-compose.yml:

    volumes:
      - ./DSTClusterConfig:/home/dst/.klei/DoNotStarveTogether/DSTWhalesCluster
      - ./volumes/mods:/home/dst/server_dst/mods

it's means should only use the host directory to be DSTClusterConfig, right? why there have two volume created?

and i have other question, if i want move dst-Server for one VPS to other VPS, do I only need to package the entire folder dst-dedicated-server, and re-run it?

mathielo commented 4 years ago

Hey @test482 sorry for the delay. Each volume plays an important role.

./DSTClusterConfig:/home/dst/.klei/DoNotStarveTogether/DSTWhalesCluster: This is where the cluster settings are stored, and they are shared by both Master and Caves shards. These files live in the project and are mounted into the shards so they can load these settings.

./volumes/mods:/home/dst/server_dst/mods: You probably don't see this because you don't have any mods enabled, but if you had you'd also see that there. This volume is for mods to be reused between shards without unnecessary re-download every time you start the game.

Regarding your question about moving VPS: Moving the entire dst-dedicated-server folder should work. Some people had issues with that before due to system permissions, so just check file ownership and permissions after moving to make sure the correct users have the right access.