Advanced Configuration

This section includes optional configuration options that are used less frequently by most users.

Customize the web UI

The OliveTin web UI is reasonably customizable - parts of the page that you don’t need can be hidden when they’re not needed.

Page Title

You can customize the page title;

page title
config.yaml
pageTitle: My OliveTin Instance

Show Navigation

You can choose to hide the navigation elements in OliveTin, to present a simplified user interface.

defaultUiWithNav
Figure 1. The default user interface with the "Actions" and "Settings" buttons shown.

To have OliveTin hide these buttons, add showNavigation: false to your config.yaml;

config.yaml
logLevel: "INFO"
showNavigation: false

actions:
    ....
defaultUiHideNav
Figure 2. The same user interface, but with the "Actions" and "Settings" buttons hidden (showNavigation: false)

Section Navigation Style

sectionNavigationStyle - You can choose to have the section navigation buttons displayed as a Sidebar (sidebar - default), or along the top (topbar).

Custom JavaScript

This is considered an advanced feature, and is not recommended unless you like writing your own code.

You can add custom JavaScript to OliveTin, which will be executed on every page load. This can be useful for adding custom functionality to the web UI.

The custom javascript should be in a file called custom.js and saved in custom-webui/, which should be in the same directory as your config.yaml.

You will need to set enableCustomJs to true in your config.yaml to enable this feature.

Custom Themes / Stylesheet rules

See [themes].

Show new versions

You can disable the "new version" information in the footer - the default for showNewVersions is true;

config.yaml
logLevel: "INFO"
showNewVersions: false

If disabled, OliveTin will still check for new versions in the background, but will not display them on the page. If you want to disable update checking completely, see disable update checking.

You can disable the entire footer, if you would like a really minimal interface. The default for showFooter is true.

config.yaml
logLevel: "INFO"
showFooter: false

This means the showNewVersions configuration option will automatically be false as well.

Log Levels

OliveTin supports a few different log levels. The default logLevel is INFO.

You can set a logLevel in config.yaml like this;

config.yaml
logLevel: "INFO"

actions:
    ....

The supported log levels are;

  • DEBUG - Every possible log message will be shown. This will use a lot of disk space and is not recommended unless you are a developer / like reading code.

  • ERROR - OliveTin rarely uses the ERROR log level.

  • WARN - Very few messages, only warnings are shown.

  • INFO - The defualt log level.

You can change the logLevel while OliveTin is running, and it should update as soon as you save your config.yaml. You will always get a log message like this;

INFO Setting log level to warning

Ports

See the network ports documentation in the reference section.

Timezone

OliveTin will obviously use the system time just like all other programs, but when running in a container, time works in a slightly unusual way.

You may be used to using a TZ or TIMEZONE environment variable in your Linux container inages, but this is not a standard that works for all Linux distributions - it’s mostly supported by Debain based containers. OliveTin’s base container image is fedora-minimal, which deliberately does not include timezone data, to reduce storage space.

To change the time in the OliveTin container, simply bind-mount the correct zone file;

Same as the container host
docker create -v /etc/localtime:/etc/localtime -v /etc/OliveTin:/config --name OliveTin docker.io/jamesread/olivetin
Different timezone to the container host
docker create -v /usr/share/zoneinfo/Japan:/etc/localtime -v /etc/OliveTin:/config --name OliveTin docker.io/jamesread/olivetin

Prometheus

OliveTin supports basic Prometheus metrics, and the project is interested to hear about what more metrics people would find useful, as well!

To enable Prometheus support;

config.yaml
logLevel: INFO

prometheus:
    enabled: true
    defaultGoMetrics: false

It is required to restart OliveTin after changing the prometheus configuration.

The defaultGoMetrics option will enable the default Go metrics, which expose metrics like go_memstats_alloc_bytes, or go_memstats_heap_alloc_bytes, and generally most people don’t need these.

This will give you metrics available at http://yourserver:1337/metrics. The page should look something like this;

# HELP olivetin_actions_requested_count The actions requested count
# TYPE olivetin_actions_requested_count gauge
olivetin_actions_requested_count 0
# HELP olivetin_config_action_count Then number of actions in the config file
# TYPE olivetin_config_action_count gauge
olivetin_config_action_count 18
# HELP olivetin_config_reloaded_count The number of times the config has been reloaded
# TYPE olivetin_config_reloaded_count counter
olivetin_config_reloaded_count 1
# HELP olivetin_sv_count The number entries in the sv map
# TYPE olivetin_sv_count gauge
olivetin_sv_count 49