Install FOG Server on Ubuntu Server – Ultimate Guide

Install FOG server on Ubuntu Server

To install FOG Server on Ubuntu Server, give the server a static IP, clone the FOG Project repository from GitHub, switch to the stable branch and run bin/installfog.sh as root. Choose a normal install and skip FOG’s DHCP if your router handles DHCP. You then log in at http://<server-ip>/fog/management as fog with password password.

This guide builds a complete open source imaging server with FOG 1.6 (1.6.0.14 is the current stable release as of November 2026), from the Ubuntu Server VM to PXE boot through pfSense. The second part of this tutorial covers how to create a Windows Image using FOG Server.

Short version

Terminalbash
sudo -i
apt-get -y install git
cd /opt && git clone https://github.com/FOGProject/fogproject.git fogproject-master
cd fogproject-master && git checkout stable
cd bin && ./installfog.sh
Table of Contents

🐧 There are some related articles!
👉 Top Things to do after installing Kali Linux 👉 Linux on Windows - The Complete WSL 2 Tutorial Series 👉 Create Generalized Windows Images with FOG Server 👉 Install FOG Server on Ubuntu 👉 Install Kali Linux on Windows - Complete Guide 👉 The Complete Kali Linux and Windows Dual Booting Guide 👉 Cronjob - The Complete Guide to Cronjobs 👉 Open Bitlocker Drive on Linux - Quick & Easy

Introduction

Just to warn you beforehand - this Guide will be a behemoth. I was thinking about writing up the whole thing in just one article, but I felt it would be a bit overwhelming so I want to split it up into two parts:

Part 1 will cover everything from installing Ubuntu Server on VirtualBox(or any other instance of Ubuntu Server), and installing & configuring FOG Server on the same server.

Part 2 will cover everything about generating your Generalized Windows 10 Image and capturing and deploying it with FOG.

There are a few guides out there but none of them (at least none that I found) were a 100% complete walkthrough, always minor things missing or not covered. This is about to change.

So without further ado, grab a kettle full of Coffee (Yes, a kettle.), and let’s get started!

Regarding the DHCP Server

Also, an important factor to consider is the DHCP situation you are in. If you want to Network PXE boot into your FOG Server, the Network has to somehow know how to handle this PXE Boot Request coming from a client.

I use pfSense as a router and it is no problem whatsoever to set it up to cooperate with FOG. You simply need to add a forwarder to your FOG Server in your pfSense DHCP Settings that point clients to your FOG Server IP for PXE requests. I will show you exactly how to do that in this tutorial.

But what I want to say is, find out how to do it with your DHCP Server, if you don’t use pfSense yourself. I will just cover the combination with pfSense and no other DHCP Servers. So make sure you know how to add a DHCP Server forwarder on your DHCP Server before starting, as this could throw you off.

What you need

Before we start to Install FOG Server on Ubuntu Server, make sure you’ll have everything ready. We are big fans of Open-Source software, so everything you need to follow along with this tutorial is free.

We use VirtualBox for the sake of this tutorial, you can use this tutorial to install FOG Server on any kind of Ubuntu Server you like (Physical or Virtual), it will work all the same.

Many of you are already familiar with VirtualBox, but I will guide you through each step anyway (except the installation of VirtualBox itself).

Step 1 - Creating a Virtual Hard Disk (VDI) for Ubuntu Server

Start up your VirtualBox Manager and click on New.

Install FOG Server on Ubuntu Server

Make sure you are in the Guided and not in the Expert mode for this Tutorial.

Give your Host System a Name, I go for fog-host for the Ubuntu Server because the fog-server that will be installed on the machine will be named fog-server. Don’t wonder about the X I put behind my names, it’s because I already got a Fog-Host and Fog-Server up and running.

  • Select Linux and Version Ubuntu (64-bit) and click Next.
VirtualBox RAM Configuration

I run my Server on 2048MB of Ram without a problem. You probably could go with only 1024, but let’s give it a bit of space.

Click Next.

VirtualBox Hard Drive Configuration
  • Select Create a Virtual Hard Disk now and click Create.
Selecting VirtualBox Hard Disk File Type

Choose VDI and click on Next.

Adjusting VirtualBox Storage

Select Dynamically allocated and click Next.

VirtualBox File Location and Size

Choose a location where you want to Save your VDI file and allocate Disk Space.

Now, this is entirely up to you and what your goals are. If you just want to have 1 single Windows 10 Image on your FOG Server, around 40 GB would probably be enough.

I chose 80 GB to have a little more room if I want to use more images later. The Disk Space is allocated dynamically anyway, which means that just the amount of space that is used on the Virtual Machine is actually subtracted from your physical Hard Drive.

Click on Create once you decided.

Step 2 - Installing Ubuntu Server

So now that we have created our VDI, we can fire up that VM and get started with installing our Ubuntu Server before we can Install FOG Server on Ubuntu Server.

Click on Start to Start the FOG host.

Find the Ubuntu Server Image you downloaded earlier and click Start.

Install Ubuntu Server on VirtualBox

Select a Language and select Install Ubuntu Server.

The screenshots in this step show an older Ubuntu Server installer. Current releases look different, but they ask for the same things: language, keyboard, network, storage, your user account and whether to install OpenSSH Server.

By the way, if you are stuck with your mouse inside of your VM, press your right CTRL Key to release it!

Install Ubuntu Server on VirtualBox

Select your Language, Location, and Locales next and select a Keyboard Layout of your choice.

Once you are done with all of that and your Server got an IP Address from your DHCP Server (Or you configured one manually) we give our FOG server a hostname.

Install Ubuntu Server on VirtualBox

Give the New Admin a Full Name and a Username.

That Username will be used instead of the root user.

Install Ubuntu Server on VirtualBox
Install Ubuntu Server on VirtualBox

After you choose a safe password decide whether or not to encrypt your Home Directory. I won’t do that for this installation.

Install Ubuntu Server on VirtualBox

When we come to partitioning Disks, we will use Guided - Use Entire Disk.

Install Ubuntu Server on VirtualBox

Finally, agree with Yes that you accept that all Data on the selected Hard Drive will be erased in the installation process.

Install Ubuntu Server on VirtualBox

Now Ubuntu Server will be installed on your VDI. Refill your coffee, we’re getting there.

Choose a Proxy Server if you have one, if not leave it empty.

Next, you can choose if you want Updates to be automatically installed.

To move to a newer FOG release later, see update FOG Server to the newest version.

Finishing Ubuntu Server installation

We want to make sure to install the following Software:

  • OpenSSH Server
  • Standard System Utilities
Installing Additional Services

Next, we want to Install the GRUB boot loader to the master boot record.

Installing GRUB

After confirming to remove the Installation Media and clicking on continue, your new Ubuntu Server will boot up.

Enter the Username and the Password you created earlier and log in.

Ubuntu Server initial boot

The absolute first thing we want to do is to shut our Server down again.

Type:

Terminalbash
sudo shutdown now

We do this to take a Snapshot of our fresh installation in case we mess things up. We will take more snapshots as we proceed but this will be the first one. If you completely mess your installation up, you can always go back to a working state without having to install everything again.

Taking a Snapshot

Select your VM, click on the little Camera Symbol in the upper right corner and Create a fresh Snapshot. Give it a descriptive name.

Step 3 - Preparing Ubuntu Server for FOG Server Installation

After you have taken your Snapshot, start up the machine again and log in with your credentials.

Before we can Install FOG Server on Ubuntu Server, we are going to update our system to make sure everything is on the latest patch level.

Terminalbash
sudo apt-get update
sudo apt-get dist-upgrade -y

After you finished the update, let’s run:

Snippettext
sudo -i

So we don’t always need to put sudo in front of our commands for now.

Terminalbash
cd /opt/

First, navigate to the /opt/ folder so we are not using the root home for downloading and unzipping our FOG Server.

Now we are going to download FOG and switch to the stable branch, which carries the current 1.6 release:

Terminalbash
apt-get -y install git
git clone https://github.com/FOGProject/fogproject.git fogproject-master
cd fogproject-master
git checkout stable
cd /opt

Now before we are going to Install FOG Server, we are going to change our IP Address, because it gets significantly harder to do that after FOG is installed. Way more things you need to change. If we do it now, we just do it once and the FOG Installation takes over the IP.

Current Ubuntu Server releases configure the network with netplan. First find your interface name (for example enp0s3 in VirtualBox) with ip a, then list the netplan files:

Terminalbash
ip a
ls /etc/netplan/

Open the YAML file you found there, for example:

Terminalbash
nano /etc/netplan/50-cloud-init.yaml

Replace its content with a static configuration like this one:

yamlyaml
network:
  version: 2
  ethernets:
    enp0s3:
      dhcp4: false
      addresses:
        - 192.168.1.40/24
      routes:
        - to: default
          via: 192.168.1.1
      nameservers:
        addresses: [192.168.1.1]

The two screenshots below show the same change in the old /etc/network/interfaces file that Ubuntu used before netplan. With DHCP activated, the old file looked something like this:

Install FOG Server on Ubuntu Server

Which we are going to change to look like this:

Install FOG Server on Ubuntu Server

Of course, adjust according to whatever IP Addresses you are using. Change the interface name, the address, the gateway (via) and the DNS server.

Now press CTRL + O and confirm with Enter to save the file, hit CTRL + X to leave the editor. Run netplan apply to check the file for errors.

Now reboot the Server by typing:

Terminalbash
reboot now

I know you could just restart the networking services, but that failed on me a few times so let’s restart to be sure.

After logging back in with your credentials type:

Terminalbash
sudo -i
cd /opt/fogproject-master/bin

If all is good, we are now ready to Install our FOG Server.

I recommend you take another Snapshot of your VM now while it’s running. Just to be safe. Follow through the Snapshot process we covered earlier again and take a new one.

I call it something like: “Before FOG Installation, everything prepared”. Simple.

Step 4 - Install FOG Server on Ubuntu Server

As I mentioned in the beginning, our FOG-Server will NOT be installed as a DHCP Server, because our pfSense Firewall will still handle DHCP for us. The setup routine will ask you a few questions and I will exactly tell you what to choose. Follow along carefully as this is a crucial step.

Inside of your /opt/fogproject-master/bin folder type:

Terminalbash
./installfog.sh

The installer detects your distribution and asks you to confirm it. On Ubuntu that is the Debian based option, so confirm it and hit Enter. The screenshots in this step show an older FOG release, so your prompts may be worded a bit differently.

Install FOG Server on Ubuntu Server

Next, in my case, I will follow the recommendation of a potential reinstall of Apache and PHP files. So, agree with Y.

Install FOG Server on Ubuntu Server

Stopping Web Services will likely fail, don’t worry about it now.

Now I’ll give you a list of questions and answers that the routine will ask you.

  • What type of installation would you like to do? [N/s (Normal/Storage)]
    • Choose: N for a full FOG Server
  • Would you like to change the default network interface from [YourNetworkInterfaceName]?
    • Choose: N to keep the interface that has your static IP
  • Would you like to use the FOG Server for DHCP Service? [y/N]
    • Choose: N, because pfSense handles DHCP
  • Would you like to setup a router address for the DHCP Server?
    • Choose: N. This is only needed when FOG runs DHCP.
  • Would you like DHCP to handle DNS?
    • Choose: N. This is only needed when FOG runs DHCP.
  • This version of FOG has internationalization support, would you like to install the additional language packs? [y/N]
    • Choose: N, or Yes if you need it.
  • HTTPS support
    • Choose: N unless you want a self-signed certificate for the web UI and iPXE.
  • Hostname
    • Choose: N to accept the suggested hostname.
  • Are you sure you wish to continue (Y/N)
    • Check if everything is correct and confirm with Y

Double Check:

Install FOG Server on Ubuntu Server
Install FOG Server on Ubuntu Server

In some older versions of Ubuntu Server, you will get asked to set a MySQL password in the installation process. I wasn’t asked for it in Ubuntu. In case, you can leave it empty and just hit enter without a security risk. You can still change it later, too.

Next, before everything is finished, the installer asks Install/update the FOG database schema now? (Y/n). Press Enter to accept the default. If you answer n, the installer prints the address of the schema page instead: open it in your browser and click Install/Update Now, then come back and press Enter in the installer.

Now navigate to your FOG Server via a Web Browser of your choice:

http://192.168.1.40(or your FOG SERVER IP)/fog/management/

If you enabled HTTPS support, use https:// instead. Log in with the default credentials:

  • Username: fog
  • Password: password

To give it a fresh start type:

Terminalbash
reboot now

On your FOG Server.

After the Server is back up, log in with the default credentials again via your Web Browser.

Navigate to your User Manager and change the default credentials of your fog user.

Install FOG Server on Ubuntu Server

Congratulations, you just successfully installed your first FOG Server.

THE NEXT PART ONLY APPLIES IF YOU USE pfSENSE FIREWALL

Step 5 - Setting up a DHCP forwarder in pfSense

This will be very quick.

Log in to your pfSense Firewall, navigate to Services / DHCP Server and open the tab of the interface your clients are on, for example LAN.

Scroll down until you find Network Booting and click on Display Advanced.

Tick Enable Network booting and Enter your FOG Server IP Address as the Next-Server Address.

Set the Default BIOS file name to undionly.kpxe. For UEFI clients, set the UEFI 64 bit file name to secureboot/snponly-shimx64.efi, which the FOG 1.6 docs recommend for 64-bit UEFI even without Secure Boot. The pfSense docs note that UEFI and ARM clients only boot when all the boot file name fields are filled in.

The screenshot uses 192.168.100.40 as the Next Server. Enter the static IP you gave your own FOG Server.

FOG server with pfSense Setup

Save everything.

What this does is, every time pfSense recognizes a device that wants to PXE Boot over Network, it forwards the request to our FOG Server.

Easy, right?

FAQ

Which Ubuntu versions does FOG Server support?

The FOG docs list Ubuntu 16 or higher as supported, along with Debian, CentOS, Red Hat, Fedora and Arch. Use a current LTS release such as Ubuntu Server 24.04 LTS or 26.04 LTS so you keep getting security updates. FOG 1.6 needs PHP 7.4 or later, which every current LTS release ships.

What is the default FOG Server login?

The default web UI login is fog with the password password. The installer shows these credentials only on a first install. Change the password right away under User Management.

Does the FOG Server have to be my DHCP server?

No. Answer N to the DHCP question and point your existing DHCP server at FOG instead: option 66 (Next Server) is the FOG Server IP and option 67 is the boot file name. If your router cannot set those options, the FOG docs describe a dnsmasq ProxyDHCP setup that runs next to your existing DHCP server.

How do I update FOG Server to a new release?

For a git install, go to your checkout and run bin/updatefog.sh --channel stable. It moves the checkout to the latest stable commit and runs the installer for you. The upgrade from FOG 1.5 to 1.6 is one-way, so back up the server or take a VM snapshot first.

Conclusion

This should cover all the steps of the FOG Server installation.

The next part, how to create your generalized Windows 10 Image and how to capture your first Host in FOG and deploy your Image, can be found here.

🐧 There are some related articles!
👉 Top Things to do after installing Kali Linux 👉 Linux on Windows - The Complete WSL 2 Tutorial Series 👉 Create Generalized Windows Images with FOG Server 👉 Install FOG Server on Ubuntu 👉 Install Kali Linux on Windows - Complete Guide 👉 The Complete Kali Linux and Windows Dual Booting Guide 👉 Cronjob - The Complete Guide to Cronjobs 👉 Open Bitlocker Drive on Linux - Quick & Easy

whoami

Stefan founded Ceos3c in 2016 and has spent a decade teaching cybersecurity, Linux, and web development through hands-on tutorials. He builds and ships real products while sharing his journey: ProofSwap.me, XPMetric.com, and EasyEarningsTracker.com.

More about me

7 thoughts on “Install FOG Server on Ubuntu Server – Ultimate Guide”

  1. You tell everyone to install https://github.com/fogproject/fogproject.git to fogproject-master

    Then tell them to go to /opt/fog-master/bin.

    But the folder you specified when telling everyone to install fog is "fogproject-master". So you should be telling people to go to /opt/fogproject-master/bin

    Great guide, just wanted to address this 1 bit. I used an older guide of yours back in 2020 and it was awesome so came back in 2026 to build Fog again.

  2. As checked in the above article the IP address of your FOG server you have set is 192.168.1.40 and in your pf sense, you have entered Fog server IP as 192.168.100.40. How it is possible could you please explain?

  3. Thanks so much, man, for doing such a nice step-step. I've trying to find an updated version of FOG tutorial, since i feel am forgetting something in the middle of the process.

  4. I'm looking to replace my clonezilla with FOG server. At moment I setup clonezilla as pxe network boot which connects to my samba server to save images. Would u like to help me with this

Comments are closed. I keep the discussion here because the answers still help.