Cloudsmith Documentation/Help Hub

Welcome to the Cloudsmith Documentation/Help Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Debian Repository

Cloudsmith provides public & private repositories for Debian packages

For more information on Debian, please see:

Contextual Documentation

The examples in this document are generic. Cloudsmith provides contextual setup instructions within each repository, complete with copy n' paste snippets (with your namespace/repo pre-configured).

In the following examples:

Identifier

Description

OWNER

Your Cloudsmith account name or organisation name (namespace)

REPOSITORY

Your Cloudsmith Repository name (also called "slug")

DISTRO

Your distribution (i.e debian, ubuntu). You can also use "any-distro" if your package is compatible with more than more distribution

VERSION

Your version name (i.e xenial, buster). You can also use "any-version" if your package is compatible with more than more version

FINGERPRINT

The 8 Byte fingerprint of the Public GPG key for the repository

TOKEN

Your Cloudsmith Entitlement Token (see Entitlements for more details)

USERNAME

Your Cloudsmith username

PASSWORD

Your Cloudsmith password

API-KEY

Your Cloudsmith API Key

PACKAGE_NAME

The name of your package

PACKAGE_VERSION

The version number of your package

PACKAGE_ARCH

The architecture of your package (i.e x86_64)

SOURCES_FILENAME

The filename of the Debian sources, for a Debian source (.dsc) package.

Upload a Package

You can upload either source packages (.dsc) or binary packages (.deb)

To upload a binary package, you will need to generate your package first. We highly recommend fpm for simplifying this. With fpm, you can build a package from a directory that represents the layout on the target system installation using:

fpm -f -s dir -t deb -n PACKAGE_NAME -v PACKAGE_VERSION .

Upload via the Cloudsmith CLI

For full details of how to install and setup the Cloudsmith CLI, see Command Line Interface.

Binary Packages
The command to upload a Debian binary package via the Cloudsmith CLI is:

cloudsmith push deb OWNER/REPOSITORY/DISTRO/VERSION PACKAGE_NAME-PACKAGE_VERSION.PACKAGE_ARCH.deb

Example: Upload a binary package for Ubuntu Xenial

cloudsmith push deb org/repo/ubuntu/xenial libxml2-2.9.4-2.x86_64.deb

Example: Upload a binary package for any version of Ubuntu

cloudsmith push deb org/repo/ubuntu/any-version libxml2-2.9.4-2.x86_64.deb

Example: Upload a binary package for any version of any distribution

cloudsmith push deb org/repo/any-distro/any-version libxml2-2.9.4-2.x86_64.deb

Source Packages
A source package is one that provides you with all of the necessary files to compile or otherwise, build the desired piece of software. In other words, you can get the sources used to create a binary package, and compile them yourself; perhaps to customise the package, or build it for a different operating environment.

When uploading a DSC package, the following files are involved:

  • The DSC package file is a metadata file that describes the other sources/changes files. (Required)
  • The sources file contains the actual source files used to build the software. (Required)
  • The changes file usually contains the patch applied, or to be applied, to the sources file if different from the original. (Optional)

The command to upload a Debian source package via the Cloudsmith CLI is:

cloudsmith push deb OWNER/REPOSITORY/DISTRO/VERSION PACKAGE_NAME-PACKAGE_VERSION.PACKAGE_ARCH.dsc --sources-file SOURCES_FILENAME

Example: Upload a source package for Ubuntu Xenial

cloudsmith push deb org/repo/ubuntu/xenial mypackage-1.1.2-2.x86_64.src --sources-file mypackage-1.1.2-2.x86_64.tar.xz

Example: Upload a source package for any version of Ubuntu

cloudsmith push deb org/repo/ubuntu/any-version mypackage-1.1.2-2.x86_64.src --sources-file mypackage-1.1.2-2.x86_64.tar.xz

Example: Upload a source package for any version of any distribution

cloudsmith push deb org/repo/any-distro/any-version mypackage-1.1.2-2.x86_64.src --sources-file mypackage-1.1.2-2.x86_64.tar.xz

Upload via Cloudsmith Website

Please see Upload a Package for details of how to upload via the Website UI.


Download / Install a Package

Setup

You have a choice of 3 methods to setup your Cloudsmith repository:

  • Automatic configuration (recommended)
  • Force a specific distribution/release (if your system is compatible but not identical)
  • Manual configuration

Public Repositories

To install Debian packages from a public Cloudsmith repository, you can quickly set up the repository automatically:

curl -1sLf \
  'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo bash

If you need to force a specific distribution:

curl -1sLf \
  'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo distro=DISTRO codename=VERSION bash

Or, you can manually configure the repository

apt-get install -y debian-keyring  # debian only
apt-get install -y debian-archive-keyring  # debian only
apt-get install -y apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key' | apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/public/OWNER/REPOSITORY/cfg/setup/config.deb.txt?distro=DISTRO&codename=VERSION' > /etc/apt/sources.list.d/OWNER-REPOSITORY.list

Private Repositories

πŸ“˜

Private Cloudsmith repositories require authentication. You can choose between two types of authentication, Entitlement Token Authentication or HTTP Basic Authentication.

The setup method will differ depending on what authentication type you choose to use.

The setup method will differ depending on what authentication type you choose to use.

To install Debian packages from a private Cloudsmith repository, you can quickly set up the repository automatically:

curl -1sLf 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
| sudo bash
sudo apk add --no-cache bash
curl -u "USERNAME:PASSWORD" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo bash
sudo apk add --no-cache bash
curl -u "USERNAME:API-KEY" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo bash
sudo apk add --no-cache bash
curl -u "token:TOKEN" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo bash

If you need to force a specific distribution:

curl -1sLf 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
| sudo distro=DISTRO codename=VERSION bash
curl -u "USERNAME:PASSWORD" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo distro=DISTRO codename=VERSION bash
curl -u "USERNAME:API-KEY" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo distro=DISTRO codename=VERSION bash
curl -u "token:TOKEN" -1sLf \
  'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/bash.deb.sh' \
  | sudo distro=DISTRO codename=VERSION bash

Or, you can manually configure the repository:

apt-get install -y debian-keyring  # debian only
apt-get install -y debian-archive-keyring  # debian only
apt-get install -y apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key'  | apt-key add -
curl -1sLf 'https://dl.cloudsmith.io/TOKEN/OWNER/REPOSITORY/cfg/setup/config.deb.txt?distro=DISTRO&codename=VERSION'> /etc/apt/sources.list.d/OWNER-REPOSITORY.list
apt-get update
apt-get install -y debian-keyring  # debian only
apt-get install -y debian-archive-keyring  # debian only
apt-get install -y apt-transport-https
curl -u "USERNAME:PASSWORD" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key'  | apt-key add -
curl -u "USERNAME:PASSWORD" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/config.deb.txt?distro=DISTRO&codename=VERSION'> /etc/apt/sources.list.d/OWNER-REPOSITORY.list
apt-get update
apt-get install -y debian-keyring  # debian only
apt-get install -y debian-archive-keyring  # debian only
apt-get install -y apt-transport-https
curl -u "USERNAME:API-KEY" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key'  | apt-key add -
curl -u "USERNAME:API-KEY" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/config.deb.txt?distro=DISTRO&codename=VERSION'> /etc/apt/sources.list.d/OWNER-REPOSITORY.list
apt-get update
apt-get install -y debian-keyring  # debian only
apt-get install -y debian-archive-keyring  # debian only
apt-get install -y apt-transport-https
curl -u "token:TOKEN" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/gpg/gpg.FINGERPRINT.key'  | apt-key add -
curl -u "token:TOKEN" -1sLf 'https://dl.cloudsmith.io/basic/OWNER/REPOSITORY/cfg/setup/config.deb.txt?distro=DISTRO&codename=VERSION'> /etc/apt/sources.list.d/OWNER-REPOSITORY.list
apt-get update

Installing a package

After you have set up the repository, to install a package you do:

sudo apt-get install PACKAGE_NAME=PACKAGE_VERSION

Removing Setup

If you no longer want to install packages from your Cloudsmith repository, you can remove it with:

rm /etc/apt/sources.list.d/OWNER-REPOSITORY.list
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get update

Upstream Proxying / Caching

Configurable Proxying Caching
You can configure upstream Debian repositories that you wish to use for packages that are not available in your Cloudsmith repository. In addition, you can also choose to cache any requested packages for future use.

Please see our Upstream Proxying documentation for further instructions.

Key Signing Support

GPG Index

Troubleshooting

Please see the Troubleshooting page for further help and information.

Updated 2 months ago


Debian Repository


Cloudsmith provides public & private repositories for Debian packages

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.