Skip to Content
DocumentationGuidesCustomize 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 cihome/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 cihome/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 cihome/apps/<app-store>/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 cihome and a folder structure matching your app store and apps:

cd cihome mkdir -p user-config/<app-store>/jellyfin mkdir -p user-config/<app-store>/pihole

Replace <app-store> with your app store name. If you’re using the default migrated app store, use migrated. To find the name of your app store, check the cihome/apps folder.

Create the custom config

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

touch user-config/<app-store>/jellyfin/docker-compose.yml nano user-config/<app-store>/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/<app-store>/pihole/app.env nano user-config/<app-store>/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

Restart each app from the Companion Home dashboard — go to the app’s detail page and click Stop, then Start.

  • 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
Last updated on