Skip to main content
Learn how to publish your repositories to the Runpod Hub, including how to configure your repository with the required hub.json and tests.json files. After you publish your repository to the Hub, you can start earning revenue from your users’ compute usage.

How to publish your repo

Follow these steps to add your repository to the Hub:
  1. Navigate to the Hub page in the Runpod console.
  2. Under Add your repo click Get Started.
  3. Enter your GitHub repo URL.
  4. Follow the UI steps to add your repo to the Hub.
The Hub page will guide you through the following steps:
  1. Create your hub.json and tests.json files.
  2. Ensure your repository contains a handler.py, Dockerfile, and README.md file (in either the .runpod or root directory).
  3. Create a new GitHub release (the Hub indexes releases, not commits).
  4. (Optional) Add a Runpod Hub badge into your GitHub README.md file, so that users can instantly deploy your repo from GitHub.
After all the necessary files are in place and a release has been created, your repo will be marked “Pending” during building/testing. After testing is complete, the Runpod team will manually review the repo for publication.

Update a repo

To update your repo on the Hub, just create a new GitHub release, and the Hub listing will be automatically indexed and built (usually within an hour).

Required files

Aside from a working Serverless implementation, every Hub repo requires two additional configuration files:
  1. hub.json - Defines metadata and deployment settings for your repo.
  2. tests.json - Specifies how to test your repo.
These files should be placed in the .runpod directory at the root of your repository. This directory takes precedence over the root directory, allowing you to override common files like Dockerfile and README.md specifically for the Hub.

hub.json reference

The hub.json file defines how your listing appears and functions in the Hub. You can build your hub.json from scratch, or use this template as a starting point.

General metadata

Runpod configuration

Environment variables

Environment variables can be defined in several ways:
  1. Static variables: Direct value assignment. For example:
  2. String inputs: User-entered text fields. For example:
  3. Hugging Face inputs: Fields for model selection from Hugging Face Hub. For example:
  4. Option inputs: User selected option fields. For example:
  5. Number Inputs: User-entered numeric fields. For example:
  6. Boolean Inputs: User-toggled boolean fields. For example:
Advanced options will be hidden by default. Hide an option by setting: "advanced": true .

Presets

Presets allow you to define groups of default environment variable values. When a user deploys your repo, they’ll be offered a dropdown menu with any preset options you’ve defined. Here are some example presets:

hub.json template

Here’s an example hub.json file that you can use as a starting point:
hub.json

tests.json reference

The tests.json file defines test cases to validate your tool’s functionality. Tests are executed during the build step after a release has been created. A test is considered valid by the Hub if the endpoint returns a 200 response. You can build your tests.json from scratch, or use this template as a starting point.

Test cases

Each test case should include:

Test environment configuration

tests.json template

Here’s an example tests.json file that you can use as a starting point:
tests.json