Skip to content

Changing the IP of a lightsail instance after installing it #14124

Answered by davidemyers
paulwellnerbou asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately the Lightsail API does not provide Ansible the ability to assign a static IP address during instance creation.

Using the local provider is what I imagine most people do, just remember to open the necessary ports in the firewall. When creating the instance look for the option Change SSH key pair and use your own key.

It should be relatively easy to change the IP address after the fact with WireGuard, but I think it's impossible to do that with IPsec, which sounds like what you've encountered. If you don't need IPsec you can try to deploy with ipsec_enabled: false in config.cfg and maybe ./algo update-users would work.

Another approach to to modify the Lightsail code to insert…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@paulwellnerbou
Comment options

@ahmed2m
Comment options

@davidemyers
Comment options

@ahmed2m
Comment options

@davidemyers
Comment options

Answer selected by paulwellnerbou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants