---
title: "View source for Getting Started/Air Gapped Installation - DreamFactory Wiki"
source: "http://wiki.dreamfactory.com/index.php?action=edit&title=Getting_Started%2FAir_Gapped_Installation"
canonical_url: "http://wiki.dreamfactory.com/index.php?action=edit&title=Getting_Started%2FAir_Gapped_Installation"
converted_at: "2026-11-22T18:16:59.654Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()
	
	
	
	# View source for Getting Started/Air Gapped Installation

	
		
		← [Getting Started/Air Gapped Installation](/Getting_Started/Air_Gapped_Installation)
		
		
		
		[Jump to navigation](#mw-head)
		[Jump to search](#searchInput)
		You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: [Users](/index.php?title=DreamFactory_Wiki:Users&action=edit&redlink=1).---

You can view and copy the source of this page.

{{#seo:
|title=Air-Gapped / Offline Installation Guide - DreamFactory Documentation
|title_mode=replace
|description=Install DreamFactory on a server with no internet access. Pre-stage all dependencies on a connected builder machine and install fully offline.
|keywords=DreamFactory offline install, air-gapped installation, isolated network, no internet install, RHEL offline install, Oracle Linux DreamFactory
|og:title=Air-Gapped / Offline Installation Guide
|og:type=article
|og:site_name=DreamFactory Documentation
|og:description=Install DreamFactory on a server with no internet access. Pre-stage all dependencies on a connected builder machine and install fully offline.
}}
'''Install DreamFactory on a server with no internet access. Pre-stage all dependencies on a connected builder machine and install fully offline.'''

&lt;span id="air-gapped-offline-installation">&lt;/span>
= Air-Gapped / Offline Installation =

&lt;blockquote>Verified end-to-end on Oracle Linux 9 (RHEL 9 family) on a network-isolated VM with SELinux enforcing. The same procedure applies to other RHEL-family releases (e.g. RHEL 8.x) — the critical requirement is that the builder machine matches the target OS and patch level exactly. Ubuntu/Windows variants to follow.
&lt;/blockquote>
&lt;span id="who-this-is-for">&lt;/span>
== Who this is for ==

Environments where the DreamFactory server has '''no outbound internet access''' (security policy, classified networks, locked-down enterprise). The installer's normal flow reaches the internet in several places; this guide pre-stages every one of those dependencies on a connected "builder" machine, bundles them, and installs on the disconnected "target" with zero egress.

&lt;span id="what-normally-needs-the-internet">&lt;/span>
== What normally needs the internet ==

{| class="wikitable"
|-
! Phase
! Normal source
! Offline plan
|-
| DF source / installer
| &lt;code>wget&lt;/code> from GitHub
| ship in the bundle
|-
| Licensed composer files
| DF SFTP
| obtain ahead of time (existing process)
|-
| Composer &lt;code>vendor/&lt;/code>
| Packagist
| pre-build on the builder, ship the dir
|-
| OS + PHP packages
| dnf/yum repos
| pre-download RPMs + deps, ship them
|-
| Oracle Instant Client (oci8)
| Oracle
| ship the RPM (needed for Oracle data sources)
|-
| Admin UI
| prebuilt in distro
| nothing — no npm on the target
|}

The whole trick: a '''connected builder that matches the target OS exactly''' produces one bundle; you carry it across the gap on media; the target installs with its NIC unable to reach the internet.

-----

&lt;span id="procedure">&lt;/span>
== Procedure ==

&lt;span id="builder-stage-everything">&lt;/span>
=== 1. Builder: stage everything ===

On an '''internet-connected machine running the same OS as the target''' (here: Oracle Linux 9). All commands verified on OL 9.7/9.8.

'''1a. Do a normal online install first.''' This resolves the full dependency set, builds Composer's &lt;code>vendor/&lt;/code>, and gives you a known-good tree to harvest.

&lt;syntaxhighlight lang="bash">
# non-interactive contract: admin email is required, passwords auto-generate
sudo DF_ADMIN_EMAIL=you@yourco.com DF_ADMIN_PASSWORD='&amp;lt;16+ chars&amp;gt;' \
  bash setup.sh --with-mysql
&lt;/syntaxhighlight>
&lt;blockquote>'''Post-install fix (OL9):''' the installer leaves the php-fpm socket owned by &lt;code>dreamfactory&lt;/code> while nginx runs as &lt;code>nginx&lt;/code>, and a stock &lt;code>default.d/php.conf&lt;/code> conflicts — the web UI 500s until you align them:

&lt;syntaxhighlight lang="bash">
sudo sed -i 's/^listen.owner = .*/listen.owner = nginx/; s/^listen.group = .*/listen.group = nginx/' /etc/php-fpm.d/www.conf
sudo rm -f /etc/nginx/default.d/php.conf
sudo systemctl restart php-fpm nginx
&lt;/syntaxhighlight>
Verify: &lt;code>curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/api/v2/system/environment&lt;/code> → &lt;code>200&lt;/code>.
&lt;/blockquote>
'''1b. Harvest the RPM dependency closure into a local repo.'''

&lt;syntaxhighlight lang="bash">
sudo dnf install -y createrepo_c dnf-plugins-core
mkdir -p bundle/repo
# every package the install added, in the install time-window:
rpm -qa --qf '%{INSTALLTIME} %{NAME}\n' | awk -v s=&amp;lt;start&amp;gt; -v e=&amp;lt;end&amp;gt; '$1&amp;gt;=s&amp;amp;&amp;amp;$1&amp;lt;=e{print $2}' | sort -u &amp;gt; bundle/pkglist.txt
echo -e 'epel-release\nremi-release' &amp;gt;&amp;gt; bundle/pkglist.txt   # repo-release rpms the target will need
# pull each package + ALL transitive deps (safe even if target base differs):
sudo dnf download --resolve --alldeps --destdir bundle/repo $(cat bundle/pkglist.txt)
createrepo_c bundle/repo
&lt;/syntaxhighlight>
'''1c. Harvest the built application''' (source + &lt;code>vendor/&lt;/code>):

&lt;syntaxhighlight lang="bash">
sudo tar czf bundle/dreamfactory-app.tar.gz -C /opt \
  --exclude='dreamfactory/storage/logs/*' --exclude='dreamfactory/storage/framework/cache/*' \
  dreamfactory
&lt;/syntaxhighlight>
'''1d. Oracle Instant Client + oci8''' (only if connecting Oracle data sources). On OL9, Instant Client comes from Oracle's own public repo (no Oracle login):

&lt;syntaxhighlight lang="bash">
sudo dnf install -y oracle-instantclient-release-23ai-el9
sudo dnf download --destdir bundle/repo oracle-instantclient-basic oracle-instantclient-devel
&lt;/syntaxhighlight>
&lt;code>oci8&lt;/code> is a PECL extension that normally compiles online. For the air gap it is '''pre-compiled on the builder''' and the resulting &lt;code>oci8.so&lt;/code> is shipped in the bundle (the target never runs &lt;code>pecl&lt;/code>). &amp;gt; Installer note: &lt;code>install_oracle()&lt;/code> only matches Instant Client '''19/21'''; with &amp;gt; current IC '''23.x''' the glob must be widened (tracked separately).

&lt;span id="bundle-transfer-media">&lt;/span>
=== 2. Bundle + transfer media ===

Add the offline install script to the bundle root. It is published alongside this guide: [https://github.com/dreamfactorysoftware/df-docs/blob/main/docs/getting-started/installing-dreamfactory/offline-install.sh &lt;code>offline-install.sh&lt;/code>]

&lt;syntaxhighlight lang="bash">
curl -fLo bundle/offline-install.sh https://raw.githubusercontent.com/dreamfactorysoftware/df-docs/main/docs/getting-started/installing-dreamfactory/offline-install.sh
&lt;/syntaxhighlight>
The whole &lt;code>bundle/&lt;/code> (local repo, app tarball, installer source, &lt;code>oci8.so&lt;/code>, &lt;code>offline-install.sh&lt;/code>) is written to an ISO and carried across the gap:

&lt;pre>genisoimage -o df-airgap-bundle.iso -R -J -V DF_AIRGAP bundle/&lt;/pre>
On the target this mounts read-only as virtual media (or a burned disc / USB).

&lt;span id="target-offline-install">&lt;/span>
=== 3. Target: offline install ===

On the disconnected target, built from the '''same OL9 base image''' as the builder, with the bundle media attached. No internet is used.

&lt;syntaxhighlight lang="bash">
sudo mount -o ro /dev/sr0 /mnt/df-bundle          # the bundle ISO/USB
sudo env BUNDLE=/mnt/df-bundle \
     DF_ADMIN_EMAIL=you@yourco.com DF_ADMIN_PASSWORD='&amp;lt;16+ chars&amp;gt;' \
     bash /mnt/df-bundle/offline-install.sh
&lt;/syntaxhighlight>
&lt;code>offline-install.sh&lt;/code> (shipped in the bundle) does, in order: 1. Point dnf at a &lt;code>file://&lt;/code> repo and '''disable all online repos'''. 2. &lt;code>ACCEPT_EULA=Y dnf install --disablerepo='*' repo/*.rpm&lt;/code> — installs the whole closure '''and''' the OS-update delta in one transaction. &lt;code>ACCEPT_EULA=Y&lt;/code> is required or &lt;code>mssql-tools18&lt;/code>'s PREIN scriptlet fails on &lt;code>/dev/tty&lt;/code>. 3. Untar the app (prebuilt &lt;code>vendor/&lt;/code>); create the &lt;code>dreamfactory&lt;/code> user '''without &lt;code>-m&lt;/code>''' (&lt;code>-m&lt;/code> clamps &lt;code>/opt/dreamfactory&lt;/code> to 0700 and nginx can't traverse it); delete the builder's &lt;code>.env&lt;/code> so fresh target DB creds are written. 4. Drop the prebuilt &lt;code>oci8.so&lt;/code> + Instant Client libs (&lt;code>ldconfig&lt;/code>); copy the builder's working nginx + php-fpm configs. 5. Create the MariaDB meta DB + user. 6. &lt;code>df:env&lt;/code> → &lt;code>df:setup&lt;/code> (admin) → &lt;code>migrate --seed&lt;/code> — all offline. 7. Permissions + '''SELinux''' (enforcing on OL9): - Make &lt;code>/opt/dreamfactory&lt;/code> and &lt;code>/opt/dreamfactory/public&lt;/code> traversable/readable by nginx (&lt;code>chmod 755&lt;/code> on both, &lt;code>chmod -R a+rX public/&lt;/code>). Keep &lt;code>.env&lt;/code> private (&lt;code>0640&lt;/code> is fine). - Label &lt;code>/opt/dreamfactory(/.*)?&lt;/code> as &lt;code>httpd_sys_content_t&lt;/code>. - Label &lt;code>storage/&lt;/code> and &lt;code>bootstrap/cache&lt;/code> as &lt;code>httpd_sys_rw_content_t&lt;/code> + &lt;code>restorecon&lt;/code>. - Enable &lt;code>httpd_can_network_connect_db&lt;/code> and &lt;code>httpd_can_network_connect&lt;/code> (one &lt;code>setsebool -P&lt;/code> per boolean — multi-arg silently no-ops). Without the readable app-tree label and public-dir mode fix, nginx 500s with &lt;code>stat() &amp;quot;/opt/dreamfactory/public/index.php&amp;quot; failed (13: Permission denied)&lt;/code>. Without the writable labels/booleans, the API 500s on a Monolog write or DB connect. 8. Start php-fpm + nginx; verify.

&lt;blockquote>'''Critical parity requirement:''' the builder must be at the '''same OS patch level''' as the target. The DF installer's "Updating System" step can bump the builder ahead (e.g. OL9.7 → 9.8); the harvested closure then expects packages the target lacks (&lt;code>mariadb-server&lt;/code> → &lt;code>mysql-selinux&lt;/code> → a newer &lt;code>selinux-policy&lt;/code>) and the install silently skips them. This guide solves it by bundling the OS update delta (step 1b) so the target updates itself offline.
&lt;/blockquote>
&lt;span id="verify-all-confirmed-on-a-network-isolated-ol9.7-vm-selinux-enforcing">&lt;/span>
=== 4. Verify (all confirmed on a network-isolated OL9.7 VM, SELinux '''Enforcing''') ===

* Air gap: target has '''no default route''' and cannot reach the internet (&lt;code>curl https://1.1.1.1&lt;/code> → no route).
* &lt;code>curl http://127.0.0.1/api/v2/system/environment&lt;/code> → '''HTTP 200'''.
* Admin login (&lt;code>POST /api/v2/system/admin/session&lt;/code>) → '''returns a JWT session token'''.
* &lt;code>php -m | grep oci8&lt;/code> → loaded (compiled against Instant Client 23, ready for Oracle data sources).

Status: '''VERIFIED end-to-end, fully offline, SELinux enforcing.'''

== See also ==
* [[Getting_Started/Docker_Installation|Docker Installation]]
* [[Getting_Started/Windows_Installation|Windows Installation]]
* [[Getting_Started/Installing_Dreamfactory|Installing DreamFactory]]
* [[Getting_Started/Helm_Installation|helm-installation]]

[[Category:Dreamfactory_Offline_Install]]
[[Category:Air-Gapped_Installation]]
[[Category:Isolated_Network]]
[[Category:Installation]]
[[Category:Getting_Started]]

[[Category:Installation]]
[[Category:Getting_Started]]
Return to [Getting Started/Air Gapped Installation](/Getting_Started/Air_Gapped_Installation).

Retrieved from "[https://wiki.dreamfactory.com/Getting_Started/Air_Gapped_Installation](https://wiki.dreamfactory.com/Getting_Started/Air_Gapped_Installation)"