issue in moodle trasfer from one pc to client offline pc

issue in moodle trasfer from one pc to client offline pc

by Abhay . -
Number of replies: 26

actually i am an e learning developer and using moodle for a course development and transfer the moodle in client pc which is a device without internet connection so during testing i am not getting any solid way to transfer moodle environment i.e mysql php apache2. i tried apt repository method but it failed if anyone experienced in transfering moodle from one pc to another offline pc please help me

reply asap 

Average of ratings: -
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
From what you wrote, Course backup > copy to a portable medium > postal or courier service > Course restore seems to be the way.
 
BTW, there is a neat solution for off-line Moodles. Visit https://moodlebox.net/.
Average of ratings: Useful (1)
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
It appears that you are trying a "migration." See the Moodle docs about this.

You will probably need to provide a lot more details. What versions of Moodle? What software are you using on the PCs? What documentation are you following to do what you wish to do? Is this just for yourself, or for a lab set-up?  And more...
 
Have you ever done this before?
 
The Moodlebox is a solution, but it depends on what you are trying to do.
In reply to Rick Jerz

issue in moodle trasfer from one pc to client offline pc

by Abhay . -
Dear Rick,
Thank you for your guidance.

To clarify our exact situation:
We are migrating Moodle from our local Ubuntu system to a client’s Ubuntu machine that has no internet connectivity at all (air-gapped environment).

Current Status
We are facing issues installing PHP and required PHP extensions (especially php-mysql) in the offline system.
Moodle version: 5.1.1.1
Source system PHP version: 8.3.6
Target system: Same Ubuntu version(24.04.4), but no internet access.

Core Problem
Since the target system has no internet:
1. we installed mysql on client pc but still unsure if the installation work as it is during main transfer
2. sudo apt install php php-mysql fails due to missing repositories.
3. When trying to manually transfer .deb packages, dependency errors occur.

We are unsure how to correctly download and transfer all required PHP packages and dependencies from an online Ubuntu machine to the offline one.

What We Need Guidance On
1. What is the recommended method to install PHP and required extensions (php-mysql, php-xml, php-curl, php-zip, etc.) in a completely offline Ubuntu system?
2. Is there a reliable way to download all dependencies in one go from an online machine and then transfer them?
3. Should we match the exact PHP version (8.3.6) on both systems, or can Moodle run safely on a slightly different minor PHP version?
3. Is there an official Moodle-recommended approach for offline LAMP stack deployment

Our goal is to create a stable, long-term offline Moodle server.

We would greatly appreciate structured guidance on setting up PHP properly in a fully air-gapped environment.
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by James Steerpike -
Picture of Particularly helpful Moodlers
1. What is the recommended method to install PHP and required extensions (php-mysql, php-xml, php-curl, php-zip, etc.) in a completely offline Ubuntu system? I would use apt-get
2. Is there a reliable way to download all dependencies in one go from an online machine and then transfer them?
From my Linux experience, installing new software is not just copying files as there is process (linking libraries, resolving dependencies?) that also needs to happen. apt handles all this.
3. Should we match the exact PHP version (8.3.6) on both systems, or can Moodle run safely on a slightly different minor PHP version? Not required, You need to set up a LAMP environment on the target machine that meets Moodle requirements.
Is there an official Moodle-recommended approach for offline LAMP stack deployment Not aware of any.
Your problem is the client computer does not have a LAMP stack ready to run Moodle. LAMP comes first - you have Ubuntu, but you need a HTTP server, and a database and php which meet moodle requirements for extensions and version number. Once your client machine can deliver php pages over the network , you can put the Moodle zip on a USB and install Moodle offline. it is the client that is holding you up - you can't install Moodle until the framework is there.
 
 sudo apt install php php-mysql fails due to missing repositories.
If you are not specifying an incorrect version number or mispelled, the problem is in the repositories. Maybe they are missing or disabled. If so, the client has a broken machine by accident or choice. 
 When trying to manually transfer .deb packages, dependency errors occur.
Takes me back to the early days of Linux when I downloaded random deb packages. Are you getting the right packages? A package manager is a far better way to install software. 
We are unsure how to correctly download and transfer all required PHP packages and dependencies from an online Ubuntu machine to the offline one.
You don't. You set up a stable LAMP server using a stable Ubuntu build, apt update and apt upgrade to get the latest packages and then install  php, a web server and a database using a package manager, Then with  a reliable working webserver, you use git to install Moodle.
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by Marvin H -
Picture of Particularly helpful Moodlers
We would greatly appreciate structured guidance on setting up PHP properly in a fully air-gapped environment.

This is not really a moodle problem. And i belive there are not a lot of people here that have a fully air-gapped setup (at least non that was offline from the setup-stage or that still gets updated). 

In my opinion the easiest way is just to ask AI.
Then you will get something like:
OFFLINE PHP INSTALLATION ON UBUNTU (METHOD 1 – USING apt‑rdepends)
Prerequisites (both machines must match):

One Ubuntu machine with internet
One Ubuntu machine without internet
Both must use the same Ubuntu version and architecture (check with lsb_release -a and uname -m) 

STEP 1 — Download all PHP packages on the online machine
Install apt‑rdepends:
sudo apt update
sudo apt install apt-rdepends

Create a folder for the offline packages:
mkdir ~/offline-packages
cd ~/offline-packages

Generate a dependency list for PHP:
apt-rdepends php | grep -v "^ " | tr '\n' ' ' > dependencies.txt

Download all required .deb files:
apt download $(cat dependencies.txt)

(All PHP packages and dependencies will now be in the folder.)

STEP 2 — Transfer the folder to the offline machine
Copy using a USB drive:
cp -r ~/offline-packages /media/usb
On the offline machine:
cp -r /media/usb/offline-packages ~/

STEP 3 — Install PHP offline on the offline machine
Switch to the folder:
cd ~/offline-packages

Install all .deb packages:
sudo dpkg -i *.deb

Fix missing dependencies if needed:
sudo apt --fix-broken install
In reply to Marvin H

issue in moodle trasfer from one pc to client offline pc

by James Steerpike -
Picture of Particularly helpful Moodlers

The AI solution to a client machine which can't use the apt package manager? Download on another machine, transfer with a USB drive and then use the package manager on the client machine we couldn't use before to resolve dependencies. Electricity wasted. 

Windows are making updates impossible on older computers. Grab one of these obsolete machines, learn some Linux, install a LAMP stack and sidestep the air gapped machine. I presume the air gap is for security, for a critical client application and you aren't allowed to monkey with it? Another old machine removes the problem and a dedicated box will work fine for Moodle.

In reply to James Steerpike

issue in moodle trasfer from one pc to client offline pc

by Marvin H -
Picture of Particularly helpful Moodlers
Saying electricity wasted when you want them to not use one but two systems in the long run is kinda funny smile

I really dont get your awnser? His question is how he installs packages and dependancies without internet and your awnser is, use a Lamp-Stack und install it via apt? How will he do it without internet on his target machine? To use another old unsupported machine is nothing I would reccomend.

That he gets " sudo apt install php php-mysql fails due to missing repositories." Is normal when the client is offline. The machine can´t reach the repositories in the internet. Thats why the only approach I know for his problem is to download on an online machine and then copy the software to the offline machine. Because i didn´t do it in a long time I used ai to give the steps. Have you tried that it dosn´t works that way?

Not sure since when bashing help from others without know-how or an understundig for the problem was acceptable in this forum.
Average of ratings: Useful (1)
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I cannot guide you on setting up Ubuntu. I've never done that. But it must meet Moodle's requirements.

I am unaware of any Moodle 5.1.1.1 version. Perhaps you mean 5.1.3+.

I don't think you need to match PHP versions on both systems. But each system should be meeting Moodle's minimum PHP requirements. In my description of what I did, you will notice that I have different PHP versions, and even MySQL versions.

I am not a LAMP person, but I do use MAMP regularly, and I have installed Moodle on my virtual PC using XAMPP, and also in Laragon.

I assume that you have at least one computer connected to the Internet and something like a flash drive to move files between computers. Otherwise, how do you plan to acquire the software?

Do you plan to use this non-Internet setup for a student lab, or something like that? Or do you plan to have only this one computer run Moodle?

You say that you want a stable, long-term offline Moodle server, but if it is not on the Internet, who is it "serving?"
In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Just occurred to me, it would really help to know exactly what kind of device the, "client PC is?" Is it possible to give it temporary Internet access?

I think the simplest method would be to take the offline PC and if necessary relocate it, temporarily connect it to the Internet, setup your Moodle server and get it working the way you want it to, then disconnect the Internet connection and relocate the PC to the use location. 

In reply to Abhay .

issue in moodle trasfer from one pc to client offline pc

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmm ... 

According to profile for poster:
Account suspended Friday 27th February 2:49 PM after being blocked from posting (error code: 8GLTC).

The problem:
"the target system has no internet:"

"We are migrating Moodle from our local Ubuntu system to a client’s Ubuntu machine that has no internet connectivity at all (air-gapped environment)."

Possible solution involves connectivity at client location.

From Gemini: "Starlink grant connect remote location"

Starlink
is actively used to connect remote, rural, and underserved locations, with increasing support from government grants to bridge the digital divide. It provides high-speed, low-latency internet to areas with no traditional infrastructure, such as remote farms, mountain cabins, and villages.

Installation: Requires an unobstructed view of the sky, often installed on roofs or in open areas.

Power Requirements: In locations without grid power, systems can be powered by solar or wind energy.

Flexibility: The "Roam" service allows users to take their equipment to different remote locations.

Am not able to provide specific contacts for such a program grant but take a look at
https://starlink.com/support/article/c977d85e-ae57-e59c-6051-5689fb7a9cd7#:~:text=Starlink%20offers%20both%20fixed%20and%20mobile%20service,more%20data%2C%20and%20add%20additional%20service%20locations.

https://eulerapp.com/starlink
offers a search form where one can choose country, language, industry

'SoS', Ken

In reply to Ken Task

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Pity! I was keen to hear more about this air gap. _Gap_, yes, but with air, right? Not a vacuum? Not in space? No death zone. Then why can't Prometheus walk across carrying the hard disk, or a SSD, with him?

Unfortunately, I remembered the original name of our visitor. Following that clue, I found an avatar left behind:

 
Looks like a gamer, perhaps a Gen Z. He sent a whole team of Boomers spiralling. Kudos to the youngster.
wink
In reply to Visvanath Ratnaweera

issue in moodle trasfer from one pc to client offline pc

by Ken Task -
Picture of Particularly helpful Moodlers

What's the error code mean?

Doesn't mean a 'gamer' can't have a valid and useful project for education purposes!

"a whole team of Boomers spiralling" ... not spun out here!  Just pointed to possible resources for solution.  But don't think I'll engage individually either! smile

'SoS', Ken

In reply to Visvanath Ratnaweera

issue in moodle trasfer from one pc to client offline pc

by Ken Task -
Picture of Particularly helpful Moodlers

'air_gap' ... if the poster is truely GenZ, they tend to think of networking in terms of wireless ... not wire.

Actually, many moons ago, in former working life in which I connected school districts to the internet for the first time ... the following 'experience' happened ...

Got a call from a campus technologist one week and requested I meet him on his campus Saturday AM.  He had an internet server with a static private IP address and a public IP address assigned and configured - a web server.   Worked from Monday thru Friday ... but not on weekends and he could not figure out why.

The district Technology Directory/Network administrator 'air_gapped' his entire wide area private network every weekend, beginning 5PM Friday until 8AM Monday by unplugging the one cat 6 wire that connected the upstream router to the wide area LAN.

Reason ... he didn't want to get emails or phone calls about internet issues on weekends.

That Tech Director/Network admin didn't finish the year in that position - which, at the time, was unusual as Tech Directors/Network Admins held more power in a local ISD than the Superintendent of the ISD.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

issue in moodle trasfer from one pc to client offline pc

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

Hi Ken

On:

Doesn't mean a 'gamer' can't have a valid and useful project for education purposes!

But the complication was that the OP was allegedly not a 'gamer' rather an e-learning developer.

"a whole team of Boomers spiralling" ... not spun out here! 

Luckily. Can't help thinking of the The Lobster Quadrille.
smile

 if the poster is truely GenZ, they tend to think of networking in terms of wireless ... not wire.

LOL. Made my day!

Got a call from a campus technologist one week [..]

Belongs to the category WHO? ME? 

In reply to Visvanath Ratnaweera

issue in moodle trasfer from one pc to client offline pc

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

If you are jailed, there’s no technology solutions affordable, you can’t connect anywhere, dot.

In reply to Sergio Rabellino

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Why not? There are all kinds of jailbreak software: Xbox jailbreak, iPhone jailbreak, etc. So, depends on the jail you are in.
smile
In reply to Visvanath Ratnaweera

issue in moodle trasfer from one pc to client offline pc

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I was talking about physical prison/jail, not about computer jails… I did in the past a project to support people behind bars who would like to study to change their life at the term of the sentence.

A typical constraint it’s not to connect their PCs to internet neither temporarily and you can’t get the PCs out of the prison to install anything…

In reply to Sergio Rabellino

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
(Physical) prisons? I understand. We shouldn't be talking about El Chapo kind of things on other peoples web sites!
smile

Now seriously, I thought you knew me. For my defense, there was a smiley strategically placed. For some quirky reason our friend's air gap shoved me. Not only myself, I would say, but others don't want to hear that.

If no computers, no storage media, no phone lines, no wireless, no GPRS, no 5G, no Starlink allowed, how our friend's bits and bites cross the air gap is a great puzzle. Unfortunately he was locked out - so, we will never know the answer.
In reply to Ken Task

issue in moodle trasfer from one pc to client offline pc

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Ken, you raise a good point about "Internet connectivity," using Starlink.

Starlink can be a good solution for anyone claiming they can't connect to the Internet. I am one of many who own a Starlink, and I can attest that it works quite well. I use it when I am traveling with my RV trailer. My model is the one that requires a bit more energy. There's a new model that is portable, and requires less power, but provides less speed. When I don't have my RV trailer connected to "shore" power, I use a gas-powered generator for electricity.
 
Two summers ago, I attended MountainMoot, traveling with my trailer and got permission to park in the Carroll College parking lot.  The parking lot did not have "shore" power or Internet, so I used my generator for electricity.  Yep, had Internet via Starlink.  I'll attach a few photos for those who might not believe me.  I felt right at home.  Martin wasn't attending this Moot, so I couldn't invite him over for a cocktail or drink. 😇

Of course, Starlink is not free (unless Elon is generous enough to give you one, which he has actually done for folks a few times.) You need to buy the device and then pay a monthly fee. Cost varies based on the different options and features.

However, Starlink needs good visibility of the sky. I typically try to get unshaded campsites (no trees above my trailer). So I would say it needs a "fairly unobstructed" view of the sky.

I don't use wind or solar to power my Starlink. As mentioned above, I will use a generator when needed.

I'm not a Starlink salesperson, just a simple user.
Attachment Rick at 2024 MountainMoot.jpg
Average of ratings: Useful (1)
In reply to Rick Jerz

Gas-powered Moodle for the nomad :-)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Isn't that cool!

Mount a strong wireless antenna on the roof of the trailer (or the next tree) and you can supply a whole camping site gas-powered Moodle, autographed by Martin D.!
 
Say, No! to Elon and your Moodle is "air-gapped"!
In reply to Rick Jerz

issue in moodle trasfer from one pc to client offline pc

by Ken Task -
Picture of Particularly helpful Moodlers

@Rick ... thanks for confirming StarLink would work in OP's case.

Can't tell from the pics, but I'll offer one more piece of advice if you do what you described often .... find a way to anchor your power supply and starlink so that someone couldn't 'walk away with them' late at night and you are sound asleep.    OR, add security cameras that monitor that external equipment and would give a loud alert as well as video the activity.   Just can't trust folks there days, sad to say! sad

'SoS', Ken

In reply to Ken Task

issue in moodle trasfer from one pc to client offline pc

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Thanks for your comments, Visvanath and Ken.

@ Visvanath. Some folks do mount their Starlink to the top of their RV. I don't because I prefer having the ability to easily move it around to achieve the best signal. Yes, more than one person can use Starlink's Internet. At a family camping reunion last summer, we had 10 family members sharing our signal. Right now, Elon is "king" of the satellite airways. I sensed that you would be a bit opposed to this whole Starlink concept.

@Ken. Theft is a concern, but a small concern. When I was at the conference during the day, I put the generator in the back of my pickup and the Starlink inside. When I have a concern at night, I do the same thing. Many campsites have "quiet hours" when you cannot run your generator. Typically after 10 PM. By then, it's time for my bedtime.
In reply to Rick Jerz

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Rick, it is not the Starlink concept I am opposed to, I can't hear about the "king" behind it. The two kings running amok and destroying a great nation, with their full endorsement, it is a nightmare. Now, if we go that line, this conversation will never end.

Back to earth, I like the picture of 10 family members sharing food and the Web. A modern dessert caravan, I'd say.
smile

I'm serious: I too enjoy it very much, when I can do something virtual, on the laptop, from the least expected places and still being able to push it to the Internet ultimately to be distributed to all others corners of the globe. I have even configured my laptop to be still useful without Internet, for example a mail spool, I can "send" mail to, when off-line, which relay them on its own, when the machine goes on-line.
In reply to Visvanath Ratnaweera

issue in moodle trasfer from one pc to client offline pc

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yes, we had Internet in remote places, like this.  This was "no place" in the state of Wyoming.

Attachment 20230925-Big Piney WY_03.jpg
In reply to Rick Jerz

issue in moodle trasfer from one pc to client offline pc

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Can't be too far from the Moon. Is there an atmosphere? Otherwise we can't talk of an air-gap.
lächelnd

I'm submitting this in a second browser tab, since the original one repeatedly refused:

Notice the missiong CloudFlare button.