Docker Compose install

Docker compose is a popular way to define multi-container applications using a infrastructure as code approach.

If you personally prefer to use docker compose, then here is a sample to get you started;

docker-compose.yml
version: "3.8"
services:
  olivetin:
    container_name: olivetin
    image: jamesread/olivetin
    volumes:
      - OliveTin-config:/config # replace host path or volume as needed
    ports:
      - "1337:1337"
    restart: unless-stopped

Post installation (container)

You will need to write a basic configuration file before OliveTin will startup.

Create a basic config file at /etc/OliveTin/config.yaml - the exact path depends on what directory you specified in the bind mount container creation in the last step. Note that the file must be called config.yaml, and config.yml or mystuff.yaml would not work. You can download a sample configuration file like this if you like;

Download the sample config.yaml file to get you started.
user@host: cd /etc/OliveTin/
user@host: curl -O https://raw.githubusercontent.com/OliveTin/OliveTin/main/config.yaml

The file contents should look something like this;

The most simple config.yaml file.
actions:
  - title: "Hello world!"
    shell: echo 'Hello World!'

If you are running a firewall on your server, like firewalld, you will need to open port 1337;

user@host: firewall-cmd --add-port 1337/tcp --permanent
user@host: firewall-cmd --reload

Now that you have a configuration file, and the OliveTin container created, you are now ready to start OliveTin!

user@host: docker start olivetin

You should be able to browse to http://yourserver:1337 (or similar) to get to the web interface.

If you see the OliveTin page popup in your browser, you can jump to the configuration section as the next step.

Troubleshooting podman/docker installations

If you are having problems in starting OliveTin, or OliveTin is crashing on startup, then check the logs like this;

user@host: docker logs OliveTin

If you cannot understand the logs, or otherwise need help, see the support page.

Controlling other docker containers from a Docker Compose install of OliveTin

If you want to use OliveTin running in a container to control other Docker containers, you will need to pass through the Docker sock in your compose file.

You will need to adjust your docker-compose file to include the docker socket, like this;

`docker-compose.yml` including docker socket
version: "3.8"
services:
  olivetin:
    container_name: olivetin
    image: jamesread/olivetin
    volumes:
      - /docker/OliveTin:/config # replace host path or volume as needed
      - /var/run/docker.sock:/var/run/docker.sock
    ...

You will probably need to tell this container to run as root as well, to control docker (see below).

Controlling the docker user with Docker Compose

This is the correct way to tell the OliveTin container to run as root (or any other user);

version: "3.8"
services:
  olivetin:
    container_name: olivetin
    image: jamesread/olivetin
    user: root
    ...
Note
PUID and PGID are not used by the official OliveTin container image.

Using Traefik with Docker Compose

Traefik is a popular reverse proxy that seems to be used a lot in people’s Docker compose setups. See the Traefik + Docker Compose page for more details.