Skip to main content
Version: 0.6

Deploying with Docker Compose

info

Before proceeding, we recommend reading the Introduction, which can quickly help you understand Ikaros.

Setting Up the Environment

tip

We recommend installing Docker and Docker Compose following the official Docker documentation, as the Docker version in the software repositories of some Linux distributions may be outdated.

Creating Container Group

Available Docker images for Ikaros:

Note

Currently, Ikaros has not updated the Docker image with the latest tag, mainly because no official version has been released yet. We recommend using specific version tags, such as ikarosrun/ikaros:v0.7.4.

  • ikarosrun/ikaros:v0.7.4: Represents the latest available image. A new image is built for each release based on GitHub tags.
  • ikarosrun/ikaros:dev: Represents the image in development. It is not recommended for use, as it is rebuilt and overwritten with each merged Pull Request into the main branch.

Subsequent documentation will use ikarosrun/ikaros:v0.7.4 as an example.

  1. Create a folder anywhere in the system. This document uses ~/ikaros as an example.

    mkdir ~/ikaros && cd ~/ikaros
    info

    Note: In subsequent operations, all data generated by Ikaros will be saved in this directory. Please keep it safe.

  2. Create docker-compose.yaml

    This document provides Docker Compose configuration files for two scenarios. Please choose one based on your needs.

    1. Create an instance of Ikaros + PostgreSQL:

      ~/ikaros/docker-compose.yaml
      version: "3"
      services:
      # ikaros
      ikaros:
      image: ikarosrun/ikaros:v0.7.4
      container_name: ikaros
      restart: on-failure:3
      depends_on:
      ikaros_database:
      condition: service_healthy
      networks:
      ikaros_networks:
      volumes:
      - ./:/root/.ikaros
      ports:
      - "9999:9999"
      healthcheck:
      test: [ "CMD", "curl", "-f", "http://localhost:9999/actuator/health"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 30s
      environment:
      - LANG=C.UTF-8
      - LC_ALL=C.UTF-8
      - TZ=Asia/Shanghai
      command:
      - --logging.charset.console=UTF-8
      - --logging.charset.file=UTF-8
      # log level for package, such as INFO or DEBUG
      - --logging.level.run.ikaros.server=INFO
      - --logging.level.run.ikaros.plugin=INFO
      - --logging.level.run.ikaros.jellyfin=INFO
      - --sun.jnu.encoding=UTF-8
      - --spring.r2dbc.url=r2dbc:pool:postgresql://ikaros_database/ikaros
      - --spring.r2dbc.username=ikaros
      # Make sure the password for PostgreSQL matches the value of the POSTGRES_PASSWORD variable below.
      - --spring.r2dbc.password=openpostgresql
      - --spring.sql.init.platform=postgresql
      # Initial superuser username
      - --ikaros.security.initializer.master-username=tomoki
      # Initial superuser password
      - --ikaros.security.initializer.master-password=tomoki

      # ikaros database
      ikaros_database:
      image: postgres:latest
      container_name: ikaros_database
      restart: on-failure:3
      networks:
      ikaros_networks:
      volumes:
      - ./database:/var/lib/postgresql/data
      healthcheck:
      test: [ "CMD", "pg_isready" ]
      interval: 10s
      timeout: 5s
      retries: 5
      environment:
      - POSTGRES_DB=ikaros
      - POSTGRES_USER=ikaros
      - POSTGRES_PASSWORD=openpostgresql

      networks:
      ikaros_networks:
      driver: bridge
    2. Create Ikaros instance only (using the default H2 database, not recommended for production environment, suggested for experience and testing only):

      ~/ikaros/docker-compose.yaml
      version: "3"
      services:
      # ikaros
      ikaros:
      image: ikarosrun/ikaros:v0.7.4
      container_name: ikaros
      restart: on-failure:3
      networks:
      ikaros_networks:
      volumes:
      - ./:/root/.ikaros
      ports:
      - "9999:9999"
      healthcheck:
      test: [ "CMD", "curl", "-f", "http://localhost:9999/actuator/health"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 30s
      environment:
      - LANG=C.UTF-8
      - LC_ALL=C.UTF-8
      - TZ=Asia/Shanghai
      command:
      - --logging.charset.console=UTF-8
      - --logging.charset.file=UTF-8
      - --logging.level.run.ikaros.server=INFO
      - --logging.level.run.ikaros.plugin=INFO
      - --logging.level.run.ikaros.jellyfin=INFO
      - --sun.jnu.encoding=UTF-8
      # Initial superuser username
      - --ikaros.security.initializer.master-username=tomoki
      # Initial superuser password
      - --ikaros.security.initializer.master-password=tomoki

      networks:
      ikaros_networks:
      driver: bridge

    Parameter Details:

    Parameter NameDescription
    spring.r2dbc.urlDatabase connection URL, see Database Configuration below for details
    spring.r2dbc.usernameDatabase username
    spring.r2dbc.passwordDatabase password
    spring.sql.init.platformDatabase platform name, supports postgresql, h2
    ikaros.security.initializer.master-usernameInitial superuser username
    ikaros.security.initializer.master-passwordInitial superuser password

    Database Configuration:

    Connection MethodConnection Address Formatspring.sql.init.platform
    PostgreSQLr2dbc:pool:postgresql://{HOST}:{PORT}/{DATABASE}postgresql
    H2 Databaser2dbc:h2:file:///${ikaros.work-dir}/db/ikaros?MODE=MySQL&DB_CLOSE_ON_EXIT=FALSEh2
  3. Start the Ikaros service

    docker-compose up -d

    View logs in real-time:

    docker-compose logs -f ikaros
  4. Access the Ikaros management page by visiting /console in your browser. The username and password are the ones set in the docker-compose.yaml file as master-username and master-password.

tip

If not started with these parameters, the default username is tomoki, and the password will be printed in the logs (printed only on the first run).

Updating Container Group

  1. Stop the running container group.

    cd ~/ikaros && docker-compose down
  2. Backup Data (Important)

    cp -r ~/ikaros ~/ikaros.archive

    It's worth noting that the ikaros.archive filename doesn't necessarily have to follow the naming convention in this document. This is just an example.

  1. Update the Ikaros service

    Modify the image version configured in docker-compose.yaml.

    services:
    ikaros:
    image: ikarosrun/ikaros:v0.7.4
    container_name: ikaros
    docker-compose pull ikaros
    docker-compose up -d