azixus / ARK_Ascended_Docker

Docker image to run an ARK Survival Ascended server on Linux
MIT License
59 stars 11 forks source link

2 docker server #30

Closed NRmash closed 2 months ago

NRmash commented 6 months ago

Hey,

is there a way to run your docker version twice simultaneously on a linux server?

greez

azixus commented 6 months ago

Currently, the the safest way is to clone the repo in two different directories and use different ports. One issue with this method is that you actually need to store the server files twice.

I'll try to improve this in the future.

NRmash commented 6 months ago

Currently, the the safest way is to clone the repo in two different directories and use different ports. One issue with this method is that you actually need to store the server files twice.

I'll try to improve this in the future.

thx :)

NRmash commented 4 months ago

Hey,

since traveling is now possible i would be very happy if there would be a possibility to use 2 servers at the same time :)

jmaggart1979 commented 3 months ago

I love this project and I appreciate all the work that has gone into it! I'm currently running 3 different containers for different ark setups that I mess around with.

I would also appreciate having the ability to cluster servers since Scorched is coming out and would love to transfer. Any updates on this would be awesome.

NIREKI commented 2 months ago

I love this project and I appreciate all the work that has gone into it! I'm currently running 3 different containers for different ark setups that I mess around with.

I would also appreciate having the ability to cluster servers since Scorched is coming out and would love to transfer. Any updates on this would be awesome.

Thanks for your kind words @jmaggart1979, appreciate it! It also seems like clustering is officially supported since some patches now (according to their patchnotes).

If you are running your own cluster you can enable this with: -clusterID=[clustername]

So, just go into the .env files of both your servers and add the -clusterID=blablabla into theARK_EXTRA_DASH_OPTS so it looks (for example) like this:

ARK_EXTRA_DASH_OPTS=-ForceAllowCaveFlyers -ForceRespawnDinos -AllowRaidDinoFeeding=true -ActiveEvent=Summer -clusterID=thisisarandomid

We could edit the .env file to make this a bit easier, but this should already be as straight forward as it gets. Wildcard really should step up their documentation game.

NIREKI commented 2 months ago

I think closing this issue as "wontfix" would be the best thing to do. With Scorched Earth now released, it wouldn't even make sense to reduce server file size because of the different maps.

Quick Guide for running a cluster:

jmaggart1979 commented 2 months ago

Thanks for the replies and the quick guide. I was aware of the clusterid settings (but wasn't sure where to put it), and the server port difference. Unfortunately, with just those changes I am not able to transfer. The server is available, the gus.ini settings to enable crossark transfers are correct but when I get to the second server spawn screen it takes me to the character creation.

Most of the documentation I was seeing online is that there needs to be either a environmental variable to call out the cluster folder or a way to indicate the cluster directory override. Am I not understanding that correctly?

I don't know enough about docker compose files so when I try to do it I just keep screwing something up.

NIREKI commented 2 months ago

@jmaggart1979 yeah, you could be right, that you probably need the -ClusterDirOverride variable. And, if I understand this correctly, both servers need to use the same Directory. If you want to, you can hit me up on Discord and we could test this together. My username is nirekiki.

I think this is how it should work:

  1. create a folder for the shared data. Lets say/opt/clustersand grant the right permissions to it withchown -R 1000:1000 /opt/clusters`
  2. Edit the docker-compose.yml of both servers, add the same volume to both servers:
    volumes:
      - ./ark_data:/opt/arkserver
      - ./ark_backup:/var/backups/asa-server
      - /opt/clusters:/opt/shared-cluster#<-- This means that data in the container saved in the local /opt/clusters folder get's saved on your host in the previously created /opt/clusters folder
      - steam_data:/opt/steamcmd
  3. Edit the .env file and add the -ClusterDirOverride variable, it should look like the following:
    ARK_EXTRA_DASH_OPTS=-ForceAllowCaveFlyers -ForceRespawnDinos -AllowRaidDinoFeeding=true -ActiveEvent=Summer -clusterID=yourid -ClusterDirOverride="/opt/shared-cluster"
  4. Now both servers should be able to access the same data and copy data between each other.
jmaggart1979 commented 2 months ago

@NIREKI I would love to help test it. I can most likely be on later this evening (I'm in Colorado, US) after I finish with classes and family stuff.

One other thought to consider is implementing something like this where you could have multiple instances and a cluster setup. Not implying to steal this person's stuff but just thought it might be an inspiration for updates.

NIREKI commented 2 months ago

One other thought to consider is implementing something like this where you could have multiple instances and a cluster setup. Not implying to steal this person's stuff but just thought it might be an inspiration for updates.

I mean yeah, why not, the manager of this project could do much more things and I can tell you that we initially had some plans to add some features to it. But idk, the container worked, we never really needed more than one instance running at the same time so it was more or less abondoned because there really was no value to invest even more time into this project.

At the end it should work flawlessly with the extra folder and the other requirements I've listed earlier. The server then would actually meet all the requirements I could find in the ARK Forum. But yeah, you are absolutely right, that this docker image could be improved in many ways to make it much easier.

jmaggart1979 commented 2 months ago

But idk, the container worked, we never really needed more than one instance running at the same time so it was more or less abondoned because there really was no value to invest even more time into this project.

That makes sense. I wan't meaning to insult or anything.

At the end it should work flawlessly with the extra folder and the other requirements I've listed earlier. The server then would actually meet all the requirements I could find in the ARK Forum.

That's cool. I can help test that piece so if others who are using this image want to cluster servers they have it will work.

NIREKI commented 2 months ago

@jmaggart1979 good news: it works! @azixus was kind enough to test my small guide, and player transfer works this way. Just follow this section of the updated readme.md file, and everything should work. If you have further questions/recommendations or problems, feel free to open this issue again or write me a pn over at discord :)