Skip to content

Support for alternative base folder for config files (settings.xml, banlist.xml, etc) #4228

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

Open
1 task done
Rilot06 opened this issue May 18, 2025 · 4 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@Rilot06
Copy link

Rilot06 commented May 18, 2025

Is your feature request related to a problem? Please describe.

Currently you can only change the following config file paths:

  • mtaserver.conf: with --config parameter when starting the server
  • acl.xml: in mtaserver.conf
  • server-id.keys: in mtaserver.conf

Every other config and runtime generated files (e.g. settings.xml, banlist.xml, internal.db, registry.db, etc) are hardcoded to be in the mods/deathmatch/ folder.
The reason I'm writing this issue is because I'm working on a docker image for MTA:SA server, and I don't want to volume bind the whole deathmatch folder, only specific ones, like ./config:server/mods/deathmatch/config (for these exact files), ./resources:server/mods/deathmatch/resources, etc.

Describe the solution you'd like

An option for base config folder path in mtaserver.conf, like:
<config_base_folder></config_base_folder> <!-- Leave blank for default mods/deathmatch folder, change for an alternative path relative to mods/deathmatch -->
Maybe acl and idfile tags could use this folder as the parent root by default too.

Describe alternatives you've considered

A startup parameter for the server binary, the same way as the --config one. It could work the same way as the mtaserver.conf <config_base_folder> solution.
./mta-server64 --config-folder config (still relative to the mods/deathmatch folder, so this would mean mods/deathmatch/config/{settings.xml,internal.db,etc})

Additional context

It's definitely not the most important thing in the world, but I believe it could be a great addition.
If the issue doesn't get enough positive feedback, sure, I could just bind the full mods/deathmatch folder as a volume, or do a bind for every single file, but then they couldn't easily be auto generated by the server, since docker would auto create them as completely empty files.
If the issue does get enough positive feedback, then I'm willing to implement this as a PR, but I wouldn't want to make it without any discussion about it.

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@Rilot06 Rilot06 added the enhancement New feature or request label May 18, 2025
@botder
Copy link
Member

botder commented May 18, 2025

I see no problem with this, as long as you don't break the default behavior.

@Rilot06
Copy link
Author

Rilot06 commented May 18, 2025

I see no problem with this, as long as you don't break the default behavior.

Yep, that's obvious, I'll do it as a non-required new option, with the default being the same as now.
Can I ask which of the two solutions you think would be better? The mtaserver.conf option or as a parameter for the server binary?

@Nico8340
Copy link
Contributor

Yep, that's obvious, I'll do it as a non-required new option, with the default being the same as now. Can I ask which of the two solutions you think would be better? The mtaserver.conf option or as a parameter for the server binary?

How about both and param being the preferred one?

@Rilot06
Copy link
Author

Rilot06 commented May 18, 2025

How about both and param being the preferred one?

Sure thing, that's the same way as <serverport> and --port work, parameter could overwrite the .conf one.
Thanks for the suggestion, I'll start working on it tomorrow probably!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants