Install on a mini-PC or a laptop

What you need

Time: 60 minutes, most of it waiting

  • A mini-PC, or a PC or laptop the masjid already owns. See the table below.
  • A USB stick, 4 GB or larger. Everything on it is erased.
  • A network cable, or the Wi-Fi password for your masjid.
  • A second computer, to write the USB stick.
  • A screen and a keyboard for the machine, for the install only.

We use Ubuntu Server 22.04 LTS on both. LTS means long-term support: Ubuntu keep sending security updates for it until 2027, so the masjid computer does not need rebuilding every year.

Which machine to use

Machine Verdict Why
A mini-PC Recommended Small, quiet, low power, and built to stay on. Second-hand ones are cheap.
A PC or laptop you already own Works. Good for trying it out Free today, and every part of this guide applies to it.

There are three reasons, and none of them are about speed.

The battery. A battery that is years old and permanently on charge swells. A swollen battery lifts the keyboard, and it is a fire risk in a cupboard nobody opens.

The dust. A laptop pulls air through a thin vent. Left running for a year in an office, the fan clogs, the machine gets hot, and it slows down or stops.

The parts. A laptop power supply, fan or disk caddy is specific to that model. When one fails in three years, you are hunting a part for a machine nobody sells any more.

What to look for in a mini-PC

We are not going to name a model. What matters is that it meets these, and any machine that does is suitable.

Look for Why
64-bit Intel or AMD processor, 4 cores or more The installer requires 64-bit and checks the core count
8 GB of memory 4 GB is the minimum. 8 GB leaves room for several apps
A solid-state disk, 128 GB or more Quiet, quick, and it survives being on all the time
An ethernet socket The masjid computer must be on a cable, not Wi-Fi
No moving parts except one fan Less to fail in a cupboard

Step 1 — Write Ubuntu Server to a USB stick

  1. On your second computer, open ubuntu.com/download/server.
  2. Download Ubuntu Server 22.04 LTS. The file ends in .iso.
  3. Open etcher.balena.io and install Etcher. It writes the stick.
  4. Put the USB stick in, then open Etcher.
  5. Choose the .iso file, then choose the USB stick, then click Flash.
Result:

Etcher writes the stick and then checks it. This takes about five minutes.

Step 2 — Start the machine from the stick

  1. Put the stick into the machine. Plug in the network cable.
  2. Switch the machine on and immediately press the boot-menu key, again and again.
  3. Choose the USB stick from the list that appears.

The boot-menu key is different on every make. Try these.

Make Key
Dell F12
HP F9 or Esc
Lenovo F12 or Enter
Acer, Asus F12 or Esc
Anything else F12, then F11, then Esc, then Del
Result:

The Ubuntu installer starts. If the machine's own operating system starts instead, switch off and try a different key.

Step 3 — Install Ubuntu Server

The installer asks a series of questions. Move with the arrow keys, and press Enter to choose.

  1. Choose your language, then your keyboard layout.
  2. Choose Ubuntu Server, not the minimised version.
  3. At the network screen, check that your connection has an address. Write that address down.
  4. Leave the proxy blank.
  5. Accept the mirror the installer suggests.

Now the disk. This is the step that erases the machine.

  1. Choose Use an entire disk.
  2. Pick the machine's own disk, not the USB stick.
  3. Review the summary, then confirm the destructive action.

Then your account. Ubuntu does not use a root password. Your own account gets administrator rights instead, which you use with sudo.

  1. Set Your name to something like Masjid Admin.
  2. Set Your server's name to openmasjid.
  3. Set Pick a username to masjid.
  4. Choose a password, and write it down. Nobody can recover it for you.
  5. At the SSH screen, tick Install OpenSSH server.
  6. Skip every one of the suggested extra packages. Choose none.
Result:

The installer copies files and downloads updates. This takes 15 to 30 minutes. It then offers Reboot Now. Take the USB stick out as it restarts.

Step 4 — Sign in and run the installer

At openmasjid login:, sign in with the username and password from step 3.

Update the machine first.

sudo apt update && sudo apt full-upgrade -y
Result:

A long list of packages scrolls past. The prompt returns when it finishes. If it asks about a new configuration file, keep the current one.

Confirm the machine's address, in case it changed.

hostname -I
Result:

One address, such as 192.168.1.50. Write it down.

Now run the installer. Copy the whole line. It is one command.

sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/OpenMasjid-Solutions/OpenMasjidOS/master/install.sh || wget -qO- https://raw.githubusercontent.com/OpenMasjid-Solutions/OpenMasjidOS/master/install.sh)"

Press Enter to accept Install.

Result:

The installer works through six steps, and names each one. It then prints a box with the address to open.

Step 5 — If it is a laptop, keep it awake

A laptop suspends itself when you close the lid, and the masjid's software stops with it. Turn that off. Skip this step on a mini-PC.

sudo sed -i 's/^#*HandleLidSwitch=.*/HandleLidSwitch=ignore/' /etc/systemd/logind.conf && sudo systemctl restart systemd-logind
Result:

No output. The prompt returns. The laptop now stays on with the lid closed.

Step 6 — Open the dashboard

Type https:// and then the address from step 4 into a browser on your network.

Result:

Your browser says Not secure, or Your connection is not private. This is expected. Click Advanced, then Proceed. You do this once on each device.

Checkpoint

You can open https:// followed by the machine's address, and you see the screen that says Welcome to OpenMasjidOS. You can now unplug the screen and keyboard.

Next, open it for the first time.

Moving to a mini-PC later

If you started on a laptop, moving is a backup and a restore. It takes about an hour, and you lose nothing.

  1. On the old machine, download a backup. See Backups.
  2. Follow this guide again on the mini-PC.
  3. At the first screen, choose Restore from a backup instead of making an account.
  4. Upload the backup file.
  5. Check your apps, then switch the old machine off.

If something goes wrong

What you seeWhyWhat to do
The machine starts its old operating system instead of the stick.The boot-menu key was wrong, or the timing was wrong.Switch off and try another key from the table above. Press it repeatedly from the moment you press the power button.
The installer cannot find a network.Ubuntu’s installer has no driver for some Wi-Fi chips.Use a network cable for the install. The masjid computer wants a cable anyway.
sudo asks for a password and then refuses it.The password is being typed wrongly, often because the keyboard layout differs.Type it slowly. If it still fails, check the keyboard layout you chose in step 3.
The laptop goes to sleep and the dashboard stops answering.Step 5 was skipped, or the command did not apply.Open the lid, sign in, and run the command in step 5 again.
The installer says it needs to run as root.The command was run without sudo.Run it again with sudo at the front, exactly as printed above.
The installer stops and says the processor is not supported.The machine is 32-bit, which very old PCs are.Use a 64-bit machine. Every mini-PC sold in the last ten years is 64-bit.