Curl command scripting for registering hosts


We are trying to set up foreman so that new machines deployed within our cloud solution can automatically check in with Foreman upon first boot. my question is, the curl command that is generated upon registering a host, does that expire or is it a one time use?

can that be included in a one time start up script to register with foreman?

it’s up to you - you can set the expiration time from 1 hour to 999 999 hours or you can set unlimited expiration.

But be careful - deleting user that generated the token will also invalidate the token.

1 Like

What setting do i change for the expiration time? i have tried setting installation token to 999999 but it is still expiring.

Just set it to unlimited.

That’s weird, it works fine for me.
The expiration of JWT token is not something done by us but it’s functionality of jwt gem, and they don’t have any issues reported for expiring tokens.