Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Raspberry Pi Kiosk Setup and Configuration Guide

· 4 min read · Home Tech

In this article
  1. Which Raspberry Pi Hardware to Use for a Kiosk
  2. How to Install a Kiosk Browser on Raspberry Pi OS
  3. How to Disable Screen Sleep and Power Saving
  4. How to Prevent Unauthorized System Access
  5. How to Manage Remote Updates and Content
  6. How to Handle Touchscreen Calibration and Input
  7. How to Optimize Boot Time for Fast Loading

A Raspberry Pi kiosk is a dedicated system that boots directly into a full-screen web browser or a single application to provide a restricted user interface. This is achieved by disabling the desktop environment's window manager and configuring the OS to launch a browser in "kiosk mode." Most setups use Raspberry Pi OS Lite to minimize system overhead and increase stability.

Which Raspberry Pi Hardware to Use for a Kiosk

The choice of hardware depends on the content complexity and the screen resolution of the display. For simple static pages or low-resolution dashboards, a Raspberry Pi Zero 2 W provides a small footprint and low power consumption. For high-definition video playback or complex web applications, a Raspberry Pi 4 or 5 with at least 4GB of RAM is required to prevent browser crashes and stuttering.

Model Best Use Case Power Requirement RAM Recommendation
Pi Zero 2 W Simple text/image dashboards 5V / 2.5A 512MB
Pi 4 Model B HD Video, Interactive Maps 5V / 3A 4GB - 8GB
Pi 5 Heavy Web Apps, 4K Displays 5V / 5A 4GB - 8GB

How to Install a Kiosk Browser on Raspberry Pi OS

Using Raspberry Pi OS Lite is the most efficient method because it removes the desktop environment, reducing boot time and memory usage. Install a lightweight window manager like Openbox to handle the browser window without providing a taskbar or start menu.

  1. Flash Raspberry Pi OS Lite to the microSD card using the official imaging tool.
  2. Connect to the internet and run the system update command via the terminal.
  3. Install the X Window System and Openbox by running the package manager for xserver-xorg and openbox.
  4. Install a web browser, such as Chromium, which supports a dedicated kiosk flag.
  5. Create an autostart configuration file in the Openbox directory to launch the browser on boot.
  6. Add the command line flags --kiosk and --incognito to the browser launch string to hide the address bar and prevent the storage of user cookies.

How to Disable Screen Sleep and Power Saving

A kiosk must remain visible at all times, which requires disabling the default X11 screen blanking and DPMS (Display Power Management Signaling). If these are not disabled, the monitor will enter power-save mode after 10 minutes of inactivity.

To disable screen blanking, edit the boot configuration file and add the parameter disable_fw_kms=1. In the Openbox autostart file, add the xset commands s off and -dpms to ensure the screen never dims or turns off regardless of user interaction. For touchscreens, ensure the cursor is hidden by installing a utility like unclutter, which removes the mouse pointer after a set number of seconds of inactivity.

How to Prevent Unauthorized System Access

Security is critical for public-facing kiosks to prevent users from accessing the terminal or system settings. The primary method is to restrict the user account and lock down the keyboard inputs.

Disable the keyboard's Ctrl+Alt+F1 through F7 combinations to prevent users from switching to a virtual console. You can achieve this by editing the X11 configuration file to ignore these specific key combinations. Additionally, use a read-only file system by enabling the Overlay File System in the Raspberry Pi Configuration tool. This ensures that any changes made to the system during a session are wiped upon reboot, preventing permanent configuration changes by unauthorized users.

How to Manage Remote Updates and Content

Updating content on a physical kiosk is difficult if the device is mounted in a public area. The most effective method is to host the kiosk content on a remote web server and point the browser to a URL rather than a local HTML file.

For system-level updates, install an SSH server and enable it in the configuration settings. This allows you to push software updates or change the target URL from a remote computer on the same network. To ensure the kiosk recovers from a crash or a power outage, configure a cron job that checks if the browser process is running every 5 minutes and restarts it if it has closed.

How to Handle Touchscreen Calibration and Input

Most kiosk displays use USB or HDMI/I2C interfaces for touch input. If the touch coordinates do not align with the visual elements on the screen, calibration is required using the xinput-calibrator tool.

Run the calibration tool, follow the on-screen prompts to touch the four corners of the display, and save the resulting configuration snippet to the X11 configuration folder. For displays that use a specific driver, ensure the correct firmware is loaded in the config.txt file. If the kiosk is intended for a non-touch display, disable the mouse and keyboard ports in the BIOS or physically block the ports to prevent tampering.

How to Optimize Boot Time for Fast Loading

Reducing the time from power-on to the display of the website improves the user experience. A standard boot can take 30 to 60 seconds, but this can be reduced to under 20 seconds with specific tweaks.

Disable the rainbow splash screen and the boot text by adding disable_splash=1 to the config.txt file. Use a high-speed Class 10 or UHS-I microSD card to reduce disk I/O bottlenecks. Finally, disable unnecessary services such as Bluetooth, Wi-Fi (if using Ethernet), and the HDMI-CEC interface in the system configuration menu to free up CPU cycles during the initial boot sequence.