# Automatic Zammad Configuration

**URL:** <https://community.zammad.org/t/automatic-zammad-configuration/3984>\
**Category:** Development\
**Created:** [February 13, 2020, 1:47pm UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984 "2020-02-13T13:47:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinesh121991](https://community.zammad.org/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@dinesh121991](https://community.zammad.org/u/dinesh121991)\
**Post date:** [February 13, 2020, 1:47pm UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/1 "2020-02-13T13:47:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aelsing](https://community.zammad.org/user_avatar/community.zammad.org/aelsing/32/2394_2.png) [@aelsing](https://community.zammad.org/u/aelsing)\
**Post date:** [February 13, 2020, 4:37pm UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/2 "2020-02-13T16:37:36Z")

</div>

Hi,

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:

[https://docs.zammad.org/en/latest/admin/console.html](https://docs.zammad.org/en/latest/admin/console.html)

---

<div class="post-metadata">

**Author:** ![abelxluck](https://community.zammad.org/user_avatar/community.zammad.org/abelxluck/32/627_2.png) [@abelxluck](https://community.zammad.org/u/abelxluck)\
**Post date:** [February 14, 2020, 12:13pm UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/3 "2020-02-14T12:13:41Z")

</div>

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](https://community.zammad.org/t/zammad-package-best-practices/3963)

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

1. All settings are defined in [db/seeds/settings.rb](https://github.com/zammad/zammad/blob/develop/db/seeds/settings.rb)
2. The brand name is called [`product_name`](https://github.com/zammad/zammad/blob/develop/db/seeds/settings.rb#L89-L112)
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..)`

---

<div class="post-metadata">

**Author:** ![MrGeneration](https://community.zammad.org/user_avatar/community.zammad.org/mrgeneration/32/9260_2.png) [@MrGeneration](https://community.zammad.org/u/MrGeneration)\
**Post date:** [February 17, 2020, 1:54pm UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/4 "2020-02-17T13:54:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dinesh121991](https://community.zammad.org/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@dinesh121991](https://community.zammad.org/u/dinesh121991)\
**Post date:** [February 26, 2020, 9:48am UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/5 "2020-02-26T09:48:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fleverest](https://community.zammad.org/user_avatar/community.zammad.org/fleverest/32/2204_2.png) [@fleverest](https://community.zammad.org/u/fleverest)\
**Post date:** [February 27, 2020, 4:35am UTC](https://community.zammad.org/t/automatic-zammad-configuration/3984/6 "2020-02-27T04:35:48Z")

</div>

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.
