FocusGuard: screen time and site blocker for Windows
Home › Utilities · version 1.6.1

FocusGuard runs quietly on the family PC. When a child signs in, it blocks distracting sites in every browser and app, counts their minutes, warns them before time ends and signs them out. When you sign in with your own account, the internet is normal. You can give extra study time from your phone without touching the PC.

⬇ Download FocusGuard 1.6.1 (zip) Full README View the source

What it doesWhat you needInstallPhone controlTV lockDay to dayIf the internet stopsLimits

What it does

  • Blocks sites for the whole PC, not just one browser. It works as a small DNS filter on the PC, so Chrome, Edge, Firefox and apps are all covered. Allowed lookups go out over encrypted DNS.
  • Block lists for video (YouTube, Netflix, Hotstar…), social (Instagram, Facebook, Snapchat, X, Reddit…), music (Spotify, JioSaavn, Gaana…), games (Poki, Roblox, now.gg…) and VPN/proxy sites. SafeSearch is forced on Google, Bing and DuckDuckGo.
  • Study mode (the default) is a whitelist: only the sites you list open. Turn it to Filter (block lists only) or Off from the panel.
  • Screen time per child: allowed hours and a daily minute limit for each day of the week. A warning comes 5 minutes before the end, then the child is signed out. Windows sign-in hours are set too.
  • Always-blocked apps: music players, game launchers, VPN and Tor apps, and portable browsers are closed for the children's accounts.
  • Online classes today: one tap opens the PC 07:00–19:00 in Study mode with Meet, Zoom and Teams allowed, without using up the day's minutes.
  • Reports (opt-in per child): screen time, most-used sites and blocked attempts for today, 7 or 30 days.
  • Phone home page over your home Wi-Fi: give study time to each child, stop it, and lock or unlock the TV.

What you need

  • A Windows 11 Pro PC. Each child has their own Standard (not administrator) account; you keep an admin account with a password the children don't know.
  • Python 3.9 or newer. A normal python.org install works, and so does a portable or "embeddable" Python on another drive. No pip or virtual environment is needed; the installer fetches its two small libraries itself.
  • An internet connection during install.
  • For phone control: the phone on the same Wi-Fi, and the PC's IP address fixed with a DHCP reservation on your router (see how).
  • For the TV lock: an Android TV / Google TV and the Android platform-tools (adb) folder. See Home TV Lock.
The default schedule written at install is Mon–Fri 16:00–20:30 (120 min, Study mode 17:00–19:00) and Sat–Sun 09:00–12:30 and 15:00–21:00 (180 min). Change it in the panel's Schedule tab.

Install (about 15 minutes)

  1. Make each child's account Standard. Settings › Accounts › Other users › name › Change account type › Standard user.
  2. Unzip FocusGuard on the PC, for example to C:\Users\<you>\Downloads\focusguard.
  3. Open PowerShell as Administrator in that folder (right-click Start › Terminal (Admin), then cd to the folder) and run the installer with the child's account name. Add more accounts the same way, or later in the panel.
    Set-ExecutionPolicy -Scope Process Bypass -Force
    .\install.ps1 -User Kid1
    If Python is not on the PATH or is portable, add its path: -Python D:\Python312\python.exe. Add -LockExtensions to also block browser extensions such as VPN add-ons.
  4. Choose the admin panel password when asked. Use your own, not one the children know.
  5. The installer tests the filter before it changes any DNS setting. If the test fails, nothing is changed and it prints why.
  6. Restart the browsers, open the FocusGuard Admin desktop shortcut (http://127.0.0.1:8765/admin) and set each child's hours in the Schedule tab.
  7. Set up the phone page and TV (optional) with update.ps1, below.

Control it from your phone

The panel first answers only on the PC itself. To open it from phones on the home Wi-Fi, run this once in an Administrator PowerShell on the PC:

& "C:\Program Files\FocusGuard\python\python.exe" "C:\Program Files\FocusGuard\focusguard.py" lan on subnet
& "C:\Program Files\FocusGuard\python\python.exe" "C:\Program Files\FocusGuard\focusguard.py" pin

The first line opens it to your home network and adds the firewall rule (lan on 192.168.1.25 allows one phone only; lan off closes it). The second sets a parent PIN: it opens only the simple home page, so you can give it to the other parent without sharing the admin password. If you kept Python in its own folder, use that python.exe path instead.

On the phone, open http://<PC address>:8765/ (lan status prints it) and add it to the home screen. The page has two parts:

  • Study time on PC: pick 15 / 30 / 45 / 60 minutes or type a number for each child and tap Give time. It always runs in Study mode. Stop ends it early.
  • TV: Lock / Unlock, if TV control is set up.
The page is plain HTTP on your own Wi-Fi. Use a strong admin password. Five wrong tries lock sign-in for 5 minutes. Never forward port 8765 on your router to the internet.

Add the TV lock

Prepare the TV first (developer options, USB debugging, fixed IP): see Home TV Lock › Prepare the TV. Then:

  1. Download Google's SDK Platform-Tools for Windows and unzip it so that C:\platform-tools\adb.exe exists.
  2. In the FocusGuard folder, in an Administrator PowerShell, run with your TV's address:
    Set-ExecutionPolicy -Scope Process Bypass -Force
    .\update.ps1 -TV 192.168.1.8:5555
  3. It copies adb into a folder only administrators can open, turns TV control on, asks for the parent PIN and restarts FocusGuard.
  4. When the TV shows Allow USB debugging? for this PC, tick Always allow and press OK.
  5. Delete C:\platform-tools afterwards, so the children's accounts can't use it. FocusGuard also closes adb.exe if a child starts it.

While the TV should be locked, FocusGuard locks it again every 10 minutes. This catches a TV that was off when you pressed Lock. To lock the TV when the PC is off, use Termux on your phone.

Day to day

SituationWhat to do
A study site opens only partlyPanel › Log › Recently blocked › Study-allow the helper domains it needs.
A site is wrongly blockedAllow it in the Log tab, or add it under Block lists › Always allowed.
Child needs more time todayPhone page › Give time, or +15 / +30 / +1 hour on the child's card in the panel. Works even outside allowed hours.
Online classes all dayOnline classes today on the child's card. Back to normal next day.
You need the PC unrestrictedSign in with your own account, or use Pause.
Updating to a new versionUnzip it and run .\update.ps1 as Administrator. DNS, firewall and browser settings are left alone.

If the internet stops working

The service has probably stopped. It normally restarts within a minute. If not, in an Administrator PowerShell:

Start-ScheduledTask -TaskName FocusGuard
# or remove FocusGuard completely and restore normal DNS:
& "C:\Program Files\FocusGuard\uninstall.ps1"

The log is at C:\ProgramData\FocusGuard\focusguard.log. Forgot the panel password? Run focusguard.py passwd as Administrator to set a new one.

Limits: what it cannot do