Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{SOLVED} Error: /home/openttd/.openttd/save/game.save not found... #47

Closed
MineTrainDevelopment opened this issue Feb 10, 2023 · 3 comments

Comments

@MineTrainDevelopment
Copy link

MineTrainDevelopment commented Feb 10, 2023

I´ve generatet a save file in the game, and put on my server at: /home/openttd/saves/game.save

And tryed to user this docker command:
sudo docker run -it --rm -e PUID=1000 -e PGID=1000 -p 3979:3979/tcp -p 3979:3979/udp -v /home/openttd/saves:/home/openttd/.openttd -e "loadgame=true" -e "savepath=/home/openttd/saves" -e "savename=game.save" --name openttd-server bateau/openttd:12.2

What am i doing whrong?
I've always shied away from docker. So im very new to this topic. but after reading documentation's, and other poples problems, i cant find the problem my self.

It works when i try to run it with just "savepath=/home/openttd/saves" -e “loadgame=last-autosave".
Saving and loading works, but my saves folder is empty. Afer restarting the docker container, the savegames are lost, and cant be loadet with the "load" command anymore.

@MineTrainDevelopment
Copy link
Author

MineTrainDevelopment commented Feb 10, 2023

I tryed using an separate user, but save error.
I also tried deleting the "saves" folder, when I run the docker command the folder even gets generated again.

And yes, i changed the ids to the correct ones for this user.

@MineTrainDevelopment
Copy link
Author

MineTrainDevelopment commented Feb 12, 2023

Also tryed using docker compose:

version: '3.3'
services:
  openttd:
    image: bateau/openttd:12.2
    container_name: openttd-server
    restart: unless-stopped
    ports:
      - "3979:3979/tcp"
      - "3979:3979/udp"
    volumes:
      - /home/openttd/saves:/home/openttd/.openttd
    environment:
      # savepath: /home/openttd/saves
      loadgame: "true"
      savegame: "game.sav"
      PUID: 1000
      PGID: 1000

But got the same error:

openttd@v26779:~/docker$ docker-compose up
Creating network "docker_default" with the default driver
Creating openttd-server ... done
Attaching to openttd-server
openttd-server |
openttd-server | -----------------------------------
openttd-server | GID/UID
openttd-server | -----------------------------------
openttd-server | User uid:    1000
openttd-server | User gid:    1000
openttd-server | User Home:   /home/openttd
openttd-server | -----------------------------------
openttd-server |
openttd-server | /home/openttd/.openttd/save/ not found...
openttd-server exited with code 0
openttd@v26779:~/docker$

@MineTrainDevelopment
Copy link
Author

I found another flaw on my end.
I have overseen that my volumes thing is relative from the unseres directory.
And i´ve named savename -> savegame in the docker file....

No everything works, and this is the working docker compose file:

version: '3.3'
services:
  openttd:
    image: bateau/openttd:12.2 #https://registry.hub.docker.com/r/bateau/openttd/tags
    container_name: openttd
    restart: unless-stopped
    ports:
      - "3979:3979/tcp"
      - "3979:3979/udp"
    volumes:
      - ~/server:/home/openttd/.openttd
    environment:
      # loadgame: "true"
      # savename: "game.sav"
      loadgame: last-autosave
      PUID: 1000
      PGID: 1000

@MineTrainDevelopment MineTrainDevelopment changed the title Error: /home/openttd/.openttd/save/game.save not found... {SOLVED} Error: /home/openttd/.openttd/save/game.save not found... Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant