### Start Koios on MacOS/Linux (Line Continuation) Source: https://docs.ai-op.com/docs/manually-starting-koios Use this command to start Koios for the first time on MacOS and Linux, utilizing line continuation characters for readability. It ensures Koios starts with the expected settings. ```bash docker run -d \ --name koios \ --network host \ --mount source=koios_data_postgres,target=/var/lib/postgresql/16/main \ --mount source=koios_data_influxdb,target=/root/.influxdbv2 \ --mount source=koios_media,target=/var/www/koios/media \ --mount source=koios_logs,target=/var/www/koios/logs \ --mount source=koios_certs,target=/var/www/koios/certs \ --mount source=koios_license,target=/var/www/koios/license \ --restart=always \ aiopinc/koios:latest ``` -------------------------------- ### Start Koios on Windows (Single Line) Source: https://docs.ai-op.com/docs/manually-starting-koios Use this command to start Koios for the first time on Windows using a single line Docker command. It ensures Koios starts with the expected settings. ```bash docker run -d --name koios --network host --mount source=koios_data_postgres,target=/var/lib/postgresql/16/main --mount source=koios_data_influxdb,target=/root/.influxdbv2 --mount source=koios_media,target=/var/www/koios/media --mount source=koios_logs,target=/var/www/koios/logs --mount source=koios_certs,target=/var/www/koios/certs --mount source=koios_license,target=/var/www/koios/license --restart=always aiopinc/koios:latest ``` -------------------------------- ### Enable Koios Service Source: https://docs.ai-op.com/docs/setting-up-the-koios-service Run this command to enable the Koios service to start automatically on system boot. ```bash sudo systemctl enable docker.koios.service ``` -------------------------------- ### Start Koios Service Source: https://docs.ai-op.com/docs/backing-up-volumes Starts the Koios Docker service after restoring volumes to verify that the data has been restored correctly and the application is functioning as expected. ```bash sudo service docker.koios start ``` -------------------------------- ### Control Koios Service Source: https://docs.ai-op.com/docs/setting-up-the-koios-service Use these commands to manage the Koios service: stop, start, or restart it as needed. ```bash sudo service docker.koios stop ``` ```bash sudo service docker.koios start ``` ```bash sudo service docker.koios restart ``` -------------------------------- ### Create Koios Service File Source: https://docs.ai-op.com/docs/setting-up-the-koios-service Use this command to create the systemd service file for Koios. Ensure you have sudo privileges. ```bash sudo nano /etc/systemd/system/docker.koios.service ``` -------------------------------- ### Create Backup Directory Source: https://docs.ai-op.com/docs/backing-up-volumes Create a directory on the host system to store Docker volume backups. Ensure this directory exists before proceeding with backups. ```bash mkdir -p /backups/docker_volumes ``` -------------------------------- ### Verify Koios Image Download Source: https://docs.ai-op.com/docs/pulling-koios-image After downloading, use this command to list local Docker images and confirm the Koios image is present with the correct version. ```bash docker image ls ``` -------------------------------- ### Verify Docker Image Source: https://docs.ai-op.com/docs/updating-the-koios-version Lists all Docker images on the system to confirm that the latest Koios image has been successfully loaded. ```bash docker images ``` -------------------------------- ### Koios Systemd Service Configuration Source: https://docs.ai-op.com/docs/setting-up-the-koios-service Paste this configuration into the Koios service file. It defines the service's description, dependencies, start/stop commands, and restart policy. Ensure the Docker image tag matches your desired version. ```ini [Unit] Description=Ai-Ops, Koios Docker Run Service After=docker.service Requires=docker.service [Service] TimeoutStartSec=10 Restart=always ExecStartPre=-/usr/bin/docker stop %n ExecStartPre=-/usr/bin/docker rm %n ExecStart=/usr/bin/docker run --rm --name=%n --network host --mount source=koios_data_postgres,target=/var/lib/postgresql/16/main \ --mount source=koios_data_influxdb,target=/root/.influxdbv2 \ --mount source=koios_media,target=/var/www/koios/media \ --mount source=koios_logs,target=/var/www/koios/logs \ --mount source=koios_certs,target=/var/www/koios/certs \ --mount source=koios_license,target=/var/www/koios/license \ aiopinc/koios:latest ExecStop=/usr/bin/docker stop %n [Install] WantedBy=default.target ``` -------------------------------- ### Verify Backup Files Source: https://docs.ai-op.com/docs/backing-up-volumes Lists the created backup files in the specified directory to confirm that the tarballs were generated successfully. ```bash ls -lh /backups/docker_volumes ``` -------------------------------- ### View Koios Service Logs Source: https://docs.ai-op.com/docs/setting-up-the-koios-service If the service is not running as expected, use this command to view detailed logs and troubleshoot issues. ```bash journalctl -u docker.koios.service ``` -------------------------------- ### Restart Koios Container Source: https://docs.ai-op.com/docs/manually-starting-koios Once the Koios container has been created, use this command to restart it. Docker remembers the previous settings. ```bash docker start koios ``` -------------------------------- ### Pull Koios Docker Image (Latest) Source: https://docs.ai-op.com/docs/pulling-koios-image Use this command to download the most recent version of the Koios Docker image from Ai-OPs Docker Hub. ```bash sudo docker pull aiopinc/koios:latest ``` -------------------------------- ### Pull Latest Koios Docker Image Source: https://docs.ai-op.com/docs/updating-the-koios-version Fetches the most recent Koios Docker image from the registry. Ensure you have an active internet connection. ```bash docker pull aiopinc/koios ``` -------------------------------- ### Load Koios Docker Image from Tarball Source: https://docs.ai-op.com/docs/updating-the-koios-version Loads a Docker image from a gzipped tar archive. This is used on machines without direct internet access to load previously saved images. ```bash docker load < koios_latest.tar.gz ```