First, download the Scriptable app from the App Store: 👉 Scriptable on App Store
- Download the file Server Homepage.scriptable from this repository.
- Open the Scriptable app on your iPhone.
- Tap the + button to create a new script.
- Select Import Script, then choose the file you downloaded.
- Save the script and add the widget to your home screen.
- Open the file Server Homepage.js from this repository.
- Copy the entire content of the file.
- Open the Scriptable app on your iPhone.
- Tap the + button to create a new script.
- Paste the copied content into the editor.
- Save the script and add the widget to your home screen.
-
Add the widget to your home screen:
- Long press on your home screen until the apps start jiggling.
- Tap the “+” button in the top left corner.
- Search for Scriptable and select it.
- Choose the medium widget size (recommended) and add it.
-
Set up the widget:
- While in jiggle mode, tap Edit Widget.
- Choose the script "Server Homepage" from the list.
- Ensure background refresh is enabled so the widget updates automatically.
You can modify the script inside Scriptable to match your preferences:
- API URL:
Change the
urlvariable in the script if your server IP or port is different.const systemURL = "http://192.168.1.50:6969/api/system" const networkURL = "http://192.168.1.50:6969/api/network"
- Colors:
Adjust the
addLinefunction color codes for CPU, RAM, Temperature, Download, and Upload. - Fonts & Sizes:
Edit
Font.mediumSystemFont(size)orFont.boldSystemFont(size)to increase readability. - Layout:
Change
w.presentMedium()tow.presentSmall()orw.presentLarge()to preview in different widget sizes.
- Ensure that your iPhone is connected to the same network as your server, or make sure your API is accessible remotely if you want to view it outside your LAN.
- Widgets on iOS refresh in the background every 15-30 minutes, so real-time updates are not guaranteed.
- If the widget doesn’t update, manually open Scriptable and run the script to force a refresh.