Running Moodle without the Internet

Running Moodle without the Internet

by James Noxon -
Number of replies: 13

Hi Moodle-ers,


I have a music school in the Kingdom of Tonga (South Pacific) where the Internet is expensive. I am going to spend the next few months building a webserver for Moodle and put my courses on it. In use the students will access the server through WiFi on their smartphone, tablet, or laptop. There won't be any Internet, so I won't be using the e-mail options most likely (although it would be possible it seems silly for the students to have an Intranet e-mail just for this purpose). I am in the USA for a spell (recovery from broken leg, actually) so I have Internet while I am setting things up, and I can get the server on Internet from time to time once I get back to Tonga, but we pay "by the bit" for Internet access, so we can't have it where students would just run up the bill with facebook-ing. Other than the e-mail thing, what are the issues of running Moodle without Internet access?

Here's the install I am expecting to start out with:

Linaro Ubuntu Server 13.04 Raring Ringtail w/Servers: Mail, DNS, Tomcat, MySQL, Apache 2, JRuby, PHP 5, FTP, Samba, Open SSH

yours - PJ

http://teachtonga.com

Average of ratings: -
In reply to James Noxon

Re: Running Moodle without the Internet

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you mean that you are running on a network in complete isolation then there should be no huge problems. You can just invent your own email addresses. You could even organise your own local email delivery if you are keen. 

In reply to James Noxon

Re: Running Moodle without the Internet

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
First thing, moving a Moodle installation from one machine to another is simple. See https://docs.moodle.org/en/Moodle_migration. (Well, you need to practice it at home.)

Therefore you have many options:
Stage 1. Install Moodle in the US when Internet is cheap. The server could be anything. At a hosting provider, on your own machine in your (home) LAN, on your desktop/laptop or even on a virtual machine on your desktop/laptop. See https://docs.moodle.org/en/Category:Installation. Since the target machine will be Ubuntu Linux, the same thing for your test installation wouldn't be a bad choice. Ref. https://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu

Stage 2. On site. Did you say the students access Moodle in the same (school) premises? Are they in the same LAN or a group of (internally routed) LANs which do not depend on Internet? Then you don't even need a hosting provider! Get a tiny server like Zotac ZBOX in the US and go through Stage 1 and take it with you to the site!

Out of the services you mentioned, Moodle just needs LAMAP. No Tomcat, no JRuby. Take SFTP instead of FTP (since you'll have SSH anyway, that's trivial). DNS depends. Mail too.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Running Moodle without the Internet

by James Noxon -

Very helpful, good, good. Yes I would be building this on a single board computer called Odroid, see:

http://forum.odroid.com/viewtopic.php?f=8&t=2270

I hope to be able to do everything myself, someday, but this pre-built distro will save me a lot of grief as I get my sea-legs. The students would be accessing the server via it's own Wi-Fi dongle, or perhaps I would use an access point if I can't figure out how to ad-hoc 10 students within it's Ubuntu universe. The tiny Odroid even has it's own UPS which can run for a couple hours, good in a place with frequent power outages! There's only 2 Gb RAM and it's not expandable, but this should be enough to get started with. It can fit a 64Gb eMMC 'hard drive' with (supposedly) 160Mb/sec access rate, plus a 64Gb capacity micro SD card reader. I was expecting to put the OS/apps on the eMMC and the course files on the SD but it's access rate will be slower - does this seem feasible?

Also what is the second 'A' in LAMAP?

In reply to James Noxon

Re: Running Moodle without the Internet

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are welcome!

> I would be building this on a single board computer called Odroid, see:
> http://forum.odroid.com/viewtopic.php?f=8&t=2270

I am skeptical:
- I know RaspberryPi. It is not suitable as a Moodle server. Just too weak CPU (powerful GPU though).
- You have other hardware limits like RAM, permanent storage
- You don't know whether those tailer maid systems support special mechanisms like various caches, PHP modules which Moodle needs/recommends
- You are dependent on that group that they maintain the system and keep uptodate (Moodle is bleeding edge)

If you going to carry your own server their are varios alternatives. Small servers like ZBOX already mentioned. Even moder NAS from Synology/QNAP are very versatile. Have the advantages:
a) Linux but packaged in a GUI called DSM
b) all packages including Moodle(!) are in their repositories
c) if they are outdated you have the real command line
d) powerful enough for Moodle (dual core)
e) huge reserve in disk space.
f) built-in energy save mode

In any case don't put a huge server there like the Windoofs. It'll just cook energy.

> I hope to be able to do everything myself, someday, but this pre-built distro will save me a lot of grief as I get my sea-legs.

I forgot to tell you, installing a Ubuntu server on standard Intel hardware is child's play. (See their web site). Installing LAMP and Moodle is well documented in the Moodle Doc I've given earlier. Don't be afraid of these things. Just install/break/clean/reinstall to get the confidence.

> The students would be accessing the server via it's own Wi-Fi dongle, or perhaps I would use an access point if I can't figure out how to ad-hoc 10 students within it's Ubuntu universe.

Unlike Microsoft which sells "Windows networks" Unix (including Linux which is the system in Ubuntu) do networking with TCP/IP. The server can have a wireless sender but it is unusual. You connect it to a switch and an access point to the same switch. The wi-fi clients connect to the access point in "infrastructure" mode and get get their network configuration through DHCP.

In any case all are within a LAN. Simplies the job.

> The tiny Odroid even has it's own UPS which can run for a couple hours, good in a place with frequent power outages! There's only 2 Gb RAM and it's not expandable, but this should be enough to get started with. It can fit a 64Gb eMMC 'hard drive' with (supposedly) 160Mb/sec access rate, plus a 64Gb capacity micro SD card reader. I was expecting to put the OS/apps on the eMMC and the course files on the SD but it's access rate will be slower - does this seem feasible?

See above.

> Also what is the second 'A' in LAMAP?

It was a typo.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Running Moodle without the Internet

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Oops, timed out!
sad

Forget that "tailer maid", it should read "tailor made".
In reply to Visvanath Ratnaweera

Re: Running Moodle without the Internet

by James Noxon -

Again, thank you so very much for your kind assistance.

I appreciate your encouragement. I was looking into working with Linux a couple of years ago, when I got my new(-ish) laptop, so I left significant space on the HD to install Mint or Ubuntu. But at that time the new hardware was UEFI boot and Ubuntu was not ready for that, with many recommending blowing UEFI off or outlining a somewhat complex procedure to fix the problem, so I got scared off. It's one thing to play around with 'bricking' my laptop while I am in the USA, and another to risk that while I am overseas where there is less than no competent technical assistance available!

I looked at the ZBOX, and it has the advantages of a DVI video, which for me is good because we have a great many VGA monitors at the school, but no HDMI monitors right now so I was going to have to get one and bring it back in my luggage - with the possibility of damage. In looking at the power, well it is less powerful than the Odroid (dual core 1.8Ghz vs. quad core 1.92Ghz.), so if it can run Moodle then Odroid can as well. I have read an article online where someone detailed installing and running Moodle on a Raspberry Pi, which convinced me this was not a good way to get started. The biggest advantage of ZBOX would be the expandable RAM, where the Odroid is stuck at 2 GB, but this would be sufficient for starting out I believe. Also the ZBOX is a bit more expensive.

Which one did you indicate has Moodle in it's repositories? I looked and couldn't find this information.

QNAP, Zotac, or Synology

thanks again so much - professor james

In reply to James Noxon

Re: Running Moodle without the Internet

by Colin Fraser -
Picture of Documentation writers Picture of Testers

The Synology NAS has Moodle as a downloadable package, don't know about the others... Depending on the model of NAS you acquire, you can have a great deal of HDD storage, but I am not too sure of the processor power. It helps if you have a great deal of knowledge of Linux...

Using a Raspberry Pi, on its own is not going to be too successful with more than about 4  users, I think, but if you had say, 8 or 16 of them in an array, that would give you so much processing power... what a thought. I don't know how easy it would be to set up but just 4 of them would give the equivalent of a recent processor - but 16 would be reaching over a TB of processing power, way beyond anything currently available in the PC range- and it would still be easily scalable. Could the same be done with an Odroid? I don't know anything about them but if it is similar technology, could it be set up the same? Numbers in an array with ridiculously huge combined processing power. 

If you are looking at costs being a major factor, then the Raspberry Pi or Odroid solution is the most obvious or perhaps a blended solution. Some smartie tech whiz might be able to cobble up a couple of hard drives in a Raspberry Pi array. This would be beyond me but I know there are people out there who do things no sane person would try and get them to work - only because no one tells them it won't work. For what I can tell of your situation, imagination is going to be a huge factor in the success of your operations. Good luck.  

In reply to James Noxon

Re: Running Moodle without the Internet

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

I have the feeling that we are getting talkative and would suggest concentrating on your particular case.

As I see it:
a) it is a small Moodle site, say max. of 10 to 20 people logged in at a given time, and not all taking an online exam exactly in the same minute

b) server and the clients are all in one LAN or a number of internally connected LANs. i.e. they communicate without the Internet, and the Internet is expensive

c) other than looking into Linux a couple of years ago you have no Unix/Linux experience

d) other than perhaps your pocket money there is no budget worth mentioning

Here are some independent facts:
1. running/installing Linux on state-of-art (powerful) desktop machines is the easiest followed by weaker machines like laptops or bare-bones (ZBOX), then desktop virtualizaions (VMware, VirtualBox) and finally the embedded systems (Atmel, RaspberryPi, Shiva Box, ...)

2. contrary to common belief a small server needs much less resources that a noob's desktop

3. embedded systems are very weak as servers

4. Moodle demands much more resources than the most LAMP software

5. Installing LAMP is much easier than most people expect, the same for installing Moodle "manually" on LAMP and moving Moodle installations between LAMP servers - provided that one is not scared of the Unix/Linux command line.

6. the least cumbersome way of managing a Unix/Linux server remotely is the command line in a secure shell (SSH)

Putting those things together I would say, there are not that many realistical solutions for you in the short term. I would say the first 2 or three things in item 1 together with items 5 and 6.

Well, in your setup, you also needs some understanding of basic networking. I would imagine there are local network administrators you can contact on site. During your tests in US don't worry about networking, just use a private IP address (rather than a domain name) in your LAN.

Once you have that going on site, with the gathered experience and knowledge of the local situation, plan the next version.

P.S. I have played with both Synology and QNAP. Both had DSM. The Moodle version of Synology repos about 4 months ago was 2.4.
In reply to Visvanath Ratnaweera

Re: Running Moodle without the Internet

by Mark Pearson -

James,

I have done some setting up of Moodle on different platforms through the ages and what Visvanath has written above is excellent advice. I would go one step further and say that  it's really worth doing this the 'regular' way that Visvanth describes, ie getting to grips with the technology involved, because it'll save you a lot of major grief in the short and longer term. Remember that Moodle is a 'heavy' system with a good deal of precise requirements from php modules to mysql version and so requires capable hardware and up to date operating system version regardless of number of users. Attempting to run this on the ultra cheap will doubtless lead to intractable problems.

In reply to Mark Pearson

Re: Running Moodle without the Internet

by James Noxon -

It is so wonderful to get this help with my project, thanks to all.

I have a technical background as a UNIX help desk consultant at a university, and ran my own music products manufacturing business designing PCBs and writing OS in assembly code, but this was quite a while ago. At least I remember some command lines:  ls -la, and chmod for example. So I did not know about this category of NAS so thanks for that. A couple of years ago I worked at a business where everyone had a Mac-mini on their desk, and I have seen many of these types of systems coming along which remind me of the ZBOX and Synology units in some ways. All along I had been thinking this first phase was a simple sandbox opportunity and if I can get 5 - 8 students on the server within my sandbox, that is great.

But in the coming years I would need 100 - 200 student capacity so it is more cost effective to get a 'real server' to move Moodle onto. These clever little NAS-type boxes are cool, but I agree that it makes more sense to migrate to a conventional desktop-type server box when the time comes. Of course it will be interesting to see what's available two years from now! I think processor speed/cores along with RAM capacity are the key areas for scaling up, so that favors regular "motherboard based units" at that point.

thanks again - professor James

http://teachtonga.com


In reply to James Noxon

Re: Running Moodle without the Internet

by Colin Fraser -
Picture of Documentation writers Picture of Testers

James, you are quite right, but you do not need to go to expensive server technologies. I once saw a setup from a school in Sydney that was 16 discarded Pentium boxes that had been refurbished with newer HDDs and maximum RAM, then setup in a RAID. That serviced something like 1200 students and faculty, not just a Moodle but it was their school network web server. The guy who set it up was proud of that, and it actually worked pretty well, a lot faster than I expected it to. It was, he said, just a file/web server. 

You can acquire a desktop with a MB that can carry a large amount of RAM and say four HDDs, the largest you can get, that should see you started, and should cope with a modicum of growth. As you need, you may be able to add another box, perhaps with a faster processor... (or maybe not, I seem to remember a mention of a need for uniformity of processors and HDDs for mirroring, but that might have been something else.) 

Just as well, a NAS would also get you started, but I doubt it is easily scalable. Good luck...

In reply to James Noxon

Re: Running Moodle without the Internet

by Jim Pickens -

James

You have gotten some really good advice from what I have read.

Have you looked into used servers? 

For the price of a new desktop you could probably get a two or three older machines with a few years of life left in them. If you could bet multiple of the same make / model you would have redundancy / spare parts. Although shipping may be an issue, old servers are heavy!

Depreciation on hardware is so rapid a 3 year old server might be found for very cheap, just get a spare for parts.

Also have you looked into finding a corporate sponsor who might donate their old hardware for a tax write off?

Just a thought

Best of luck, If you haven't used moodle before, it's worth the effort. I can't imagine going back to teaching without it.


Average of ratings: Useful (1)
In reply to James Noxon

Re: Running Moodle without the Internet

by Danny Wahl -
Hi James, just to answer your original query- if you have a server running DNS then you can definitely do just about everything moodle has to offer, here's the 'gotchas' I can think to look for off the top of my head:

  •  you can create an imap/smtp server that runs on your intranet address and all mail will be deliverable as long as it's routed through your internal DNS server.  This will allow all students to use Email while on campus outside of just for Moodle too- might be beneficial
  • If you don't want to setup a mail server then Moodle messaging is robust- just make sure that you set up default messaging preferences to 'internal' (the pop up in moodle) and disable sending mail
  • Moodle 2.7 comes with mathjax.js via CDN by default, if you want to use mathjax then I suggest you install it on your server before you leave America
  • the same goes for geoip, and other server requirements, aspell, dot, and gd.
  • don't mess around with captcha APIs or Google Maps APIs- these will trigger internet calls
  • IF you're going to install a custom theme watch out for calls to fonts.google.com and fontawesome.io.  you can either change the theme, edit it to use local resources, or add a DNS entry and make it fail or actually serve the file (but then you need to configure an additional VHOST on your server)

 If I were you I'd consider shipping with Ubuntu 14.04 as it's the LTS release and you'll get 5 years of support from Canonical instead of 2.

I would also consider bringing back a proper router and plugging in your server over ethernet- this eliminates one point of failure when it comes time to troubleshoot.  Ad-hoc networks in my experience always get messy, and by bringing a router you're taking the DHCP addressing and management load off of your server- which frees up resources.

As many others have said a single board SOC will probably not run moodle very well.  I know funding is always tight in small schools in the pacific but bringing back a 5 year old Dell laptop will probably get you much much further than that board will- just hit up craigslist.  Our moodle runs on a VM on a mac mini and we support about 150-200 simultaneous logged in users, with 500 users daily.  The main thing is RAM and storage- CPU not so much.  If you're going to have a weaker system make sure that you really really enable caching as much as possible- especially an opcode cache. And don't forget backups big grin

Good luck, and aloha from the North Pacific cool