Proper way to give config to plugins

Is there some way to extend Nakama config (I guess no)?

Otherwise, what is a proper way to give a custom config to plugins, I imagine some YAML config …

Quick & ugly for now is some environment variables given to Nakama node.

Thanks !

The best way to provide custom configuration to your own runtime code is to use runtime env values. In a config these would look something like this:

  - "foo=bar"

You can then access this through the runtime context.

Generally speaking Nakama’s config format is not something you can freely change. The server expects a certain set of config values with particular formats and associated meanings. The runtime env section of the existing config is designed to do exactly what you want. :+1:

1 Like