π₯οΈ Essential Commands & Management
Note: This guide provides essential commands for managing your Xtream-UI panel. All commands should be executed in the
/home/xtreamcodes/iptv_xtream_codes/
directory unless specified otherwise.
π Prerequisitesβ
- Linux server with Xtream-UI installed
- Root privileges or sudo access
- Basic SSH and terminal knowledge
π Essential Commandsβ
βΆοΈ Start Servicesβ
Starts all Xtream-UI panel services.
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
βΉοΈ Stop Servicesβ
Gracefully stops all Xtream-UI panel services.
/home/xtreamcodes/iptv_xtream_codes/stop_services.sh
π Restart Servicesβ
Restarts all panel services (stops and starts).
/home/xtreamcodes/iptv_xtream_codes/restart_services.sh
π Update Panelβ
Updates Xtream-UI to the latest version.
/home/xtreamcodes/iptv_xtream_codes/update.sh
π οΈ Check and Repair Databaseβ
Verifies and fixes MySQL database issues.
/home/xtreamcodes/iptv_xtream_codes/tools/repair_db.sh
π‘οΈ Additional Security Commandsβ
π Change Admin Passwordβ
Update your Xtream-UI admin password.
/home/xtreamcodes/iptv_xtream_codes/change_creds.sh
π Check Service Statusβ
View the status of all Xtream-UI services.
systemctl status xtream_codes
π Monitoring Commandsβ
π View Server Resourcesβ
Check CPU, memory, and disk usage.
top -b -n 1 | head -n 20
π‘ Check Network Connectionsβ
Monitor active connections to your server.
netstat -tulpn | grep -i xtream
π‘ Tipsβ
- Always backup your database before updates
- Monitor disk space regularly
- Check logs in
/home/xtreamcodes/iptv_xtream_codes/logs/
for errors - Use
screen
ortmux
for long-running commands
π Fixing Ownership and Permissionsβ
π Reset File Ownershipβ
Reset ownership of all Xtream-UI files to the correct user and group:
chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/iptv_xtream_codes/
π§ Set Correct Permissionsβ
Set proper permissions for the Xtream-UI directory:
find /home/xtreamcodes/iptv_xtream_codes/ -type d -exec chmod 755 {} \;
find /home/xtreamcodes/iptv_xtream_codes/ -type f -exec chmod 644 {} \;
chmod -R 777 /home/xtreamcodes/iptv_xtream_codes/tv_*
chmod -R 777 /home/xtreamcodes/iptv_xtream_codes/tmp
chmod +x /home/xtreamcodes/iptv_xtream_codes/start_services.sh
chmod +x /home/xtreamcodes/iptv_xtream_codes/stop_services.sh
chmod +x /home/xtreamcodes/iptv_xtream_codes/restart_services.sh
chmod +x /home/xtreamcodes/iptv_xtream_codes/update.sh
chmod +x /home/xtreamcodes/iptv_xtream_codes/tools/*.sh
π Verify Permissionsβ
Check current ownership and permissions:
ls -la /home/xtreamcodes/iptv_xtream_codes/
π οΈ Common Permission Issuesβ
- If streams are not loading, check Nginx and PHP-FPM logs
- If the panel shows 500 errors, verify file permissions
- After updates, always reset permissions
β οΈ Warning: Only run commands you understand. Incorrect usage may disrupt your service.
Last updated: July 2025 Check Panel Status Displays the current status of the panel and its active services. bash
/home/xtreamcodes/iptv_xtream_codes/status.sh
Reauthorize Load Balancer Reauthorizes load balancer servers (useful for connection issues). bash
/home/xtreamcodes/iptv_xtream_codes/tools/mysql.sh
Reset Panel Resets the panel to its default state. Warning: This may cause data loss, so back up your data first. bash
/home/xtreamcodes/iptv_xtream_codes/tools/reset.sh
Clean Log Files Clears log files to free up disk space. bash
/home/xtreamcodes/iptv_xtream_codes/tools/clean_logs.sh
Backup Panel Creates a backup of the Xtream-UI panel. bash
/home/xtreamcodes/iptv_xtream_codes/tools/backup.sh
Restore Backup Restores a previously created backup. bash
/home/xtreamcodes/iptv_xtream_codes/tools/restore.sh
Important NotesRoot Access: Most commands require root privileges. Use sudo or log in as the root user. Caution with Resets: Commands like reset.sh can erase data. Always create a backup before using such commands. XUI.ONE Differences: If youβre using XUI.ONE instead of Xtream-UI, commands may differ and are typically located in /home/xui/. For example:Stop services: /home/xui/service stop Start services: /home/xui/service start View tools: /home/xui/tools
Backups: Regularly back up your panel using the backup.sh command to avoid data loss.
Troubleshooting TipsIf services fail to start, check the panel status with status.sh to identify issues. Ensure the MySQL database is running properly before executing commands like repair_db.sh. For persistent issues, consult the Xtream-UI community or documentation for advanced support.