April 16, 20251 yr Hi, I am new to Unraid and exploring the applications on docker, Our server running as storage for a Buddhist Centre and we have had a library that hasn't been possible to take books out of for a long time, I'm hoping to use this server to also host a library so that people who come to our centre can get books out. The reason I was interested in an application called Koha is because our physical library is fairly large and because we are thinking of (in the future) upgrading to get a kiosk and Koha is an application which can also work with various Kiosks. Is it possible to launch this from our unraid server and by chance would anyone be able to offer advise so that we can do so? any help/support would be greatly appreciated. https://git.koha-community.org/koha-community/koha
April 18, 20251 yr Community Expert Solution I don't know this software and it appears to be a Debian install system. You can use VMs and/or LXC and install a Debian OS to install koha... However, To accomplish the use we need to use docker compose... Are you familiar with Calibre? https://calibre-ebook.com/ Docker compose for Calibre docker run on unraid example: https://github.com/artiomn/library-docker I mention only because a Unraid CA template already exists: Community app install docker compose plugin. In docker web UI add a new stack and set path. Example... Edit stack > compose file Make needed edits and compose up to run ... Koha exist in docker form already... It looks like someone made a koha docker stack already: GitHub: https://github.com/teogramm/koha-docker Koha example docker compose file: https://github.com/teogramm/koha-docker/blob/main/examples/docker-compose.yaml Unraid may need some small edits So, This docker github may need cloned and files within pointed for volume mout pathing... cd /mnt/user/appdata/ git clone https://github.com/teogramm/koha-docker.git cd koha-docker/ ls this make the advance toggle at making the stack located at: /mnt/user/appdata/koha-docker Some adational folder may need created.. mkdir -p /mnt/user/appdata/koha-docker/data/ mkdir -p /mnt/user/appdata/koha-docker/data/koha mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins Lets also have the docker create its own bridge network. a updated unraid docker compose file example #version: "3.9" services: koha: image: teogramm/koha:24.11 container_name: koha hostname: koha ports: - 8080:8080 - 8081:8081 networks: - koha-net cap_add: - DAC_READ_SEARCH - SYS_NICE environment: MYSQL_SERVER: db MYSQL_USER: koha_teolib MYSQL_PASSWORD: Change-Me-Mysql DB_NAME: koha_teolib MEMCACHED_SERVERS: memcached:11211 MB_HOST: rabbitmq depends_on: - db - rabbitmq - memcached volumes: - koha-data:/var/lib/koha rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins networks: - koha-net db: image: mariadb:11 container_name: mariadb-koha hostname: db volumes: - mariadb-koha:/var/lib/mysql environment: MARIADB_ROOT_PASSWORD: Change-Me-Mysql MARIADB_DATABASE: koha_teolib MARIADB_USER: koha_teolib MARIADB_PASSWORD: Change-Me-Mysql networks: - koha-net memcached: image: memcached container_name: memcached hostname: memcached networks: - koha-net volumes: koha-data: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/koha o: bind mariadb-koha: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/mariadb o: bind rabbitmq-plugins: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins o: bind networks: koha-net: driver: bridge ipam: config: - subnet: 172.18.0.0/16 gateway: 172.18.0.1 -Please set a secure password for your mara db: This needs updated in the Koha section and the db section. MYSQL_PASSWORD: Change-Me-Mysql Edited April 18, 20251 yr by bmartino1 Data
April 19, 20251 yr Author Thanks so much for the detailed explanation - It's great there is a docker and thanks for posting the stack information - That is exactly what I was looking for. Unfortunately I am getting an error message I am not so sure how to get rid of. I did download Rabbit MQ before running the stack and tried uninstalling it and reinstalling it - So perhaps I am get getting the error message because of that? I'm not sure if you know how I could fix this? I tried uninstalling the the Rabbitmq I had previously installed too because I guess the stack installs it anyway - I still receive the same error though. Thanks again for the help! Edited April 19, 20251 yr by Jamyang_Server
April 19, 20251 yr Community Expert 3 hours ago, Jamyang_Server said: Thanks so much for the detailed explanation - It's great there is a docker and thanks for posting the stack information - That is exactly what I was looking for. Unfortunately I am getting an error message I am not so sure how to get rid of. I did download Rabbit MQ before running the stack and tried uninstalling it and reinstalling it - So perhaps I am get getting the error message because of that? I'm not sure if you know how I could fix this? I tried uninstalling the the Rabbitmq I had previously installed too because I guess the stack installs it anyway - I still receive the same error though. Thanks again for the help! not sure to be honest. the error you have has somehtign to do with teh compose fiel in this section: rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins networks: - koha-net and the volume section where we mount a folder path for it. rabbitmq-plugins: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins o: bind Quote Error response from daemon: source ... /enabled_plugins is not a directory means Docker tried to mount a volume into /etc/rabbitmq/enabled_plugins, but the source path you're mapping from is not a directory This is why we made a data path to specfy where teh data is saved at. mkdir -p /mnt/user/appdata/koha-docker/data/ mkdir -p /mnt/user/appdata/koha-docker/data/koha mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins -If you don’t need custom plugins right now, you can comment out or remove the mount entirely, and RabbitMQ will run fine with defaults: adding a "#" #version: "3.9" services: koha: image: teogramm/koha:24.11 container_name: koha hostname: koha ports: - 8080:8080 - 8081:8081 networks: - koha-net cap_add: - DAC_READ_SEARCH - SYS_NICE environment: MYSQL_SERVER: db MYSQL_USER: koha_teolib MYSQL_PASSWORD: Change-Me-Mysql DB_NAME: koha_teolib MEMCACHED_SERVERS: memcached:11211 MB_HOST: rabbitmq depends_on: - db - rabbitmq - memcached volumes: - koha-data:/var/lib/koha rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: # - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins networks: - koha-net db: image: mariadb:11 container_name: mariadb-koha hostname: db volumes: - mariadb-koha:/var/lib/mysql environment: MARIADB_ROOT_PASSWORD: Change-Me-Mysql MARIADB_DATABASE: koha_teolib MARIADB_USER: koha_teolib MARIADB_PASSWORD: Change-Me-Mysql networks: - koha-net memcached: image: memcached container_name: memcached hostname: memcached networks: - koha-net volumes: koha-data: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/koha o: bind mariadb-koha: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/mariadb o: bind # rabbitmq-plugins: # driver: local # driver_opts: # type: none # device: /mnt/user/appdata/koha-docker/data/rabbitmq_plugins # o: bind networks: koha-net: driver: bridge ipam: config: - subnet: 172.18.0.0/16 gateway: 172.18.0.1 then koha should be accessble at unraids ip at prt 8080
April 19, 20251 yr Author I think I didn't add the date path which you specified, where would I input this: mkdir -p /mnt/user/appdata/koha-docker/data/ mkdir -p /mnt/user/appdata/koha-docker/data/koha mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins sorry if simple questions I am new to all this
April 19, 20251 yr Author 4 minutes ago, bmartino1 said: -If you don’t need custom plugins right now, you can comment out or remove the mount entirely, and RabbitMQ will run fine with defaults: adding a "#" Also I tried without the plug-in but it didn't seem to launch - it seems the plug-in is integral to the launching of the app
April 19, 20251 yr Author 18 minutes ago, bmartino1 said: rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - rabbitmq-plugins:/etc/rabbitmq/enabled_plugins networks: - koha-net Okay bingo, I managed to get it to launch by changing the section you specified and using the directory in the error message to make them match - we are up and running, thanks so much for the support! This will be so beneficial for our centre
April 19, 20251 yr Community Expert The root problem is that RabbitMQ expects /etc/rabbitmq/enabled_plugins to be a file, not a directory Your good. Let me make a step by step order. thats my bad. we may need to start over. this means delete the stack and delete the remaining folder on disk. rm -rf /mnt/user/appdata/koha-docker With the stack removed, we can start over... so steps 1 are the make paths steps. this is where we use the git clone for the repo to have its data to what i'm running. This is to assist the docker and to have a known code of whats running. Commands to run to make the correct folder / files and directory... cd /mnt/user/appdata/ git clone https://github.com/teogramm/koha-docker.git cd koha-docker/ ls This is where the docker compose file will live and be used for additional data latter... mkdir -p /mnt/user/appdata/koha-docker/data/ mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins touch /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins chmod 777 -R /mnt/user/appdata/koha-docker/ chown nobody:users -R /mnt/user/appdata/koha-docker/ Each docker need its own place to mount and store data. /mnt/user can't be used. Either a folder pre created, or a share to point for space. with data path known, I then make the docker in the web ui. lets make a stack then edit stack and paste the docker compose: Let me run it and test and get it work use this compose in the end... #version: "3.9" services: koha: image: teogramm/koha:24.11 container_name: koha hostname: koha ports: - 8080:8080 - 8081:8081 networks: - koha-net cap_add: - DAC_READ_SEARCH - SYS_NICE environment: MYSQL_SERVER: db MYSQL_USER: koha_teolib MYSQL_PASSWORD: Change-Me-Mysql DB_NAME: koha_teolib MEMCACHED_SERVERS: memcached:11211 MB_HOST: rabbitmq depends_on: - db - rabbitmq - memcached labels: net.unraid.docker.webui: http://[IP]:[PORT:8080] net.unraid.docker.icon: folder.view: koha-docker net.unraid.docker.managed: 'composeman' rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins networks: - koha-net labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' db: image: mariadb:11 container_name: mariadb-koha hostname: db volumes: - mariadb-koha:/var/lib/mysql environment: MARIADB_ROOT_PASSWORD: Change-Me-Mysql MARIADB_DATABASE: koha_teolib MARIADB_USER: koha_teolib MARIADB_PASSWORD: Change-Me-Mysql networks: - koha-net labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' memcached: image: memcached container_name: memcached hostname: memcached networks: - koha-net labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' volumes: mariadb-koha: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/mariadb o: bind networks: koha-net: driver: bridge ipam: config: - subnet: 172.18.0.0/16 gateway: 172.18.0.1 -Remember to set the passwords... I added the unraid only additional Labels prompt after clicking ok will then open the stack UI labels where we can make the dockers look nice. the docker will then pull and run by clicking the compose up: at that point koha is runnign and buildign the database.. Edited April 19, 20251 yr by bmartino1 Data - typo
April 19, 20251 yr Community Expert as i'm looking more into this. Reviewing the github and koh comunity forumes... https://github.com/teogramm/koha-docker/blob/main/config-main.env This brings me to the next area with unraid and docker compose. the .env or envrioment file. (this species setting across the docker stack.) env file: # === Shared DB Credentials === MYSQL_SERVER=172.18.0.11 DB_NAME=koha_teolib MYSQL_USER=koha_teolib MYSQL_PASSWORD=Koha_DB_Password-SetME # === MariaDB Root Credentials === MARIADB_ROOT_PASSWORD=Database_Root_Admin_Passwowrd-SetME # === Koha Options === KOHA_LANGS=en ZEBRA_MARC_FORMAT=marc21 # Elasticsearch options # If the USE_ELASTICSEARCH variable is set the # container is set yp to use Elasticsearch. A # Zebra server is spawned inside the container, # otherwise. #USE_ELASTICSEARCH=true #ELASTICSEARCH_HOST= #OVERRIDE_SYSPREF_SearchEngine=Elasticsearch # === Caching and Messaging === MEMCACHED_SERVERS=172.18.0.13:11211 MB_HOST=172.18.0.12 to effectively use the env file we use placeholders... Example Compose file: not the "$" this is a variable that gets passed into the docker... services: koha: image: teogramm/koha:24.11 container_name: koha hostname: koha ports: - 8080:8080 - 8081:8081 networks: koha-net: ipv4_address: 172.18.0.10 cap_add: - DAC_READ_SEARCH - SYS_NICE environment: MYSQL_SERVER: ${MYSQL_SERVER} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} DB_NAME: ${DB_NAME} MEMCACHED_SERVERS: ${MEMCACHED_SERVERS} MB_HOST: ${MB_HOST} KOHA_LANGS: ${KOHA_LANGS} ZEBRA_MARC_FORMAT: ${ZEBRA_MARC_FORMAT} depends_on: - db - rabbitmq - memcached labels: net.unraid.docker.webui: http://[IP]:[PORT:8081] net.unraid.docker.icon: "https://www.icetechnologies.lk/wp-content/uploads/2022/05/koha-library.png" folder.view: koha-docker net.unraid.docker.managed: 'composeman' rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins networks: koha-net: ipv4_address: 172.18.0.12 labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' db: image: mariadb:11 container_name: mariadb-koha hostname: db volumes: - mariadb-koha:/var/lib/mysql environment: MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD} MARIADB_DATABASE: ${DB_NAME} MARIADB_USER: ${MYSQL_USER} MARIADB_PASSWORD: ${MYSQL_PASSWORD} networks: koha-net: ipv4_address: 172.18.0.11 labels: folder.view: koha-docker net.unraid.docker.icon: 'https://github.com/mgutt/unraid-docker-templates/raw/main/mgutt/images/mariadb.png' net.unraid.docker.managed: 'composeman' memcached: image: memcached container_name: memcached hostname: memcached networks: koha-net: ipv4_address: 172.18.0.13 labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' volumes: mariadb-koha: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/mariadb o: bind networks: koha-net: driver: bridge ipam: config: - subnet: 172.18.0.0/16 gateway: 172.18.0.1 I've decided to set static ip docker bridge IP since we are setting the docker network up into the compose file... I've also added pictures to each docker to make unraid look nicer... good luck.
April 19, 20251 yr Community Expert I mention going env file due to the koha docker uses the gitlab found here to make: https://gitlab.com/koha-community/docker/koha-docker Following the docs here: https://koha-community.org/manual/22.05/en/html/installation.html We may need to add additional docker envs https://gitlab.com/koha-community/docker/koha-docker/-/raw/main/env/defaults.env?ref_type=heads such as the username and password for koha. example add to .env file edit stack env file add KOHA_PASS=koha KOHA_USER=koha so the env file will become: # === MariaDB Configuration === MARIADB_ROOT_PASSWORD=P@ssw0rd MARIADB_DATABASE=koha_teolib MARIADB_USER=koha_teolib MARIADB_PASSWORD=Koha_password # === Koha Database Connection (STATIC IPs) === MYSQL_SERVER=172.18.0.11 DB_NAME=koha_teolib# === Shared DB Credentials === MYSQL_SERVER=172.18.0.11 DB_NAME=koha_teolib MYSQL_USER=koha_teolib MYSQL_PASSWORD=Koha_DB_Password-SetME # === MariaDB Root Credentials === MARIADB_ROOT_PASSWORD=Database_Root_Admin_Passwowrd-SetME # === Koha Options === KOHA_PASS=koha KOHA_USER=koha KOHA_LANGS=en ZEBRA_MARC_FORMAT=marc21 # Elasticsearch options # If the USE_ELASTICSEARCH variable is set the # container is set yp to use Elasticsearch. A # Zebra server is spawned inside the container, # otherwise. #USE_ELASTICSEARCH=true #ELASTICSEARCH_HOST= #OVERRIDE_SYSPREF_SearchEngine=Elasticsearch # === Caching and Messaging === MEMCACHED_SERVERS=172.18.0.13:11211 MB_HOST=172.18.0.12 MYSQL_USER=koha_teolib MYSQL_PASSWORD=Koha_password # === Koha Options === KOHA_LANGS=en ZEBRA_MARC_FORMAT=marc21 # === Caching and Messaging (STATIC IPs) === MEMCACHED_SERVERS=172.18.0.13:11211 MB_HOST=172.18.0.12 as I'm not sure of koha pathing nor where the koha-conf.xml file exist to get the username to run the setup... I'm not sure the username/password to setup and finish the install for koha. nor if volume mounts are needed for the koha portion for the docker to save between builds, updates and configurations. I hope this help you.
April 19, 20251 yr Community Expert also we need the example file contents inteh touched file... Quote mkdir -p /mnt/user/appdata/koha-docker/data/ mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins touch /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins chmod 777 -R /mnt/user/appdata/koha-docker/ chown nobody:users -R /mnt/user/appdata/koha-docker/ the commands that should be ran our: # Create necessary folders and plugin file mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins # Write the correct plugin list to the file (Erlang format) echo "[rabbitmq_stomp]." > /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins # Set correct permissions for Unraid chmod 777 -R /mnt/user/appdata/koha-docker/ chown nobody:users -R /mnt/user/appdata/koha-docker/
April 19, 20251 yr Community Expert so to recap to add adataionl to get moving forward more for others who may want to implement koha... In unraid open web terminal and run the following commands... #Gitclone the docker sytem we are using: cd /mnt/user/appdata/ git clone https://github.com/teogramm/koha-docker.git cd koha-docker/ ls # Create necessary folders and plugin file mkdir -p /mnt/user/appdata/koha-docker/data/mariadb mkdir -p /mnt/user/appdata/koha-docker/data/rabbitmq_plugins # Write the correct plugin list to the file (Erlang format) echo "[rabbitmq_stomp]." > /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins # Set correct permissions for Unraid chmod 777 -R /mnt/user/appdata/koha-docker/ chown nobody:users -R /mnt/user/appdata/koha-docker/ make the stack point to correct folder as shown in pictures able... paste in the updated unraid compose file. services: koha: image: teogramm/koha:24.11 container_name: koha hostname: koha ports: - 8080:8080 - 8081:8081 networks: koha-net: ipv4_address: 172.18.0.10 aliases: - koha dns: - 172.18.0.1 - 192.168.2.1 - 8.8.8.8 cap_add: - DAC_READ_SEARCH - SYS_NICE environment: MYSQL_SERVER: db MYSQL_USER: koha_teolib MYSQL_PASSWORD: KohaP@ss DB_NAME: koha_teolib MEMCACHED_SERVERS: memcached:11211 MB_HOST: rabbitmq KOHA_LANGS: en ZEBRA_MARC_FORMAT: marc21 USE_BACKEND: 1 USE_APACHE2: 1 USE_CRON: 1 USE_Z3950: 1 healthcheck: test: ["CMD-SHELL", "curl -s -f http://localhost:8081 || exit 1"] interval: 10s timeout: 5s retries: 10 start_period: 60s depends_on: db: condition: service_healthy rabbitmq: condition: service_healthy memcached: condition: service_started labels: net.unraid.docker.webui: http://[IP]:[PORT:8081] net.unraid.docker.icon: "https://www.icetechnologies.lk/wp-content/uploads/2022/05/koha-library.png" folder.view: koha-docker net.unraid.docker.managed: 'composeman' rabbitmq: image: rabbitmq:3 container_name: rabbitmq hostname: rabbitmq volumes: - /mnt/user/appdata/koha-docker/data/rabbitmq_plugins/enabled_plugins:/etc/rabbitmq/enabled_plugins networks: koha-net: ipv4_address: 172.18.0.12 aliases: - rabbitmq dns: - 172.18.0.1 - 192.168.2.1 - 8.8.8.8 healthcheck: test: ["CMD", "rabbitmq-diagnostics", "check_port_connectivity"] interval: 10s timeout: 5s retries: 10 start_period: 10s labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' db: image: mariadb:11 container_name: mariadb-koha hostname: db volumes: - mariadb-koha:/var/lib/mysql environment: MARIADB_ROOT_PASSWORD: P@ssw0rd MARIADB_DATABASE: koha_teolib MARIADB_USER: koha_teolib MARIADB_PASSWORD: KohaP@ss networks: koha-net: ipv4_address: 172.18.0.11 aliases: - db dns: - 172.18.0.1 - 192.168.2.1 - 8.8.8.8 healthcheck: test: ["CMD-SHELL", "[ -d /var/lib/mysql/koha_teolib ]"] interval: 10s timeout: 5s retries: 10 start_period: 30s labels: folder.view: koha-docker net.unraid.docker.icon: 'https://github.com/mgutt/unraid-docker-templates/raw/main/mgutt/images/mariadb.png' net.unraid.docker.managed: 'composeman' memcached: image: memcached container_name: memcached hostname: memcached networks: koha-net: ipv4_address: 172.18.0.13 aliases: - memcached dns: - 172.18.0.1 - 192.168.2.1 - 8.8.8.8 labels: folder.view: koha-docker net.unraid.docker.managed: 'composeman' volumes: mariadb-koha: driver: local driver_opts: type: none device: /mnt/user/appdata/koha-docker/data/mariadb o: bind networks: koha-net: driver: bridge ipam: config: - subnet: 172.18.0.0/16 gateway: 172.18.0.1 -Update and change your wanted passwords... run the container. I've added health checks to make sure the docker runs and database are up before continuing... go to the web ui whcih should be urnaid host IP at port 8081 and finish kohal setup per compose file above the login will be: some and most are already in the docker image and compose has already set the settings: filling out your otpions wanted.. I'm leaving defualts as this is proff of concempt and updated compose to assit in a easer transation and run on unraid. the last of the installer to finish the build: at this point you should be good to go as koha is function and working...
April 19, 20251 yr Community Expert as by the time your at the library inputs your port 8080 is avilable for your patrons.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.