Selfhosted controller change IP address

I’m trying to work out what json to use to change the IP address assigned by ZeroTier to a node. I believe the command should be:
curl -X POST “http://127.0.0.1:9993/controller/network/{networkID}/member/{memberID}” -H “X-ZT1-Auth: $(cat /var/lib/zerotier-one/authtoken.secret)” -H “Content-Type: application/json” -d ‘{“config”: {“ipAssignments”: [“172.20.1.22”]}}’

But this doesn’t seem to do anything. It seems like this should be possible.

That seems right on first glance. Make sure there is a 127.20.1/0/24 Managed Route on the network.

Does it look correct if you GET http://127.0.0.1:9993/controller/network/{networkID}/member/ after the POST?

It just keeps the initial IP address if I do the GET afterwards. There is a 172.20.1.0/24 managed route on the network (assuming I’m working out what I think are typos). I am still on 1.10.1, I’m looking to update the controller (and clients soon), but do you think that would make a difference?

Also, just so I’m sure, updating the controller is just updating the zerotier rpm on the system right?

Thanks.

I remember now. Take out the “config” object:
{"ipAssignments": ["172.20.1.22"]}

config is on the my.zerotier.com api, but not the raw controller api

Hope that helps.

Also, just so I’m sure, updating the controller is just updating the zerotier rpm on the system right?

That’s correct but there have not been any changes to the controller code in a long time.

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