News:

SMF - Just Installed!

Main Menu

Vultr Marketplace

Started by Suhitha, Sep 23, 2025, 04:08 AM

Previous topic - Next topic

Suhitha

Question: Vultr Marketplace

A comprehensive platform where vendors can publish and distribute their custom applications on Vultr's infrastructure with controlled deployment options.

Vultr Marketplace is a platform for vendors to publish custom applications on Vultr's infrastructure. As a vendor, you can control the OS, application software, and post-deployment scripts. Vultr Marketplace also allows vendors to create a custom landing page, publish your support information, upload screenshots and icons, configure application variables and more.

Please apply to become a verified Marketplace Vendor, if you would like to publish your app in the Vultr Marketplace.


Create a Vendor Account

Vendor accounts allow development teams with established product to join Vultr's Image Marketplace.

1.Create a vendor account and set your contact information.

2.Click the [color=blue]Marketplace icon[/color] at the bottom of the customer portal's left-hand menu.

3.Click Get Started Now.

4.Agree to the Marketplace Publisher Agreement.

5.Enter your Vendor Username.

6.Click the Vendor Settings tab.

7.Enter your Vendor contact information. All fields are optional.

8.Click Update Contact Information.


Create an Application Profile


An application profile helps vendors provide information about the application such as the name, operating system, and a short description.

[list]
[li]Click the [color=blue]Create New App[/color] tab to create a Marketplace app, then fill in the data fields to describe your app.[/li]
[/list]

[center][list]
[li]App Name is the short name of your application.[/li]
[li]Support URL is a link to your support web page.[/li]
[li]Support Email is an address customers can use to contact you for help.[/li]
[li]Operating System should include the distribution and version number.[/li]
[li]Description is a one-line description of your application.[/li]
[li]App Name ID Format is automatically generated from your App Name. You should not need to change it.[/li]
[li]Leave the Repo URL field blank; it's unused.[/li]
[/list]
[/center]

[b][size=5]Readme[/size][/b]

The Readme information is visible to the public on your app's marketing page in the General Information tab, [color=blue]like this example for Minecraft[/color]. You should supply the introduction and marketing information here in Markdown format. You can [b]upload images[/b] with copy/paste, drag-and-drop, or the upload image icon in the toolbar.

Uploading images through the editor stores them in Vultr Object Storage. For security reasons, if you link to outside images, they will not be displayed. Please upload your images through the editor to store them on Vultr's servers.

See our [color=blue]Markdown formatting tips for the Readme and App Instructions.
[/color]
Click the [b]Add App[/b] button, and you'll return to the Marketplace Applications list.


Update the General Information


General information helps vendors to set the applications icons, select the application category and add a Readme for the application.

1.Click the application name to open the [b]General Information[/b] tab of the [b]Edit App[/b] screen.

2.Upload the image icons.

3.Select the application categories.

4.If you didn't enter a Readme in the previous step, you could update it here. See our [color=blue]Markdown formatting tips for the Readme and App Instructions.
[/color]
5.Click the [b]Update App[/b] button at the bottom of the screen.

Update the Support Contact

Vendors can provide support information like support email, support URL, website URL, and links of their social handles for their app.

1.Click the [b]Support Information [/b]tab.

2.Enter the contact information and click [b]Update App Support Info[/b]. All information is optional.


(Optional) Create Application Variables

When a customer deploys your Marketplace application, you can request information and capture those values as variables. These variables can be displayed in the application instructions and are available to your application through the Vultr Metadata API. Using application variables allows you to tailor each deployment with user-supplied information, such as a domain name or a preferred username.
[list]
[li]To learn how to display variables in the application instructions, see Create the Application Instructions section.[/li]
[li][/li]
[li]To learn how to use these variables in your deployment scripts, see Create Provisioning Scripts.[/li]
[/list]

[b]
[size=5]User-supplied Variable[/size]
[/b]
   1.Click the Variables tab.

   2.Select User Supplied type.
 
   3.Enter the required information.

[list]
[li][center][b]Label[/b]: This is visible to the public. On public landing pages, there isn't a value available for the variable, so we show this label in its place. You may enter up to 255 characters.[/li]
[li][/li]
[li][b]Name[/b]: The variable name has a max length of 15 characters and must use Snake Case. Only lower-case and underscores are allowed.[/li]
[li][/li]
[li][b]Input Type[/b]: Choose Text Field or Textarea.[/li]
[li][/li]
[li][b]Required[/b]: Select if the variable is required.[/li]
[li][/center][/li]
[/list]
   4.After entering your variable information, click Add New Variable.


[b][size=5]Password Variables[/size][/b]

[code]Similar to user-supplied variables, you can also create one or more uniquely generated passwords at each deployment with password variables. The system generates these automatically, and the user is not prompted to supply the value. Like user-supplied variables, you can show these in your application instructions and use them in deployment scripts.

1.Click the Variables tab.

2.Select Password type.

3.Enter the required information.

[list]
[li][center][b]Label[/b]: This is visible to the public. On public landing pages, there isn't a value available for the variable, so we show this label in its place. You may enter up to 255 characters.[/li]
[li][b]Name[/b]: The variable name has a max length of 15 characters and must use Snake Case. Only lower-case and underscores are allowed.[/li]
[li][b]Length:[/b] The password length must be between 6 and 50 characters.[/li]
[li][/center][/li]
[/list]
4.After entering your variable information, click Add New Variable.

Create the Application Instructions

After a customer deploys the app, they'll be shown the application instructions, which should have the technical "getting started" steps and the application variables you defined.

Note
This should not be confused with the Readme, which has general information for the application landing page. However, if you do not add application instructions, we will use your Readme, so the customer does not have blank information when deploying an app.

1.Click the App Instructions tab.

2.Enter the customer instructions for your application in Markdown format.

3.If you created application variables, display those values here by placing them in backticks and double braces.

Variables are expanded when placed in double braces. Backticks are required for password variables to prevent special characters from being interpreted incorrectly as Markdown. For example, if your variable is named web_password, you can display the variable in your instructions like this:

`{{web_password}}`
In addition, you can display two standard variables, which always exist and do not need to be pre-defined:

{{ip}} is the primary IPv4 for the instance.
{{root_password}} is the root password.
The {{ip}} variable is a special case. It does not need to be guarded with backticks because IP addresses do not contain any characters that are interpreted as Markdown.

Here's an example instruction page that demonstrates correct Markdown formatting:

# Example Application

Your application is ready!

* Your server's IP address is: `{{ip}}`.
* The root password is: `{{root_password}}`.

Connect to your web server at [**https://{{ip}}/**](https://{{ip}}/).

* Your webserver username is: **demo**.
* Your webserver password is: `{{web_pass}}`.

The MySQL root password is: `{{db_pass}}`.
In addition to basic login and password information, you can upload images and provide hyperlinks to other resources.[/code]


Upload Artwork

Vendors can upload application screenshots and featured images to display on the application landing page. They can also upload multiple images to the gallery and choose one image as the main image.

  • Gallery images should be an 8:5 ratio.
  • The preferred size is 800x500 pixels.
  • The file format should be JPG, GIF, or PNG.

1.Click the Gallery tab.

2.Click the Upload Graphic button and choose an image to upload.

After a successful upload, you'll see an image thumbnail in the Gallery tab.

The thumbnail has two control buttons: Set as main and Delete.

[list]
[li][b]Set as main:[/b] You should choose one gallery image as the Main image for the public landing page. Click the Set as main button to make the selection.[/li]
[li][b][/li]
[li]Delete:[/b] Click the trashcan icon to delete the gallery image. Deletion is permanent. Deleted gallery images can not be recovered.[/li]
[li][/li]
[/list]

Create Provisioning Scripts

Create your provisioning scripts. If you defined any application variables, you'd implement them here.

When a customer deploys your application, it's often useful to generate random passwords and provide them to both the application and the customer. The Marketplace provides this function through Application Variables.
[b]
[size=5]Variable Names[/size][/b]

Variable names are used in multiple places:

[list]
[li]The Edit App Variables screen.[/li]
[li][/li]
[li]The Metadata API endpoint.[/li]
[li][/li]
[li]The customer's Application Instructions.[/li]
[li][/li]
[li]Your cloud-init provisioning scripts.[/li]
[li][/li]
[/list]

[b][size=5]Provisioning Scripts and the Metadata API[/size][/b]

The per-instance cloud-init script is a popular place to use these variables because it only runs once when the instance is first deployed. For example, create two variables in the Marketplace Portal:

demo_password : A password for a user named [b]demo.[/b]
web_password : A password for a web server's basic authentication.
You can discover their values in your startup script through the Vultr Metadata API. The API endpoint is formed from the variable name in the format http://169.254.169.254/v1/internal/app-{variable_name}x. For example, a variable named demo_password is requested from the endpoint:

http://169.254.169.254/v1/internal/app-demo_password
When making requests, you must pass METADATA-TOKEN: vultr in the request header. Here's a curl example:

curl -H "METADATA-TOKEN: vultr" http://169.254.169.254/v1/internal/app-demo_password
Likewise, to request a variable named web_password:

curl -H "METADATA-TOKEN: vultr" http://169.254.169.254/v1/internal/app-web_password
Here's a simple example that creates a demo user and reports the web password. Create a /var/lib/cloud/scripts/per-instance/provision.sh cloud-init script.

console


# nano /var/lib/cloud/scripts/per-instance/provision.sh


Paste the following:

bash


#!/bin/bash
## Runs once-and-only-once at first boot per instance.
echo $(date -u) ": System provisioned." >> /var/log/per-instance.log

## Capture Marketplace Password Variables
DEMO_PASSWORD=$(curl -H "METADATA-TOKEN: vultr" http://169.254.169.254/v1/internal/app-demo_password)
WEB_PASSWORD=$(curl -H "METADATA-TOKEN: vultr" http://169.254.169.254/v1/internal/app-web_password)

## Create user
adduser demo --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
## Set Password
echo demo:$DEMO_PASSWORD | chpasswd

## Report the Web Password
echo "The Web password is: $WEB_PASSWORD" > /root/web-password.txt


Make the script executable.

console


# chmod +x /var/lib/cloud/scripts/per-instance/provision.sh


This example creates a user account named demo with the unique password generated by the Marketplace variable demo_password. It also writes a file to /root/web-password.txt with the value of web_password.

In a real application, you might pass the values to a database or set HTTP Authentication on your web server.

Here's another example. Add the following to your /var/lib/cloud/scripts/per-instance/provision.sh script.

bash


## Capture the Marketplace Password Variable.
DB_PASS=$(curl -H "METADATA-TOKEN: vultr" http://169.254.169.254/v1/internal/app-db_pass)

## Create an example database.
mysql -u root -e "CREATE DATABASE example_db;";

## Create an example user and set the password to Marketplace Password Variable $DB_PASS.
mysql -u root -e "GRANT ALL ON example_db.* TO 'example_user'@'localhost' IDENTIFIED BY '$DB_PASS' WITH GRANT OPTION;";


Assuming you declared a variable named db_pass on the Edit App Variables screen, this script creates an example database user with a random password. The password is available to you in the Metadata API, and it's shown to the customer on the application instructions page.

[b]
[size=5]Blocking SSH During Provisioning[/size]
[/b]
It's a best practice to disable SSH while your provisioning scripts run, then re-enable SSH when finished, particularly if they require a long time to complete. A user who logs in via SSH while your provisioning script is running could cause unexpected side effects. We recommend disabling the SSH service entirely while your script runs. If this is not possible, please consider blocking access with the OS firewall. The final step in the provisioning script should enable SSH if your application allows SSH access for customers.


Build App Image

You can build a Marketplace app image from an existing snapshot or use cloud-init Vendor Data to create an "imageless" app.

  • Building from a snapshot means you'll pre-install your application on a server, set up some post-deployment scripts, and then take a snapshot of the disk image. When customers deploy your app, they'll deploy your snapshot, and then cloud-init will run your scripts.
  • When you build from Vendor Data, you won't create a snapshot at all. Customers that deploy your app start with a clean operating system, and then the Vendor Data script does everything required to deliver a working application.

For repeatability and ease of maintenance, we recommend building imageless apps from Vendor Data whenever possible.

[b][size=5]How to Build an Imageless App from Vendor Data[/size][/b]

1.Navigate to the Builds tab for your marketplace app.
2.Click the Build from Vendor Data button.
3.Select a base operating system for your app.
4.Enter your Vendor Data.
5.Click Build App Image.

After you've built the image, you can edit the Vendor Data script by selecting the actions menu and choosing Edit. Learn more about how to use Vendor Data scripts at cloudinit.readthedocs.io.


[b][size=5]How to Build From a Snapshot[/size][/b]

[list]
[li]If you are building your Marketplace app from a snapshot, we strongly suggest optimizing the server first. Some steps to consider are:[/li]
[li][/li]
[li]It's recommended to design your app for the marketplace-2c-2gb plan, which is specifically optimized for Marketplace applications. This plan includes 2 vCPUs, 2 GB of memory, and 8 GB of storage.[/li]
[li][/li]
[li]Remove old logs and temporary files.[/li]
[li][/li]
[li]Uninstall unneeded software.[/li]
[li][/li]
[li]Overwrite free disk sectors with zeros. This allows significant compression and makes customer deployment much faster.[/li]
[li][/li]
[/list]
You should adapt the suggested code snippets that follow based on your needs and your OS distribution. These steps are also available as an example shell script in our GitHub repository.

[b]Verify /tmp[/b]

Verify the /tmp directory exists and has the proper permissions.

console


# mkdir /tmp
# chmod 1777 /tmp


[b][size=5]Update the Server[/size][/b]

For yum-based distributions:

console


# yum update -y
# yum clean all


For apt-based distributions:

console

Copy
# apt-get -y update
# apt-get -y upgrade
# apt-get -y autoremove
# apt-get -y autoclean


[b][size=5]Clean Temporary Files[/size][/b]

Clean the temporary directories.

console


# rm -rf /tmp/*
# rm -rf /var/tmp/*


Clean SSH Keys.

console


# rm -f /root/.ssh/authorized_keys /etc/ssh/*key*
# touch /etc/ssh/revoked_keys
# chmod 600 /etc/ssh/revoked_keys


Clean the logs.

console


# find /var/log -mtime -1 -type f -exec truncate -s 0 {} \;
# rm -rf /var/log/*.gz
# rm -rf /var/log/*.[0-9]
# rm -rf /var/log/*-????????
# echo "" >/var/log/auth.log



Clean old cloud-init information.

console


# rm -rf /var/lib/cloud/instances/*


Clean the session history.

console


# history -c
# cat /dev/null > /root/.bash_history
# unset HISTFILE


[b][size=5]Update mlocate[/size][/b]

Update the mlocate database.

console


# /usr/bin/updatedb


[b][size=5]Wipe Random Seed[/size][/b]

Wipe the random seed file.

console


# rm -f /var/lib/systemd/random-seed


[b][size=5]Wipe Machine ID[/size][/b]

Distributions that use systemd should wipe the machine identifier to prevent boot problems.

console


# rm -f /etc/machine-id
# touch /etc/machine-id


[b][size=5]Clear login History[/size][/b]

Clear the login log history.

console


# cat /dev/null > /var/log/lastlog
# cat /dev/null > /var/log/wtmp


[b][size=5]Wipe Free Space[/size][/b]

Wipe unused disk space with zeros for security and compression.

console


# dd if=/dev/zero of=/zerofile
# sync
# rm /zerofile
# sync

[b]
[size=5]Discard Unused Filesystem Blocks[/size]
[/b]
Not all Linux distributions support fstrim, but you may consider running this final step before making the snapshot.

console


# fstrim /


[b][size=5]Halt and Power Down[/size][/b]

Vultr can snapshot a running server, but you may prefer a clean shutdown. If so, consider halting and powering off the server before taking the snapshot.

console


# shutdown -h now


To power off:

   1.Click your server name in the customer portal to open the server information page.
   2.Click the Server Stop button in the upper left.


[b][size=5]Make the Snapshot[/size][/b]

1.Navigate to the Add Snapshot page in the Vultr Customer Portal.

2.Select your instance in the dropdown.

3.Enter a descriptive label

4.Click Take Snapshot. Wait a few minutes for the snapshot to complete.

5.Click the Builds tab.

6.Select the snapshot image you just created.

7.Click Build App Image. The Vultr Marketplace takes your snapshot and builds it into an App Image.