peertube-plugin-static-review
v1.2.0
Published
Admin dev tools for PeerTube — logs, system info, file browser, terminal, SSH, and database manager
Maintainers
Readme
peertube-plugin-static-review
A lightweight admin dev tools plugin for PeerTube that provides system monitoring, file browsing, and an optional command terminal — all from within the PeerTube admin interface.
Features
- Logs Viewer — In-memory log viewer with filtering by type (system, video, user) and one-click clear
- System Info — Real-time server stats including CPU, memory, uptime, load average, and Node.js version
- Environment Variables — View PeerTube-related environment variables (secrets are masked)
- File Browser — Browse the server filesystem with support for absolute paths, file preview, and file downloads
- Terminal — Execute shell commands on the server as the PeerTube user (disabled by default, must be explicitly enabled)
Screenshots
Access everything from a single tabbed interface via the Dev Tools sidebar link.
Requirements
- PeerTube v4.0.0 or later
- Admin-level access
Installation
From npm
cd /var/www/peertube/peertube-latest
sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production \
npm run plugin:install -- --npm-name peertube-plugin-static-review
sudo systemctl restart peertubeOr install from the PeerTube admin UI under Administration → Plugins/Themes → Search and search for static-review.
From source
git clone https://github.com/michaeljsjmartin/peertube-plugin-static-review.git /tmp/peertube-plugin-static-review
cd /var/www/peertube/peertube-latest
sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production \
npm run plugin:install -- --plugin-path /tmp/peertube-plugin-static-review
sudo systemctl restart peertubeUsage
After installation, click 🛠️ Dev Tools in the left sidebar (you must be logged in as an admin).
Settings
Go to Administration → Plugins → static-review → Settings to configure:
| Setting | Description | Default |
|---|---|---|
| Enable Command Execution | Enables the terminal tab. Only turn this on if you understand the risks. | false |
| Command Timeout | Max execution time for commands in seconds | 30 |
| Allowed File Browser Paths | Comma-separated list of allowed paths, or * for unrestricted | * |
Security
- All API endpoints require admin authentication
- Command execution is disabled by default and must be explicitly enabled in settings
- Environment variable output masks values containing
PASSWORD,SECRET, orKEY - File path traversal (
..) is stripped from all requests - Commands run as the PeerTube system user, not root (unless PeerTube itself runs as root, which is not recommended)
⚠️ Warning: Enabling command execution gives full shell access as the PeerTube user. Only enable this in trusted environments.
Uninstallation
cd /var/www/peertube/peertube-latest
sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production \
npm run plugin:uninstall -- --npm-name peertube-plugin-static-review
sudo systemctl restart peertubeTroubleshooting
| Symptom | Fix |
|---|---|
| Sidebar link missing | Ensure plugin is enabled in admin UI, restart PeerTube, hard-refresh browser (Ctrl+Shift+R) |
| 404 on client page | Bump version in package.json, reinstall, and restart to bust cache |
| 403 on API calls | Must be logged in as admin |
| "No settings" in admin | Uninstall, restart, reinstall, restart again |
| ENOENT errors | Check that the file path exists and is readable by the PeerTube user |
License
MIT
