Configuration
There are two ways to pass custom properties to your Reposilite instance:
- Through the
reposilite.cdn
configuration file - Using the system properties (overrides values from configuration)
Detailed description of properties is located in the following chapters:
Default configuration
The standard configuration of Reposilite should be generated by Reposilite during your first start and it should look like this:
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Reposilite #
# ~~~~~~~~~~~~~~~~~~~~~~ #
# Hostname
hostname:
# Port to bind
port: 80
# Custom base path
basePath: /
# Any kind of proxy services change real ip.
# The origin ip should be available in one of the headers.
# Nginx: X-Forwarded-For
# Cloudflare: CF-Connecting-IP
# Popular: X-Real-IP
forwardedIp: X-Forwarded-For
# Debug
debugEnabled: false
# Support encrypted connections
sslEnabled: true
# SSL port to bind
sslPort: 443
# Key store file to use.
# You can specify absolute path to the given file or use ${WORKING_DIRECTORY} variable.
keyStorePath: ${WORKING_DIRECTORY}/keystore.jks
# Key store password to use
keyStorePassword: reposilite
# Redirect http traffic to https
enforceSsl: false
# Control the maximum amount of data assigned to Reposilite instance
# Supported formats: 90%, 500MB, 10GB
diskQuota: 85%
# List of supported Maven repositories.
# First directory on the list is the main (primary) repository.
repositories {
releases
snapshots
.private
}
# Allow to omit name of the main repository in request
# e.g. /org/panda-lang/reposilite will be redirected to /releases/org/panda-lang/reposilite
rewritePathsEnabled: true
# List of proxied repositories.
# Reposilite will search for an artifact in remote repositories listed below, if the requested artifact was not found.
proxied {
# https://repo.panda-lang.org
}
# Reposilite can store proxied artifacts locally to reduce response time and improve stability
storeProxied: true
# Accept deployment connections
deployEnabled: true
# List of management tokens used by dashboard to access extra options.
# (By default, people are allowed to use standard dashboard options related to the associated path)
managers {
# root
}
# Title displayed by frontend
title: "Your company"
# Description displayed by frontend
description: "Definitely not Reposilite"
# Accent color used by frontend
accentColor: "#2fd4aa"
Customized version of configuration file can be found in test workspace: reposilite.cdn
System properties
Passing properties through the system properties is especially useful, when we want to use Docker image. The parameter must be provided in the following structure:
-Dreposilite.propertyName=propertyValue
-Dreposilite.propertyName=arrayValue1,arrayValue2
For instance:
$ java -Xmx32M -Dreposilite.port=8080 -jar reposilite.jar
Parameters
Some of the properties have to be set through the command-line parameters.
Working directory
To declare custom working directory for Reposilite instance,
you should use --working-directory
(alias: -wd
) parameter:
$ java -jar reposilite.jar --working-directory=/app/data
Configuration file
You may also declare custom location of configuration file using the --config
(alias: -cfg
) parameter:
$ java -jar reposilite.jar --config=/etc/reposilite/reposilite.cdn
You don't have to create this file manually,
Reposilite will generate it during the first startup,
but make sure that you've granted write
permission.
Properties
Using the system properties, you can also override values from the loaded configuration. See configuration#system-properties to learn more.
Log file
Reposilite uses tinylog as logging library. To change location of log file, use system properties:
$ java -Dtinylog.writerFile.file=/etc/reposilite/log.txt -jar reposilite.jar