Documentation
Guides
Customize app config

Customize app config

Overview

In this guide, we'll show you how to customize the configuration of an app by overriding the default docker-compose.yml and app.env files.

Example use cases

  • Set Pihole to listen on a custom IP address
  • Mount an existing volume on your host into a media app such as Jellyfin. By default, media apps will only be able to see files within runtipi/media, but you can add other volumes.

An alternative approach to mounting a volume into an app would be to symlink your host volume into runtipi/media. However, that would make it visible to all apps that mount the media folder, which may not be desirable.

Create custom docker config

In this example we're going to add environment variables to the Pihole app and mount the /cellar volume into the Jellyfin app.

To determine how to set environment variables to customize the Pihole container, we look at runtipi/apps/pihole/docker-compose.yml:

ports:
  - ${NETWORK_INTERFACE:-0.0.0.0}:53:53/tcp
  - ${NETWORK_INTERFACE:-0.0.0.0}:53:53/udp
  - ${NETWORK_INTERFACE:-0.0.0.0}:${APP_PORT}:80

From this, we know that we need to set the NETWORK_INTERFACE variable.

💡

Don't edit the files in the apps folder directly; they will be overwritten on update.

Create the folders

Create user-config folder within runtipi and a folder for each app:

cd runtipi
mkdir user-config
mkdir user-config/jellyfin
mkdir user-config/pihole

Create the custom config

Create a docker-compose.yml for jellyfin and add this content:

touch user-config/jellyfin/docker-compose.yml
nano user-config/jellyfin/docker-compose.yml
services:
  jellyfin:
    volumes:
      - /cellar:/cellar
💡
Replace /cellar with the volume you want to mount.

Modify the environment files

Create an app.env for pihole and add this content:

touch user-config/pihole/app.env
nano user-config/pihole/app.env
NETWORK_INTERFACE=10.20.0.53
💡
Replace 10.20.0.53 with the IP address you want pihole to listen on.

Check your file structure

You should end up with a structure like this:

        • docker-compose.yml
        • app.env
  • Restart the apps and test

    ./runtipi-cli app stop jellyfin
    ./runtipi-cli app stop pihole
    ./runtipi-cli app start jellyfin
    ./runtipi-cli app start pihole
    • Test Jellyfin by opening the app and configuring a library. You should now see your mounted volume.
    • Test Pihole with a DNS query to the new IP address:
    nslookup google.com 10.20.0.53
    Server:         10.20.0.53
    Address:        10.20.0.53#53
    
    Non-authoritative answer:
    Name:   google.com
    Address: 142.250.200.46
    Name:   google.com
    Address: 2a00:1450:4009:822::200e