The Lunarr application allows you to configure various settings via a lunarr.yml file, environment variables, or a combination of both. This document outlines all the configuration options available and their usage.
The server section configures the IP address and port for the Lunarr server.
server:
host: "0.0.0.0" # The IP address or hostname the server binds to.
port: 8484 # The port number the server listens on.host: Defaults to127.0.0.1(localhost). You can set this to0.0.0.0to bind to all interfaces.port: The port the server listens on. The default is8484.
The tmdb section configures the API key or access token used to interact with The Movie Database (TMDb) API.
tmdb:
api_key: "" # TMDb API key (v3)
access_token: "" # TMDb access token (v4)- API Key: If you have a v3 TMDb API key, provide it here.
- Access Token: Alternatively, you can provide a v4 access token. Note: Only one of
api_keyoraccess_tokenis required. If both are provided, theapi_keywill be used.
The app_data_dir specifies the path where Lunarr stores its data.
app_data_dir: "/path/to/app/data"If left empty, the default path will be the user's config directory.
The database section configures the database connection. You can use either SQLite (default) or PostgreSQL.
database:
driver: "sqlite" # Database driver, options: "sqlite", "postgres"
postgres: # PostgreSQL-specific configuration (only used if driver is "postgres").
host: "localhost"
port: 5432
user: "postgres"
password: "yourpassword"
dbname: "lunarrdb"driver: Choose betweensqliteorpostgres.- PostgreSQL options (used when
driverispostgres):host: The hostname of the PostgreSQL server.port: The port number of the PostgreSQL server.user: The username for the PostgreSQL connection.password: The password for the PostgreSQL connection.dbname: The database name to connect to.
The app_settings section allows you to configure paths for movie and TV show locations, email SMTP settings, and user signup preferences.
You can specify the directories where Lunarr will scan for movies and TV shows.
app_settings:
movie_locations:
- "/mnt/movies" # List of directories where movies are stored.
tv_show_locations:
- "/mnt/tvshows" # List of directories where TV shows are stored.This section configures the SMTP settings for sending emails.
email_smtp:
smtp_server: "smtp.example.com" # SMTP server address.
port: 587 # SMTP port.
username: "your_smtp_username" # SMTP username.
password: "your_smtp_password" # SMTP password.smtp_server: The SMTP server's address.port: The port number used by the SMTP server.username: Your SMTP account's username.password: Your SMTP account's password.
Controls whether new users can sign up.
new_user_signup: truenew_user_signup: A boolean option that allows or disallows new user registrations. If set tofalse, new users cannot sign up.
In addition to the lunarr.yml file, you can override configuration values using environment variables. These variables are prefixed with LUNARR_.
export LUNARR_SERVER_HOST="192.168.1.100"
export LUNARR_SERVER_PORT=5050
export LUNARR_TMDB_API_KEY="your_tmdb_api_key"
export LUNARR_DATABASE_DRIVER="postgres"
export LUNARR_DATABASE_POSTGRES_HOST="db.example.com"
export LUNARR_APPSETTINGS_EMAIL_SMTP_SERVER="smtp.env.com"
export LUNARR_APPSETTINGS_NEW_USER_SIGNUP=false
export LUNARR_APPSETTINGS_MOVIE_LOCATIONS="/mnt/movies1,/mnt/movies2"
export LUNARR_APPSETTINGS_TV_SHOW_LOCATIONS="/mnt/tvshows1,/mnt/tvshows2"- YAML File: The configuration in
lunarr.ymlwill be loaded first. - Environment Variables: If environment variables are provided, they will override the corresponding YAML values.