Here are some best free command line software to manage DigitalOcean servers. These tools allow you to connect to your DigitalOcean account and then carry out some tasks. Using these tools, you can query droplets, create droplets, see status of droplets, create SSH keys, create snapshots, list available droplets sizes, list available regions, manage tags, manage floating IPs, and many others. You can do all these operations right from the command prompt or the terminal. And to connect to your DigitalOcean account, you only need an access token that you can get from your dashboard.
If you have some droplets created on DigitalOcean account and want to manage them then you can use the following tools. You can do a lot of operations by just executing simple commands. And then tools that I have mentioned below work on all platforms in the same way.
In case you don’t know about DigitalOcean then don’t worry. DigitalOcean is cloud VPS hosting service which is cheaper than a lot of other services of its kind (nearly $0.007 per hour). Here you can host your projects or even a whole website on secure and fast servers. It uses the term “droplets” for a server. And a server is basically a virtual machine running an OS in it and some application files that you have installed on that. You can create as many droplets as you want and control them in the way you want.
Free Command Line Tools to Manage DigitalOcean Server:
Dotcl is an officially accepted command line tool to manage DigitalOcean account. It allows you to connect to your DigitalOcean account with the help of an access token and lets you perform various operations. You can manage your account like pro by just running some commands. It allows you to manage the droplets, their creation and deletion along with many other options. You can use this tool to list all the droplets from your account, see status of the droplets, display account information, manage floating IPs, list available droplet sizes, create and manage snapshots, manage tags and certain others parameters. All these operations can be done right from the command prompt or the terminal.
Dotcl is an open source and cross-platform tool as well. Its source code is openly available on GitHub. If you want, you can have a look on it using the above link. To run it, all you need is Node.js on your PC. After that, you can install it in one click and then you can run it anytime. There are different commands for each operation. And the below steps will help you understand how to use this.
Step 1: Open a command prompt and then type this command to install it. Make sure that before installing it, you have installed Node.js. If not, then you can get it from here.
npm install -g doclt
Step 2: After the installation, you can start using it. But first, you have to add the access token. For authorizing an access token, you can run a command like this.
doclt token "YOUR TOKEN HERE"
Step 3: Now, you can start doing whatever you want. There is a list of all the commands that it supports on its GitHub page. And you can also see them by running “dotcl –help” in the command prompt. For example, if you want to see the status of droplets, then run this command.
doclt droplets list
To list image types, you can run this command.
doclt images list --distribution
Above you can see the output from my DigitalOcean account. You can run other commands like this and manage your account right from the terminal.
Python-digitalocean is another free command line tool that you can use to manage your DigitalOcean account. Just like the tool above, you can use it to manage a lot of aspects of your DigitalOcean account. You can use this tool to get user’s droplets, perform snapshot, create a droplet, resize a droplet, remove a droplet, shutdown or reboot a droplet, restore root password, get public images, get droplet event status and much more. You can do all this by executing a simple code snippet. And this tool is built on top of Python, so to run it, you will have to make sure that Python is installed on your PC.
To manage your DigitalOcean account, use these steps.
Step 1: Open command prompt with admin rights and then run this command. This will install “Python-digitalocean” in your PC and then you can start using it.
pip install -U python-digitalocean
Step 2: Now, to run this tool, you have to create a code snippet and run it. For example, to get the status of droplets from your account, paste this code in a file.
manager = digitalocean.Manager(token="YourAccessToken")
my_droplets = manager.get_all_droplets()
Replace the “YourAccessToken” with yours. After that, adding this code in the text file, you can save it as “test.py” file.
Step 3: Now, open terminal in the same directory where you have saved the file. After that, run it like this.
Above you can see that it has listed all droplets. Since, there is only one droplet, so it shows one droplet in the output. You can do other tasks like this. There are pre-ready code snippets are available on its GitHub page. You just have to copy them and then run them to see the output.
These are the best free command line software that I could find to manage your DigitalOcean server. You can use any tool from the above list. And if you have some knowledge of programming, then you can modify these tools according to your needs.