# precofnig all nodes without interaction ?

**URL:** https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663
**Category:** Support
**Created:** [July 5, 2022, 6:07am UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663 "2022-07-05T06:07:58Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![chchang](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chchang/32/12343_2.png) [@chchang](https://forum.syncthing.net/u/chchang)
#### Post date: [July 5, 2022, 6:07am UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/1 "2022-07-05T06:07:58Z")

</div>

I’m planning to deploy one master node which holds all datas for other nodes , and maybe dozens of nodes.

in master nodes , the structure will be something like

```nohighlight
node_a
  - data_exchange ( sync between master node and node_a)
  - readme ( only send from master to node_a )

node_b
  - data_exchange ( sync between master node and node_b)
  - readme ( only send from master to node_b ) 
...
...
...

```

my questins here is that can I preconfig for all nodes and deliver config.xml to each nodes ? so that I can configure syncthing without interaction ( maybe with ansible/chef) , and don’t need user to confirm to create folders/add nodes or any other things that needs users to involve.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [July 5, 2022, 6:20am UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/2 "2022-07-05T06:20:39Z")

</div>

Yes, but you also need to generate the certificates so you can populate the device IDs. You can use `syncthing generate` for this.

---

<div class="post-metadata">

### Author: ![chchang](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chchang/32/12343_2.png) [@chchang](https://forum.syncthing.net/u/chchang)
#### Post date: [July 5, 2022, 9:56am UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/3 "2022-07-05T09:56:13Z")

</div>

> > Yes, but you also need to generate the certificates so you can populate the device IDs

I have valid wildcard certificate files , is that ok to replace the original certificates ?

and would you please recommend some documents to generate config for nodes ? I braely find any documents about this in [https://docs.syncthing.net/](https://docs.syncthing.net/)

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [July 5, 2022, 11:49am UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/4 "2022-07-05T11:49:06Z")

</div>

No, wildcards will not work. This is intended to cover it:

[https://docs.syncthing.net/users/config.html](https://docs.syncthing.net/users/config.html)

---

<div class="post-metadata">

### Author: ![chchang](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chchang/32/12343_2.png) [@chchang](https://forum.syncthing.net/u/chchang)
#### Post date: [July 5, 2022, 2:52pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/5 "2022-07-05T14:52:11Z")

</div>

Would you please make a example to create a 3 nodes in automation? Maybe it’s worth to add in some documents, I think it’s really useful to deploy configurations from HQ to branch office with full automated. Or I have to talk to someone in branch office and told him how to accept the add node request in browser, with dozens of nodes, its really a lousy job!

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [July 5, 2022, 2:54pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/6 "2022-07-05T14:54:16Z")

</div>

I expect that the process differs between automation systems. You’re very welcome to post an update to the docs with an example when you’ve implemented it.

---

<div class="post-metadata">

### Author: ![chchang](https://forum.syncthing.net/user_avatar/forum.syncthing.net/chchang/32/12343_2.png) [@chchang](https://forum.syncthing.net/u/chchang)
#### Post date: [July 5, 2022, 3:22pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/7 "2022-07-05T15:22:58Z")

</div>

Ok so here is my problem to do the automation, how do I get the remote device if before I really install syncthing on the device?

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [July 5, 2022, 3:27pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/8 "2022-07-05T15:27:32Z")

</div>

You use `syncthing generate` from your automation, like I suggested above.

---

<div class="post-metadata">

### Author: ![acolomb](https://forum.syncthing.net/user_avatar/forum.syncthing.net/acolomb/32/11343_2.png) [@acolomb](https://forum.syncthing.net/u/acolomb)
#### Post date: [July 5, 2022, 4:39pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/9 "2022-07-05T16:39:02Z")

</div>

Probably `syncthing generate --home node_x` for each node you want to prepare. Then possibly touch up the config.xml file as needed and then pack the whole directory and deliver it to the remote in the right location.

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [August 4, 2022, 4:39pm UTC](https://forum.syncthing.net/t/precofnig-all-nodes-without-interaction/18663/10 "2022-08-04T16:39:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
