RMT-CLI(8)

πŸ“¦ version 3.2.0, in opensuse-leap 16.0

🌸 rmt-cli β€” control & configure your RMT server (RMT-CLI(8)) πŸ’–

✨ NAME ✨

rmt-cli β€” the command line bestie that controls and configures your RMT server. 🫢

πŸ’… DESCRIPTION πŸ’…

rmt-cli is literally the command line interface for controlling and configuring a local RMT server.

RMT lets you mirror RPM repositories inside your own private network. It also doubles as a registration proxy for SUSE systems. No cap. πŸ”₯

πŸŽ€ PREREQUISITE πŸŽ€

Before you use rmt-cli for the very first time, you have to finish the initial setup of your RMT server. The recommended way to do this is the RMT Yast module. You can install and run this wizard like this:

zypper install yast2-rmt
yast2 rmt

πŸ”₯ USAGE πŸ”₯

  • rmt-cli sync β€” RMT comes with a preconfigured systemd timer that automatically gets the latest product and repository data from the SUSE Customer Center over night. This command triggers that same synchronization instantly. ⚑
  • rmt-cli systems list β€” Lists systems registered against RMT.

Use the --all flag to list all systems.

Use the --proxy-byos flag to filter systems using RMT as a proxy.

  • rmt-cli systems scc-sync β€” Forwards local RMT systems to SCC.
  • rmt-cli systems remove TARGET β€” Removes a system and its activations from RMT.

Example:

rmt-cli systems remove SCC_e740f34145b84523a184ace764d0d597
  • rmt-cli systems purge [--no-confirmation] [--before date] [--quiet] β€” Removes inactive systems.

Use the --no-confirmation flag so the command does not ask you for confirmation.

Use the --before date flag to define that systems before the given date should be viewed as inactive.

Use the --quiet flag so the command does not show all the systems that match the inactive criteria before deletion.

Example:

rmt-cli systems purge --non-interactive --before 2022-02-28 --quiet
  • rmt-cli products list [--all] [--csv] [--name name] [--version version] [--arch arch] β€” Lists the products that are enabled for mirroring.

Use the --all flag to list all available products.

Use the --csv flag to output the list in CSV format.

Use the --name name flag to list all products whose name match name.

Use the --version ver flag to list all products whose version match version.

Use the --arch arch flag to list all products whose architecture match arch.

  • rmt-cli products enable <id | string>... β€” Enable mirroring of product repositories by a list of product IDs or product strings.

Use the --all-modules flag to enable all free modules for a product.

Examples:

rmt-cli products enable SLES/15
rmt-cli products enable 1575
rmt-cli products enable SLES/15/x86_64 1743
rmt-cli products enable --all-modules SLES/15
  • rmt-cli products disable <id | string>... β€” Disable mirroring of product repositories by a list of product IDs or product strings.

Examples:

rmt-cli products disable SLES/15
rmt-cli products disable 1575
rmt-cli products disable SLES/15/x86_64 1743
  • rmt-cli products show <id | string> β€” Displays a product with all its repositories and their attributes.

Examples:

rmt-cli products show SLES/15/x86_64
  • rmt-cli clean packages β€” Removes locally mirrored dangling files and their database entries. A file is considered to be dangling if it matches all the following characteristics:
    • It exists in a repository directory with primary and deltainfo metadata repomd.xml files;
    • It is no longer referenced to in those metadata files;
    • It is at least 2-days-old.

Use the --dry-run flag to generate a report of all files without actually cleaning files or database entries.

Use the --verbose flag to print detailed information of each cleaned file.

Use the --non-interactive flag to skip confirmation before proceeding with the cleaning process.

  • rmt-cli repos clean [--no-confirmation] β€” Removes locally mirrored files of repositories which are not marked to be mirrored.

Use the --no-confirmation to avoid user interaction and auto accept confirmation dialogs.

  • rmt-cli repos list [--all] [--csv] β€” Lists the repositories that are enabled for mirroring.

Use the --all flag to list all available repositories.

Use the --csv flag to output the list in CSV format.

  • rmt-cli repos enable <id>... β€” Enable mirroring of repositories by a list of repository IDs.

Examples:

rmt-cli repos enable 2526
rmt-cli repos enable 2526 3263
  • rmt-cli repos disable <id>... β€” Disable mirroring of repositories by a list of repository IDs.

Examples:

rmt-cli repos disable 2526
rmt-cli repos disable 2526 3263
  • rmt-cli mirror β€” In its default configuration, RMT mirrors its enabled product repositories automatically once every night. This command starts this mirroring process manually. Changes made to repository mirroring settings while mirroring is in progress are respected by the mirroring process. πŸŒ™

When all enabled repositories are fully mirrored, you can register your client systems against RMT by running SUSEConnect --url https://<RMT hostname> on the client machine. After successful registration the repositories from RMT will be used by zypper on the client machine. ✨

πŸ› οΈ Custom repositories πŸ› οΈ

rmt-cli repos custom list [--csv] : Lists all your custom repositories.

Use the --csv flag to output the list in CSV format.

rmt-cli repos custom add <url> <name> [--id] : Adds a new custom repository, for example:

rmt-cli repos custom add https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP3/ Virtualization:Containers
rmt-cli repos custom add https://download.opensuse.org/repositories/Virtualization:/containers/SLE_12_SP3/ Virtualization:Containers --id containers_sle_12_sp3

rmt-cli repos custom enable <id> : Enables mirroring for a custom repository.

rmt-cli repos custom disable <id> : Disables mirroring for a custom repository.

rmt-cli repos custom remove <id> : Removes a custom repository.

rmt-cli repos custom products <id> : Lists the products attached to the custom repository with given id.

rmt-cli repos custom attach <id> <product id> : Attaches an existing custom repository to a product.

rmt-cli repos custom detach <id> <product id> : Detaches an existing custom repository from a product.

πŸ“¦ Offline mode πŸ“¦

RMT supports disconnected setups, in which an RMT does not need a connection to the internet, but takes all data and repository files from a portable storage device. A similar functionality was available in SMT. However, connecting an SMT with an RMT this way is not supported.

The offline mode requires some initial setup steps:

rmt-cli export data <path> : Run this on an online RMT to get the latest data from SUSE Customer Center and save it as JSON files at the specified path.

rmt-cli import data <path> : Run this on the offline RMT to read the JSON files from given path and fill the local database with data.

You can now run the usual rmt-cli repos enable <id> or rmt-cli products enable <id> commands on the offline RMT to select the repositories you want to enable for mirroring here.

rmt-cli export settings <path> : Run this on the offline RMT to save the settings for enabled repositories at given path as repos.json.

After you have finished above setup steps, you can mirror repositories regularly to and from a portable storage device, which you first mount on the online, and later on the offline RMT to carry the files over:

rmt-cli export repos <path> : Run this regularly on the online RMT to mirror the set of repositories specified in the repos.json at given path. The mirrored repository files will be stored in subdirectories of the same path.

rmt-cli import repos <path> : Run this on the offline RMT to copy over all files of the enabled repositories from given path.

πŸ’– CONFIGURATION πŸ’–

Okay bestie, so remember how the PREREQUISITE section said the recommended way to do the initial setup of RMT is with its YaST module? Yeah β€” that module handles configuring SCC credentials, setting up the database, and creating SSL certificates for you. Iconic. But if you wanna reconfigure specific settings manually, this section is literally your new best friend.

All the available configuration options live in the /etc/rmt.conf file. ✨

🫢 After altering /etc/rmt.conf you need to reload the configuration using systemctl restart rmt-server. No skipping this, bestie β€” it's the vibe check for your changes.

πŸŽ€ SSL certificates & HTTPS πŸŽ€

By default, access to API endpoints consumed by SUSEConnect is limited to HTTPS only. nginx is configured to use the SSL certificate and private key from these exact locations:

  • Certificate: /etc/rmt/ssl/rmt-server.crt
  • Private key: /etc/rmt/ssl/rmt-server.key

The YaST RMT module generates a custom certificate authority which is used to sign HTTPS certificates, which means that in order to register, this certificate authority must be trusted by the client machines:

  • For registrations during installation from the media or with the YaST Registration module, a message will appear, prompting to trust the server certificate.
  • For registering a client system on the command line, use the rmt-client-setup script. It is provided at this URL: http://<RMT hostname>/tools/rmt-client-setup

The script requires only the RMT server hostname as a mandatory parameter, like this:

wget http://rmt.example.org/tools/rmt-client-setup

chmod +x ./rmt-client-setup

./rmt-client-setup http://rmt.example.org

Executing this script will import the RMT CA's certificate into the trusted store and after that, run SUSEConnect to register the client with the RMT. Slay. πŸ’…


πŸ¦‹ Mirroring settings πŸ¦‹

The mirroring section lets you adjust mirroring behavior. Very main character energy.

  • mirroring.mirror_drpm β€” Whether to mirror delta (extension = .drpm) RPM packages or not. Defaults to true if absent.
  • mirroring.mirror_src β€” Whether to mirror source (arch = src) RPM packages or not.
  • mirroring.revalidate_repodata β€” Whether to re-validate repodata content and packages when the repodata did not change. Defaults to true if absent.
  • mirroring.dedup_method β€” Whether to deduplicate files by a hardlink or copy. Possible values are: hardlink, copy
  • mirroring.redirect_repo_hosts β€” List of hostnames from which repos will not get mirrored, but clients get redirected there.

🌸 HTTP client settings 🌸

The http_client section defines RMT's global HTTP connection settings.

  • http_client.proxy_auth setting β€” Determines proxy authentication mechanism, possible values are: none, basic, digest, gssnegotiate, ntlm, digest_ie, ntlm_wb

⭐ Logging ⭐

In the log_level section you can configure the verbosity of RMT.

  • rails setting β€” Sets the log level of the RMT server, possible values are: debug, info, warn, error.
  • cli setting β€” Sets the log level of the RMT cli, possible values are: debug, info. Setting this to debug has the same effect as running rmt-cli with the -d switch.

🌈 Web server settings 🌈

The web_server section lets you tune the performance of your RMT server. Performance queen behavior, honestly.

  • web_server.min_threads setting β€” Specifies the minimum threads count a RMT server worker should spawn. Acceptable values: Integer greater than or equal to 1.
  • web_server.max_threads setting β€” Specifies the maximum threads count a RMT server worker should spawn. Acceptable values: Integer greater than or equal to 1.
  • web_server.workers setting β€” Specifies the number of web workers for RMT. Acceptable values: Integer greater than or equal to 1.

πŸ‘‘ Settings for accessing SUSE repositories πŸ‘‘

The scc section contains your organization credentials for mirroring SUSE repositories from SUSE Customer Center. Your organization credentials can be obtained from the SUSE Customer Center at https://scc.suse.com/. Go get 'em. πŸ’œ


πŸ’Œ FEEDBACK πŸ’Œ

Do you have suggestions for improvement? Let us know! Go to https://github.com/SUSE/rmt/issues/new and create a new issue and describe what you think could be improved. Feedback is always welcome! 🫢✨


And that's the whole page, bestie β€” this iconic little manual is RMT-CLI(8), dated August 2026. Periodt. πŸ’…πŸŽ€

πŸ“¦ where this page comes from