Table of Contents

Reposilite supports multiple use cases and environments. By default we support 3 of them:
  • - run regular JAR file as standalone Java application
  • - launch Reposilite within Docker container
  • - manage multiple Reposilite instances using Kubernetes
That's why there're different ways to configure your instance. We divided it into 3 configuration layers:
You don't have to create configuration files manually, Reposilite will generate it during the first startup, but make sure that process is able to write to the disk.

Parameters are configuration properties passed to Reposilite through program arguments:
$ java -jar reposilite.jar --parameter=value
List of available parameters:
ParameterDescriptionDefault value
--helpDisplays help message with all parameters-
--versionDisplay current version of Reposilite-
--working-directory
-wd
Sets custom working directory for this instance, so the location where Reposilite keeps local data./
--plugin-directory
-pd
Sets custom directory for plugins./plugins
--generate-configuration
-gc
Generate default template of the requested file. Supported templates: configuration.cdn for local configuration and configuration.shared.json for shared configuration-
--local-configuration
--local-config
-lc
Sets custom location of local configuration file in CDN format. By default it's relative to working directory path, but you can also use absolute path.configuration.cdn
--local-configuration-mode
--local-config-mode
-lcm
Configuration modes description: auto
--shared-configuration
--shared-config
-sc
Replaces database oriented storage of shared configuration with manually linked JSON file with all defined propertiesconfiguration.shared.cdn
--hostname
-h
Overrides hostname from local configurationValue from
--port
-p
Overrides port from local configurationValue from
--databaseOverrides database from local configurationValue from
--token
-t
Create temporary token with the given credentials in name:secret formatEmpty
--channel
-c
Sets channel of Reposilite updates. Supported channels: fatal, error, warn, info, debug, traceinfo
--enable-migrationsRuns set of optional migrations. Currently available migrations:
1. 001 Change repository identifier size from 32 to 64. This migration is required to support longer repository names
-
--test-env
--debug
-d
Enables debug mode-

Configuration mode describes how the given configuration should be processed by Reposilite. Because Reposilite still evolves, there are introduced new properties over and over. To simplify migration & update process, Reposilite supports automatic config migrations through library. Sometimes you want to keep your configuration file immutable, and to give a possibility to control this process, configuration modes where introduced. Supported configuration modes:
ModeDescription
autoProcesses and updates configuration file automatically if there are missing entries
noneDisables automatic updates of configuration file, user has update such files manually in case of new properties introduced in further updates

Local configuration describes configuration of current Reposilite instance. It mostly refers to infrastructure setup, such as hostname, port or database connection.
Example local configuration file in CDN format from :

You can also updated those properties using system properties or environment variables in following format:
ModePrefixExample
System propertiesreposilite.local.-Dreposilite.local.sslEnabled=true
Environment variablesREPOSILITE_LOCAL_REPOSILITE_LOCAL_SSLENABLED=true

Settings (shared configuration) describes content of all your Reposilite instances, such as repositories or frontend customization. This configuration supports hot-reloading of properties and should be shared between all your Reposilite instances to make sure that every instance behaves and offers the same content.
Note By default, Reposilite uses database to store shared configuration and synchronizes its state every 10 seconds. Configuration synchronization is based on top of an interval, due to the lack of 3rd party service that could broadcast data between instances.
Shared configuration can be modified by access token with management permission through web interface in Settings tab:
Dashboard / Configuration

Most users should use default configuration with shared configuration in database that offers support for hot-reloading and automatic updates, but for some of them it's not really what they want/can use. Some use cases where database based shared configuration may not be the best solution:
  • Boot temporary Reposilite instance without preserved database file
  • Specific environments with external configuration supervisors that don't want to share state between shared database
That's why Reposilite allows you to export shared configuration into JSON file and link it manually using --shared-configuration parameter. You can generate default template with --generate-configuration=configuration.shared.json parameter or just configure your instance through web dashboard and download configuration as JSON file. Example output:


Did you find misleading or deprecated content? Maybe you just feel this section misses important elements?

Guide

Copyright © 2023 dzikoysk with ❤ panda-lang