Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Power Off a Cloud Server from the Command Line

This guide shows how to shut down a Linux cloud server using commands. It needs root access.

VPS and Cloud Servers2 min read4 steps

What is a droplet?

"Droplet" is a name some cloud companies use for a small virtual server. A virtual server is a computer that runs inside a bigger one. The command line is a text window where you type instructions. The steps below work on any Linux server, whatever name your provider gives it.

Warning

When the server is off, your website, email and apps stop. Nobody can reach it until you turn it on again. Save your work and take a backup first. Also, many providers need you to power on from their dashboard. Make sure you know how to do that before you shut down.

Steps

  1. Open a terminal on your computer.
  2. Connect to your server with SSH. Use your own address:
ssh root@your-server-ip

This logs you in. Your welcome email may have the address and password.

  1. Run the power off command:
sudo poweroff

This stops all programs and turns the server off in a safe way.

  1. Your SSH window will close. This is normal.

Other commands that do the same job

sudo shutdown -h now
sudo systemctl poweroff

Both shut the server down right away. The first one uses -h to mean halt, and now means do it at once.

Shut down later

sudo shutdown -h +10

This waits ten minutes, then powers off. To cancel it, run:

sudo shutdown -c

Restart instead

sudo reboot

This turns the server off and on again. It does not need a dashboard to come back.

Using your provider's tools

Some providers also have their own command-line tool for power actions. These tools are specific to the provider and need an access token. Ask Hostvento support how power actions work on your service.

Tip: Billing may still run while a server is off, since the space is still kept for you. Check this with your provider.

Quick recap

  • Connect with SSH.
  • Run sudo poweroff or sudo shutdown -h now.
  • Back up first, because everything stops.
  • Know how to power on again before you shut down.