An ultra-fast, zero-wear ephemeral web hosting appliance built for Raspberry Pi (and Debian/Ubuntu Linux). Websites are stored as compressed archives (.tar.gz) on the SD card, unpacked into a high-speed volatile RAM disk (tmpfs) at boot or on-demand, and served through Nginx + PHP-FPM.
Enjoy blazing-fast response times, zero SD-card write exhaustion, instant drag-and-drop deployments, and full state snapshotting.
- β‘ Ultra-Fast RAM-Disk Execution: Active websites run entirely out of RAM (
/mnt/ramdisk/webroot). Filesystem reads hit memory speed with zero wear on your SD card. - π 3 Instant Hot-Deploy Methods:
- Browser Dropzone: Drag and drop any folder,
.zip, or.tar.gzdirectly into the web management console. - Windows Explorer (SMB): Drop files straight into
\\<pi-ip>\dropbox. Detected automatically by inotify, packaged, and spun up live. - FTP / SFTP: Connect via
ftp://<pi-ip>/or SFTP to deploy archives remotely.
- Browser Dropzone: Drag and drop any folder,
- π Concurrent Multi-Site Hosting: Host a primary site at
/and concurrently serve additional sites under sub-paths (/<site-slug>/). - ποΈ Automated Database Provisioning: Every site automatically gets a dedicated MariaDB database and user (
w_<site>) with auto-generated credentials injected into.envand.wtc-db.php. - πΎ State Persistence ("Save State"): Ephemeral by default, persistent when you need it. Snapshot user uploads, SQLite databases, or runtime modifications back to the SD card on demand, on shutdown, or on an interval timer.
- π‘οΈ Zero-Downtime Atomic Swaps & Rollbacks: New deployments unpack to staging, validate with
nginx -t, and swap atomically. Roll back to the previous revision in one click. - π οΈ Dual Management Interfaces:
- Web Console: Modern, responsive dashboard running on dedicated port
4485(and/manage/). - Terminal CLI: Interactive whiptail menu via
sudo wtc-manage.
- Web Console: Modern, responsive dashboard running on dedicated port
- βοΈ Built-in Tooling: Integrated firewall manager (
ufw), background queue daemon (wtc-workersfor Laravel queue/scheduler), Nginx vhost editor, and 1-click stack installer (Redis, Node.js, Composer, etc.).
[ Persistent Storage ]
/opt/wtc-web/sites/
(site archives .tar.gz)
β² β
Save State β β Unpack at boot /
Snapshot β β on site switch
β βΌ
[ Ingest Dropzone ] ββββββββΊ [ β‘ High-Speed RAM Disk (tmpfs) ] ββββββββΊ [ Nginx + PHP-FPM ]
β’ Web Dropzone (browser) /mnt/ramdisk/webroot β’ Port 80 / 8080 (Sites)
β’ Windows SMB (\\pi\dropbox) β’ Port 4485 (Web Console)
β’ FTP (ftp://pi/)
See ARCHITECTURE.md for the detailed system architecture diagram and component lifecycle.
- Hardware:
- Raspberry Pi 4B (2GB, 4GB, or 8GB) or Raspberry Pi 5 recommended.
- Also compatible with Raspberry Pi 3B+, Orange Pi, and standard x86_64 / ARM64 Debian/Ubuntu servers.
- Storage: 16 GB+ MicroSD card (Class 10 / A1 or A2 recommended).
- Operating System:
- Ubuntu Server 24.04 LTS (64-bit) (Recommended)
- Debian 12 Bookworm
- Download and run Raspberry Pi Imager.
- Choose Ubuntu Server 24.04 LTS (64-bit) (or Debian 12).
- Click the gear icon (OS Customization) to configure:
- Hostname (e.g.,
wtc-pi) - Username & password
- Enable SSH
- Wireless LAN / Ethernet credentials
- Hostname (e.g.,
- Flash the SD card and boot your Raspberry Pi.
Connect via SSH (ssh <user>@<pi-ip> or ssh <user>@wtc-pi.local) and execute:
# Update repositories and install git
sudo apt update && sudo apt install -y git
# Clone this repository
git clone https://github.com/AnthonyWriteTheCode/PiLabWTC.git
cd PiLabWTC
# Make the scripts executable
chmod +x *.sh wtc-workers
# Run the automated installer
sudo ./01-server-setup.shYou can configure installation options using environment variables:
# Allocate a custom RAM disk size (default: 512M)
sudo RAM_SIZE=1G ./01-server-setup.sh
# Disable Samba or FTP if you do not need file sharing
sudo ENABLE_SAMBA=no ENABLE_FTP=no ./01-server-setup.shOnce setup completes, access your server using your Pi's IP address or hostname:
| Service | Address / Port | Description |
|---|---|---|
| Primary Active Site | http://<pi-ip>/ or http://wtc-pi.local/ |
Live site running in RAM (Port 80) |
| Direct Site Port | http://<pi-ip>:8080/ |
Direct port 8080 fallback |
| Web Management UI | http://<pi-ip>:4485/ or http://<pi-ip>/manage/ |
Administration and deployment dashboard |
| Windows SMB Share | \\<pi-ip>\dropbox or \\wtc-pi.local\dropbox |
Drag-and-drop network share |
| FTP File Server | ftp://<pi-ip>/ |
FTP ingest (anonymous or authenticated) |
| Terminal CLI | sudo wtc-manage |
Interactive curses management menu |
- Open
http://<pi-ip>:4485/in your browser. - Navigate to Sites & Apps or File Transfer.
- Drag and drop any folder,
.zip, or.tar.gzfile into the dropzone. - If a
.envor application stack is detected (such as Laravel or WordPress), the UI allows you to review environment variables before deployment. - Click Upload & Deploy β the site is extracted into RAM and immediately available live!
- In Windows Explorer, press
Ctrl+Land enter\\<pi-ip>\dropbox. - Drag and drop any folder or
.tar.gzinto the share. - The server watches the dropbox folder using
inotify. Once copying completes, the archive is ingested, archived to the SD card, and launched live.
You can keep multiple sites active simultaneously:
- Primary Site: Served at the root
http://<pi-ip>/. - Secondary Sites: Automatically accessible at sub-paths:
http://<pi-ip>/<site-slug>/. - Change primary site or toggle sites on/off anytime from the Sites & Apps tab in the web UI.
- Every deployed site automatically provisions an isolated MariaDB database and user:
- Database Name:
w_<site_name> - User:
w_<site_name> - Password: Auto-generated secure random key
- Database Name:
- Credentials are automatically written into
.wtc-db.phpin the site root:<?php // Auto-injected by WTC Pi return [ 'host' => 'localhost', 'name' => 'w_mysite', 'user' => 'w_mysite', 'pass' => 'generated_password', ];
- For framework applications (Laravel, Symfony, etc.),
DB_DATABASE,DB_USERNAME, andDB_PASSWORDare automatically populated in.env. - View and edit database tables, run custom SQL queries, and export dumps directly in the Database tab.
Because sites run on a volatile RAM disk (tmpfs), file changes made at runtime will be lost on a hard reboot unless saved back to the SD card archive.
- On-Demand Save: Click Save State on the Dashboard or run
sudo wtc-manage --save-state. - Selective Persistence (
wtc.json): Include awtc.jsonfile in your site root to declare which folders or files to persist:{ "persist": [ "storage/app/public", "uploads", "database.sqlite" ] } - Automated Saves: Configure automatic snapshots on shutdown, on site switch, or on a recurring cron interval via the Settings tab.
If your application requires custom routing or rewrites, place an nginx.conf file in the root of your project:
location /custom-api/ {
try_files $uri $uri/ /api_handler.php?$args;
}During deployment, the configuration is tested with nginx -t. If validation passes, it is automatically included in the live vhost; if it fails, the deployment safely rolls back.
The built-in wtc-workers daemon handles background tasks:
- Automatically detects Laravel
artisan queue:workand scheduler tasks. - Manage, restart, and inspect worker processes directly from the Dashboard and Settings tabs.
To update your server scripts, management UI, and system services to the latest release without re-running initial setup:
cd PiLabWTC
git pull
sudo ./update.shYou can manage the server directly from the command line:
sudo wtc-manage # Open the interactive whiptail menu
sudo wtc-manage --list # List all available and active sites
sudo wtc-manage --status # Display RAM disk and system health metrics
sudo wtc-manage --set <site> # Switch the active primary site
sudo wtc-manage --create <name> # Create a new skeleton site
sudo wtc-manage --save-state # Snapshot live RAM state back to SD archive
sudo wtc-manage --rollback <site># Roll back site to the previous version
sudo wtc-manage --reload-ui # Reload management UI files into RAMThis project is licensed under the MIT License.