ropenttd / docker_openttd Goto Github PK
View Code? Open in Web Editor NEW๐ OpenTTD in a container. Pure, plain, and simple.
License: GNU General Public License v3.0
๐ OpenTTD in a container. Pure, plain, and simple.
License: GNU General Public License v3.0
Every time i startup the container my config files get overwritten. From looking at my mounted volumes,, the config files have been split up and changed location in the latest version from "/config" to "/config/.config". I couldn't find anything in the openttd documentation, but it seems to be happening.
openttd.cf and private,cfg are in ~/openttd
Here is the log from a startup:
$ ~/openttd/.config$ docker run --name openttd -it -p 3979:3979/tcp -p 3979:3979/udp -v ~/openttd:/config:rw -e loadgame=xxx.sav" redditopenttd/openttd:latest
**No config file found: generating one**
Loading /config/save/xxx.sav
dbg: [net] Starting dedicated server, version 13.0
dbg: [net] Starting network
dbg: [net] Initializing UDP listeners
dbg: [net] Network online, multiplayer available
dbg: [net] Detected broadcast addresses:
dbg: [net] 0) 172.17.255.255
[2023-03-30 21:07:03] OpenTTD Game Console Revision 7 - 13.0
[2023-03-30 21:07:03] ------------------------------------
[2023-03-30 21:07:03] use "help" for more information.
[2023-03-30 21:07:03]
[2023-03-30 21:07:03] dbg: [net] Initializing UDP listeners
[2023-03-30 21:07:03] dbg: [net] Initializing UDP listeners
[2023-03-30 21:07:03] dbg: [net] Listening on 0.0.0.0:3979 (IPv4)
[2023-03-30 21:07:03] dbg: [net] Listening on 0.0.0.0:3979 (IPv4)
[2023-03-30 21:07:03] dbg: [net] Network revision name: 13.0
[2023-03-30 21:07:03] โ*** Game still paused (manual, number of players)
[2023-03-30 21:07:04] dbg: [net] Connected to coordinator.openttd.org:3976
[2023-03-30 21:07:04] dbg: [net] Connected to stun.openttd.org:3975
[2023-03-30 21:07:07] dbg: [net] ----------------------------------------
[2023-03-30 21:07:07] dbg: [net] Your server is now registered with the Game Coordinator:
[2023-03-30 21:07:07] dbg: [net] Game type: Invite only
[2023-03-30 21:07:07] dbg: [net] Connection type: Behind NAT
[2023-03-30 21:07:07] dbg: [net] Invite code: xxxxx
[2023-03-30 21:07:07] dbg: [net] ----------------------------------------
I suspect that changing line 7 in "entrypoint.sh" would resolve the issue:
_if [ ! -f /config/.config/openttd.cfg ]; then_
when launching a new container I get no base config, the server just launches without it, testing the command to generate it with docker exec gives me this
openttd@30061a15533a:~$ timeout -t 3 openttd -D
timeout: invalid option -- 't'
Try 'timeout --help' for more information
https://hub.docker.com/r/redditopenttd/openttd/ says to use this as the option to configure what saved game to load:
-e savegame={false|autosave|exit|(savename)}
Good afternoon, thanks for the work on this container. Been running it without persistence for a bit and it's worked great. Recently I have been working to get it setup to utilize the config directory so it can resume from autosave however I am having trouble configuring it to run as a proper user that has permissions to the folder.
I am running Docker from my Synology NAS and have many other containers I run which generally take PUID and GUID or UID and GID property that can be set as an environment variables to specify the user. Looking through the documentation and code it doesn't appear this container supports that.
Any chance that could be added?
my docker run command is:
docker run -d --name openttd --restart=always -p 3979:3979/tcp -p 3979:3979/udp -e savegame=autosave -v ~/.openttd:/config:rw redditopenttd/openttd:latest
It runs fine, but instead of ~/.openttd having just a config file in it, it contains the base game files. screenshot: https://i.imgur.com/dyXPnrb.png
Is this intended? I can't find openttd.cfg anywhere, and it doesn't seem like this is intended.
Hi guys,
I'm really struggling to get this image to load a saved game. I'm fairly new to Docker so i'm probably doing something stupid. I'd really appreciate some help!
I'm running:
docker run -d --name openttd -p 3979:3979/tcp -p 3979:3979/udp -e savegame=autosave -v ~/.openttd:/config:rw redditopenttd/openttd:latest
Without the argument e loadgame=true
the logs show:
loadgame not set - starting new game
...and then proceeds to generate a new map.
With -e loadgame=true in the command, if I look at the docker logs of the container, i'm just hitting the error:
/config/save/ not found...
If I remove both -e
arguments, the container loads up and the openttd.cfg file that's being mounted is working as expected; the server is named correctly, with all the correct configuration and map size etc. I just can't find autosaves or explicit saved game files (e.g. -e savegame=mysavedgame.sav
)
Things I've tried:
Cheers,
Robin
Hi the server works so far, but I think it got the wrong version.
If I look into the generated config file I see the following under the VERSION section
[version]
version_string = 1.10.1
version_number = 1A086D64
This indicated a version from 2020 I assume, is this intended?
Greetings
Hi,
As I understand this is only for the server mode?
How would you modify this to be able to play in Docker? I already have set up XQuartz, so I just need to get the build to also include everything that I need
Cheers
My Container doesn't want to upgrade to the latest (13.3) Version of OpenTTD and instead stays at 13.1.
It doesn't matter if I use the latest/stable or testing tag.
I thought it would upgrade at least in some 24h windows.
Hi I am trying to host this docker container and keep getting save issues.
I launch it using the following.
sudo docker run -it --rm -p 3979:3979/tcp -p 3979:3979/udp -v /home/admin/.openttd:/config --name openttd-NAB redditopenttd/openttd:latest
it keeps failing the save
[2021-05-19 17:06:40] dbg: [sl] Game Save Failed File not writable [2021-05-19 17:06:40] ERROR: Autosave failed
I have been playing with volume permissions etc but have not had any luck.
I went to run the container on a Pi 4, and realized that there is no ARM64 image for this container. Is there any plan to add support for this in the future?
The game search in
No config file found: generating one
ls: cannot access '/config/save/autosave/': No such file or directory
/config/save/autosave/ not found...
but the files and the save dictory lands in .local/share/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.