Hermsi1337 / docker-ark-server

Dockerize your ARK server - configurable via env
https://hub.docker.com/r/hermsi/ark-server/
MIT License
114 stars 36 forks source link

Multiple Instances #67

Closed craigdubose closed 2 years ago

craigdubose commented 2 years ago

I'm trying to setup multiple instances of Ark on my docker server. When I have 2 instances running and I attempt to connect, my game crashes when I attempt to connect to either locally. When I shut down the 2nd instance, I can connect fine. On older docker versions of ark, there was a 'exclusive' flag that appears it might have solved this, but I am not sure if that was the use case or if your image supports multiple instances within the same node. Do you have any additional information on how to do multiple instances? This is personal use not gaming company of course. :) This is local LAN testing only so far.

Instance 1 Config

version: '3'

services:
  Ark-Server:
    restart: always
    container_name: ark_server
    image: hermsi/ark-server:latest
    volumes:
      - /mnt/apps/ark-server:/app
      - /mnt/apps/ark-server-backups:/home/steam/ARK-Backups
    environment:
      - SESSION_NAME=SessionName
      - SERVER_MAP=Ragnarok
      - SERVER_PASSWORD=
      - ADMIN_PASSWORD=
      - MAX_PLAYERS=8
      - UPDATE_ON_START=true
      - BACKUP_ON_STOP=true
      - PRE_UPDATE_BACKUP=true
      - WARN_ON_STOP=true
      - GAME_MOD_IDS=1373744537,1676159020,2110243671,2034355411,1445395055,1522327484,2457457085,1428596566,1404697612,2064588662,2376943369,756389708,1814953878,2210509163,2597341089,754885087,2255986218,2003934830,2007020947,2456786561,1650069767,731604991,761535755,1373744537,1676159020,2110243671,2034355411,1445395055,1522327484,2457457085,1428596566,1404697612,2064588662,2376943369,756389708,1814953878,2210509163,2597341089,754885087,2255986218,2003934830,2007020947,2456786561,1650069767,731604991,761535755,1445181373
      - DISABLE_BATTLEYE=true
    ports:
      # Port for connections from ARK game client
      - "7777:7777/udp"
      # Raw UDP socket port (always Game client port +1)
      - "7778:7778/udp"
      # RCON management port
      - "27020:27020/tcp"
      # Steam's server-list port
      - "27015:27015/udp"
    networks:
      - default

Instance 2 Config

version: '3'

services:
  Ark-Server-FJ:
    restart: always
    container_name: ark_server_FJ
    image: hermsi/ark-server:latest
    volumes:
      - /mnt/apps/ark-Fj-server:/app
      - /mnt/apps/ark-Fj-server-backups:/app/backup
    environment:
      - SESSION_NAME=SessionName
      - SERVER_MAP=Fjordur
      - SERVER_PASSWORD=
      - ADMIN_PASSWORD=
      - SERVER_LIST_PORT=27016
      - RCON_PORT=27021
      - GAME_CLIENT_PORT=7789
      - UDP_SOCKET_PORT=7780
      - MAX_PLAYERS=8
      - UPDATE_ON_START=true
      - BACKUP_ON_STOP=true
      - PRE_UPDATE_BACKUP=true
      - WARN_ON_STOP=true
      - GAME_MOD_IDS=1373744537,1676159020,2110243671,2034355411,1445395055,1522327484,2457457085,1428596566,1404697612,2064588662,2376943369,756389708,1814953878,2210509163,2597341089,754885087,2255986218,2003934830,2007020947,2456786561,1650069767,731604991,761535755,1373744537,1676159020,2110243671,2034355411,1445395055,1522327484,2457457085,1428596566,1404697612,2064588662,2376943369,756389708,1814953878,2210509163,2597341089,754885087,2255986218,2003934830,2007020947,2456786561,1650069767,731604991,761535755,1445181373
      - DISABLE_BATTLEYE=true
    ports:
      # Port for connections from ARK game client
      - "7779:7779/udp"
      # Raw UDP socket port (always Game client port +1)
      - "7780:7780/udp"
      # RCON management port
      - "27021:27021/tcp"
      # Steam's server-list port
      - "27016:27016/udp"
    networks:
      - default
baralipdo commented 2 years ago

One thing I notice from your posrt right away is in your second config you declare - GAME_CLIENT_PORT=7789 and - "7779:7779/udp" . Maybe check that out.

craigdubose commented 2 years ago

yea, it was a me problem :D I forgot to close out the issue after I found it. 2 instances are working fine now. It was interesting that the ports being backwards crashed the game entirely on server selection.