How to configurate Bamboo Server without setup wizard?
Asked by Peisheng Wu:

I am trying to setup a bamboo server onto EC2 with a full automated process. Therefore, I would like to know where are the configuration files for database connection, system administrator credentials, as well as proxy setup.

I have run this the docker image locally and discovered that you are using hibernate to config database connection, and some other configs in \`bamboo.cfg.xml\`. I am wondering if hibernate can read database setting from \`properties\` file, which you guys did in \`Bitbucket Server\`. This would simplify the automation.


Answers:
author: Daniel Santos
body: Hi [@Peisheng Wu](/t5/user/viewprofilepage/user-id/3523536)

Let me share the information I have:
> I am trying to setup a bamboo server onto EC2 with a full automated process. Therefore, I would like to know where are the configuration files for database connection, system administrator credentials, as well as proxy setup.

Bambo does not have a mechanism for unattended configuration. We even have a feature request for that:

* [\[BAM-20221\] Unattended installation for Bamboo](https://jira.atlassian.com/browse/BAM-20221)

Just clarifying where the information you are trying to configure is located:

* **\<Bamboo_Home\>/bamboo.cfg.xml**database connection configuration, license, broker, some paths
* **\<Bamboo_Install\>/conf/server.xml**tomcat connectors, proxy
* **Inside the database**user credentials

> I have run this the docker image locally and discovered that you are using hibernate to config database connection, and some other configs in \`bamboo.cfg.xml\`. I am wondering if hibernate can read database setting from \`properties\` file, which you guys did in \`Bitbucket Server\`. This would simplify the automation.

Not that I'm aware of. What I know you can configure Bamboo as a data source like described here:

* [Tomcat and External MySQL Datasource Example - Atlassian Documentation](https://confluence.atlassian.com/bamboo/tomcat-and-external-mysql-datasource-example-289276819.html)

What I would try is an automated cloning method:

**Create a reference instance as a base for cloning**

* Install an instance from scratch configuring it with the external DB you want
* Stop the instance and take an external DB backup
* Save the Bamboo home main files:  
  * bamboo.cfg.xml
  * xml-data folder

**Install a new instance as a clone of the reference**

* Download the same installer version
* Unpack it
* Configure the Tomcat connectors
* Import (through external tooling) the DB saved as a reference
* Copy the Bamboo home directory
* Adjust the settings as server ID, broker, DB and license etc
* Configure the Bamboo home directory location
* Start the new instance

That is what I have to share in this area. I hope that allows you to move forward.

comments: author: Peisheng Wu
body: [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) Thanks so much for the answer. This does help a lot.

By the way, if I want to use a remote agent, is it possible to configure the agent with the \`clone\` method?


author: Daniel Santos
body: Hi [@Peisheng Wu](/t5/user/viewprofilepage/user-id/3523536)  

You are welcome!

Is a docker valid option?

* <https://hub.docker.com/r/atlassian/bamboo-agent-base/>


author: Peisheng Wu
body: I am trying out with the docker version, but couldn't getting it running together with the server locally. And we have already setup a meeting with your support for this issue and hopefully we can work this out.

Thanks for your help. [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125)


author: Daniel Santos
body: I'm sure you will find out with our team what is missing =\]


Tags: automation

docker