Automatic Zammad Configuration

Hi All,
We installed the Zammad by writing an Ansible script, and we would like to automate all the Email configuration, admin account creation through the script instead of following GUI. Is it possible?
Are these configurations stored in the database? Can we restore the configuration from “20200212125219_zammad_db.psql.gz”? Ultimately, we are aiming to configure, change brand logo, create a list of user, groups, SLAs automatically instead of following zammad GUI manually. Thanks in advance.


i personally believer that the Console is a much more appropriate way to change settings. You can basically change anything you can do in the GUI from the commandline. Its much mure updateproof than restoring an sql dump.

For a start you can read here:

1 Like

You can manually use the console as recommended by @aelsing, which works well enough.

But the more robust solution is to create a package which encapsulates your changes. See this thread for more info: Zammad Package Best Practices

To get you started, here is how you would change the branding:

  1. All settings are defined in db/seeds/settings.rb
  2. The brand name is called product_name
  3. You can get the current value with Setting.get("product_name")
  4. You can set it with Setting.set("product_name", "New product name")

For creating users and such, just use the appropriate model method, for example: User.create_if_not_exists(..params..)

In my opinion the rails console is the way to go, as it will directly give feedback if something went wrong which allows you to have a look in your ansible scripts.

Thanks a lot for your response. I will try and let you know the status.

I’ve actually written some rails scripts to do a similar configuration export myself over the past few days!

If you’d like some examples, I can post one here when I’m at the office.