How can I deploy 1-Click Apps from the CLI?

Linode Staff

Is there any way to create a One-Click OpenVPN App from the Linode CLI?

I see the list here, but there are only default distributions and no Open VPN listed here ->

Please let me know if it's possible.

1 Reply

It is indeed possible to deploy a 1-Click OpenVPN App from the Linode CLI along with any of our other 1-Click Apps. I see you linked to our old deprecated guide for our V3 API, here is the updated guide for our new V4 API.

First, our 1-Click Apps are all StackScripts. So you can get a full list of possible StackScripts to deploy by using this command:

linode-cli stackscripts list

This will bring up a rather large list, but there are a few methods you can use to sort through them to find just our One-Click Apps.

The first is to grep for the string you wish to find, in this case we can use OpenVPN as an example. The one caveat to this method is you have to search through all the pages individually. I was unable to find a method that searched through all 13 pages at once. I found the OpenVPN listed on page 13, so the command to list this One-Click App would be as follows:

linode-cli stackscripts list --page 13 | grep "Click"

This returns the following information and includes the distributions used:

│ 401719 │ linode │ OpenVPN - Latest One-Click │ linode/debian9
│ 401701 │ linode │ LAMP One-Click │ linode/debian9
│ 401697 │ linode │ WordPress - Latest One-Click │ linode/debian9

If you know the exact name of the App you wish to install you can also query just for that App using this command:

linode-cli stackscripts list --label "OpenVPN - Latest One-Click"

Which then outputs the following:

|id      │ username │ label                      │ images         |
│ 401719 │ linode   │ OpenVPN - Latest One-Click │ linode/debian9 │ 

I trimmed the output a bit to make it more readable, but when you run the command you will also have the creation and update date of the StackScript and whether or not the StackScript is public. All of our One-Click Apps are public so everyone can use them.

Now this is a bit of a time consuming method, so I dug a bit more. This next way will require installation of a tool called jq. Jq is a lightweight and flexible command-line JSON processor. Instructions to download can be found here on their site.

Once installed you can run this query which will list all of our StackScripts that contain the label "One-Click":

curl -k -H ‘X-Filter: {“label”: {“+contains”: “One-Click”}}’ -H “Content-Type: application/json” | jq ‘.data | .[] | .label,.id’

Which will return at this time a result like this:

"Linux GSM One-Click Helpers"
"One-Click Helpers"
"Ark - Latest One-Click"
"TF2 - Latest One-Click"
"Terraria - Latest One-Click"
"CS:GO - Latest One-Click"
"Rust - Latest One-Click"
"MERN One-Click"
"Drupal - Latest One-Click"
"GitLab - Latest One-Click"
"WooCommerce - Latest One-Click"
"WireGuard - Latest One-Click"
"Minecraft - Latest One-Click"
"OpenVPN - Latest One-Click"
"LAMP One-Click"
"WordPress - Latest One-Click"

This shows a full list of the One-Click apps available along with their ID's. Now since we want to install the OpenVPN app, we merely take the ID number from this list '401719' and pop it into our CLI command. This next portion will change depending on what app you want. Since we are working on OpenVPN currently this will be the bare minimum of information you need to provide. You can then use our API to specify a variety of different arguements, including data center location or Linode size. Our API documentation provides a thorough explanation of all the configuration options available.

linode-cli linodes create \
> --stackscript_id 401719 \
> --root_pass Password \
> --stackscript_data '{"vpnuser_password": "password"}'

For both the password segments, you will want to replace my complex passwords with something much more secure. But, after running this you will have a Linode with OpenVPN installed!

There is a lot of fine tuning that can be done or added, but this should provide a good starting point for deploying our One-Click Apps with the Linode CLI.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct