config

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config loads container-level configuration from environment variables. Everything else (indexers, download clients, naming, VPN) lives in the settings table, not here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port int

	ConfigDir           string // /config
	DownloadsDir        string // /downloads
	DownloadsIncomplete string // /downloads/incomplete
	DownloadsComplete   string // /downloads/complete
	MoviesDir           string // /movies
	TVDir               string // /tv
	MusicDir            string // /music (only used when the music module is switched on)
	EbooksDir           string // /ebooks (kept for the ebooks module, which is not built yet)
	AudiobooksDir       string // /audiobooks (kept for the audiobooks module, which is not built yet)

	DBPath        string
	SecretKeyPath string

	// TrustedProxies lists the reverse proxies whose X-Forwarded-For /
	// X-Forwarded-Proto / X-Forwarded-Host headers are believed (see
	// internal/httpsec). "private" (default) trusts loopback and private
	// network ranges, "none" trusts no proxy, or give addresses and CIDR
	// ranges separated by commas.
	TrustedProxies string
	// AllowedOrigins are extra host names accepted as the origin of
	// state-changing browser requests, for a proxy that rewrites the Host
	// header (comma-separated; usually empty).
	AllowedOrigins string

	// BundledFlareSolverr is true in the "-full" image, which runs FlareSolverr
	// next to Mediarium on 127.0.0.1:8191. The image sets it; users do not.
	BundledFlareSolverr bool

	// PauseAutomation is the safe mode: MEDIARIUM_PAUSE_AUTOMATION=1 starts the
	// app with automatic searching, downloading, refreshing and the
	// connectivity checks switched off, so the pages always load and a person can
	// change settings. Nothing is saved; take the variable away and they run again.
	PauseAutomation bool

	// ImageVersion is the version of the program inside the container image.
	// The image's entrypoint sets it before starting the app, which is how the
	// app knows it was started by that entrypoint and so can restart into an
	// installed update (see internal/selfupdate). It is empty on a native
	// install. The image sets it; users do not.
	ImageVersion string

	// Supervised is true when something restarts Mediarium after it exits, so
	// the Restart button can work. Docker (with a restart policy), systemd and
	// launchd are recognised by themselves; MEDIARIUM_SUPERVISED=1 says so for
	// any other service manager.
	Supervised bool
}

func Load

func Load() Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL