How do I power off a droplet from a command line (to create a snapshot).

Posted August 4, 2013 145.8k views
The text seems to suggest to power off a droplet from the command line to create a snapshot. But it does show how to do it.
1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
16 answers
In Ubuntu:
sudo shutdown -h now
sudo shutdown -h now as Pablo said, or sudo poweroff.

ehm.. silly question but how do we “power on” a droplet? I don’t see no power on button.

You still have to power it off from the Web UI before taking a snapshot. I was not able to take one after shutting it down. I had to explicitly power it off in the web UI
  • Nearly 2 years later, this still happens.
    I had powered off in ssh, but on the snapshot page there was no button to start the snapshot process. Without that button, the text there seems to mean that by powering off (as I had done) a snapshot was already, automatically, being created. That didn’t really make sense, so I searched and found this question page.

    Request to DO:
    on the Snapshot page, please add this information :
    After powering off from within the droplet (sudo shutdown -h now or systemctl poweroff), we have to go to the Power page and power it off there too. (That doesn’t do anything to the droplet in this situation, but it gets the web interface in sync.) Then go back to the Snapshot page and the “Take Snapshot” button will be there.

I used sudo poweroff in terminal, got locked out of SSH, and still had to power off from the web UI. After I powered off from the web UI and took a snapshot, my droplet powered on as soon as the snapshot finished (without me clicking “power on”) and my SSH access was reestablished.

I have some vnc connection problem not allowing me to access my console. Can I power off using the web interface button [POWER OFF] instead?
Yes, but the consensus is that it should be used as a last resort. Are you able to access your droplet via SSH?
Is there a sync between the machine status and the online app?
i switched off from command line but on the console i keep seeing that it's Active.
However, ssh fails.

PS: how do i turn it on?
@stefano.tranquillini: It rarely gets out of sync but if that does happen please open up a support ticket.
Previous 1 2 Next