I am planning a deployment to an area of Indonesia without internet. I would like to install KA Lite on a Synology Diskstation. Has anyone ever successfully done this? Any help is appreciated.
Hi @jon_ronning
I haven’t heard of such a use case, and KA Lite isn’t packaged specifically for Synology.
But since KA Lite bundles its Python dependencies, if you can get Python 2.7 running w/ pip, then you could potentially get KA Lite running, too.
Try this guide to getting pip on Synology, and then try running pip install ka-lite-static
afterwards.
What hardware are you running Synology on btw? NAS devices typically are made for serving static files and have small processors and little memory, which isn’t ideal for running a Kolibri server.
On a further note, I would like to add that if you are starting a new project, using Kolibri is probably a better option. See: https://blog.learningequality.org/startwithkolibri-58227e98dde
We gave it a try but we are getting an error about a missing library. Here is the detailed message.
[ERROR] [2018-10-04 08:56:47,521] cherrypy.error: [04/Oct/2018:08:56:47] ENGINE RuntimeError('can not find library geos_c',)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/kalite/packages/dist/cherrypy/wsgiserver/wsgiserver2.py", line 1353, in communicate
req.respond()
File "/usr/lib/python2.7/site-packages/kalite/packages/dist/cherrypy/wsgiserver/wsgiserver2.py", line 868, in respond
self.server.gateway(self).respond()
File "/usr/lib/python2.7/site-packages/kalite/packages/dist/cherrypy/wsgiserver/wsgiserver2.py", line 2257, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/usr/lib/python2.7/site-packages/kalite/packages/dist/cherrypy/_cptree.py", line 299, in __call__
return app(environ, start_response)
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/core/handlers/wsgi.py", line 255, in __call__
response = self.get_response(request)
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/core/handlers/base.py", line 178, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/core/handlers/base.py", line 220, in handle_uncaught_exception
if resolver.urlconf_module is None:
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/core/urlresolvers.py", line 342, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/lib/python2.7/site-packages/kalite/distributed/urls.py", line 14, in <module>
from . import api_urls
File "/usr/lib/python2.7/site-packages/kalite/distributed/api_urls.py", line 12, in <module>
import kalite.coachreports.api_urls
File "/usr/lib/python2.7/site-packages/kalite/coachreports/api_urls.py", line 3, in <module>
from .api_resources import PlaylistProgressResource, PlaylistProgressDetailResource
File "/usr/lib/python2.7/site-packages/kalite/coachreports/api_resources.py", line 3, in <module>
from tastypie.resources import Resource
File "/usr/lib/python2.7/site-packages/kalite/packages/dist/tastypie/resources.py", line 20, in <module>
from django.contrib.gis.db.models.fields import GeometryField
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/db/models/__init__.py", line 5, in <module>
from django.contrib.gis.db.models.aggregates import *
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/db/models/aggregates.py", line 2, in <module>
from django.contrib.gis.db.models.sql import GeomField
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/db/models/sql/__init__.py", line 2, in <module>
from django.contrib.gis.db.models.sql.query import GeoQuery
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/db/models/sql/query.py", line 4, in <module>
from django.contrib.gis.db.models.fields import GeometryField
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/db/models/fields.py", line 4, in <module>
from django.contrib.gis import forms
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/forms/__init__.py", line 2, in <module>
from django.contrib.gis.forms.fields import GeometryField
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/forms/fields.py", line 8, in <module>
from django.contrib.gis.geos import GEOSException, GEOSGeometry
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/geos/__init__.py", line 6, in <module>
from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/geos/geometry.py", line 16, in <module>
from django.contrib.gis.geos.coordseq import GEOSCoordSeq
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/geos/coordseq.py", line 9, in <module>
from django.contrib.gis.geos.libgeos import CS_PTR
File "/usr/lib/python2.7/site-packages/kalite/packages/bundled/django/contrib/gis/geos/libgeos.py", line 45, in <module>
lib_path = find_library(lib_name)
File "/usr/lib/python2.7/ctypes/util.py", line 242, in find_library
raise RuntimeError("can not find library %s" % name)
RuntimeError: can not find library geos_c
We will definitely look into Kolibri. My previous experience was with KA Lite and I knew it had the functionality I needed, so I started with it. If you guys are running these on a Rasberry Pi, the Synology NAS would be ideal. The model I am testing with now is the DS1517+. Here are the specs https://www.synology.com/en-global/products/DS1517+
We haven’t added any RAM but we can if we need to. I am looking at a more powerful model for the school I want to get this working for. If I can get KA working on a Synology it would be a game changer for them becasue the NAS has all sorts of other functionality that is perfect for a school that doesn’t have interent. It will essentially be a school in a box. You guys should consider talking to Synolgy and packaging Kolibri on it. They do that with other vendors such as Moodle and it works really well.
I would like to cut the explanation a bit short here, but it seems like a C library is missing, and that the error handling in one of the third-party Python libraries that KA Lite uses doesn’t understand that.
Can you edit the file /usr/lib/python2.7/site-packages/kalite/packages/dist/tastypie/resources.py
? I’m not sure which text editor Synology has or how to edit files with administrator privileges… but you could try opening a terminal and writing:
sudo editor /usr/lib/python2.7/site-packages/kalite/packages/dist/tastypie/resources.py
(you would have to replace “editor” with a different program name if it doesn’t work)
Find the line 21 that says:
except (ImproperlyConfigured, ImportError):
Change that to:
except (ImproperlyConfigured, ImportError, RuntimeError):
If this works, perhaps we can release a patched version of KA Lite.
If this doesn’t work, my advice would be to stop trying to make KA Lite work on Synology immediately But I’d be happy to put efforts into getting Kolibri to work on Synology.
Related projects that you should check out, if you haven’t:
I don’t know that any of these would work on a Synology device, that probably relies on if you can get the right supported hardware for running Linux. IIRC, Synology is using their own firmware and not all can be rooted.
I am going to take your advice and put my efforts into Kolibri. I will let you know how it goes. And thanks for what you guys are doing.
We are running Kolibri now and really like it. Quite an improvement over KA Lite and love the additional content. I am still interested in running it on a Synology server in case anyone has had success.
Hi I just read this. I have installed RACHEL with Khan Academy on a Synology server and have written a short guide.
I have installed the 5 bay and 2 bay servers. They both work well. The 5 bay server is serving about 100 machines in Secondary schools in Zambia, though not all running videos
I also install Kolibri on Labtops runninh Raspbian, the raspberry pi distro of Debian.
@giakonda Thank you for all the effort put into these awesome resources!
We’ll explore further ways to make them available for others interested in making Kolibri fly!
Hi Jon, I am trying to install kolibri on a Synology NAS server. But I am unable to install it as synology doesn’t offer apt-get. Were you able to install Kolibri on a Synology NAS server, if so can you please help me do the same?
Hello Safi, I never got a response from anyone so I abandoned that idea. But I still think it would be incredible to have Kolibri run on a Synology. I wish Learning Equality would work with them and have it as an installed app option like the many other third party options. Lately I have been installing Kolibri on old laptops running a version of Ubuntu called Zorin which is really good for education. Installing in Ubuntu is very easy and only a few command lines. And Zorin runs well in old hardware and is free.
Jon
I’ve been doing similar but using the Raspberry Pi software. We also use the Raspberry Pi as workstations.
I have some notes on installing RACHEL on a Synology. I’ve posted them on giakonda.org.uk/resources
Yeah, I wish it worked on the Synology NAS server. I used docker on Synology to make it work and it’s working now.
Safi, I haven’t used docker before. Can you share what you did? Can you run the app get install command on it?
Jon
I followed this document
Let me know if you run into any issues