Skip to main content

πŸ–₯️ 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 or tmux 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.