### Update packages and install Docker Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Run these commands to update the package list, install curl and sudo, and then install Docker using the official script. ```bash apt-get update && apt-get install curl sudo curl -fsSL https://get.docker.com | sudo bash ``` -------------------------------- ### Install Apache2 with apt-get Source: https://wiki.aeza.net/en/guides/install-apache2 Install Apache2 on Debian/Ubuntu using apt-get. Ensure nginx is not present before installation. ```bash apt-get install apache2 ``` -------------------------------- ### Install Keitaro with yum and curl Source: https://wiki.aeza.net/en/guides/install-keitaro Run this command in the server console to install Keitaro on CentOS 8 or 9. The installation takes 4 to 10 minutes and may prompt for SSL certificate setup, administrator credentials, and the license key. ```bash yum update -y && curl keitaro.io/install.sh > run && bash run -l ru ``` -------------------------------- ### Install Webmin .deb package Source: https://wiki.aeza.net/en/guides/webmin Installs the downloaded Webmin .deb package. ```bash sudo dpkg -i webmin_1.973_all.deb ``` -------------------------------- ### Install Nginx Source: https://wiki.aeza.net/en/guides/install-nginx Installs Nginx using apt-get. Run as root or with sudo. ```bash apt-get install nginx -y ``` -------------------------------- ### Verify Homebrew installation Source: https://wiki.aeza.net/en/guides/mtr Verifies that Homebrew is installed correctly. If successful, the installed Homebrew version is displayed. ```bash brew -v ``` -------------------------------- ### Install certbot Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Installs certbot on the server to issue SSL certificates. ```bash apt-get install certbot -y ``` -------------------------------- ### Webmin installation success message Source: https://wiki.aeza.net/en/guides/webmin Expected output after a successful Webmin installation. ```text Webmin install complete. You can now login to https://nameserver:10000/ as root with your root password, or as any user who can use sudo to run commands as root. ``` -------------------------------- ### Install Webmin dependencies Source: https://wiki.aeza.net/en/guides/webmin Installs Perl and other dependencies required by Webmin. ```bash sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python3 apt-transport-https ``` -------------------------------- ### Example MTR command with sample IP Source: https://wiki.aeza.net/en/guides/mtr Example MTR command on macOS using a sample IP address (203.0.113.10). ```bash sudo mtr -rwzb -c 200 203.0.113.10 ``` -------------------------------- ### Start Webmin service Source: https://wiki.aeza.net/en/guides/webmin Starts the Webmin service if the IP:10000 link is not accessible. ```bash sudo /etc/init.d/webmin start ``` -------------------------------- ### Install Speedtest on Ubuntu 20.04 Source: https://wiki.aeza.net/en/guides/speedtest/linux Install Speedtest on Ubuntu 20.04 LTS: update package lists, install curl, download the Speedtest repository script, and install the speedtest package. ```bash sudo apt-get -y update ``` ```bash apt-get install -y curl ``` ```bash curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash ``` ```bash sudo apt-get install speedtest ``` -------------------------------- ### Start Conduwuit with Docker Compose Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Run this command in the conduwuit folder (e.g., /root/conduwuit/) to start the Conduwuit container. The command is `docker compose up -d`. ```bash docker compose up -d ``` -------------------------------- ### Install MTR on Ubuntu/Debian Source: https://wiki.aeza.net/en/guides/mtr Installs MTR on Ubuntu/Debian-based Linux systems. Requires root privileges; the -y flag automatically confirms the installation. ```bash apt update && apt install mtr -y ``` -------------------------------- ### Restart and enable Nginx Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Restarts Nginx and enables it to start automatically on boot. ```bash systemctl restart nginx systemctl enable nginx ``` -------------------------------- ### Update package list Source: https://wiki.aeza.net/en/guides/webmin Updates the package list on the server before installing Webmin. ```bash sudo apt-get update ``` -------------------------------- ### Install PHP module for Apache2 Source: https://wiki.aeza.net/en/guides/install-apache2 Install libapache2-mod-php to use PHP files with Apache2. ```bash apt-get install libapache2-mod-php -y ``` -------------------------------- ### Chroot into mounted system Source: https://wiki.aeza.net/en/servers/virtual/rescue Changes the root directory to /mnt to access the installed system. ```bash chroot /mnt ``` -------------------------------- ### Install PHP for Nginx Source: https://wiki.aeza.net/en/guides/install-nginx Adds the Sury PHP repository and installs PHP 7.4 with mcrypt, mysql, and fpm extensions. Required only for sites that need PHP script execution. ```bash wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - echo "deb https://packages.sury.org/php/ stretch main" | tee /etc/apt/sources.list.d/php.list sudo apt-get -y install php7.4 php7.4-{mcrypt,mysql,fpm} ``` -------------------------------- ### Install Apache2 on CentOS with yum Source: https://wiki.aeza.net/en/guides/install-apache2 For CentOS, use yum to install httpd, the second name for Apache2. ```bash yum install httpd ``` -------------------------------- ### Access Keitaro admin panel Source: https://wiki.aeza.net/en/guides/install-keitaro After installation, connect to the Keitaro control panel using this address. You will need to enter your activation key, system currency, timezone, and administrator credentials. ```text http:///admin ``` -------------------------------- ### Create and enter conduwuit directory Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Create a directory named 'conduwuit' at the root and change into it to store the configuration files. ```bash mkdir /conduwuit cd /conduwuit ``` -------------------------------- ### Install Homebrew on macOS Source: https://wiki.aeza.net/en/guides/mtr Installs Homebrew, the package manager required to install MTR on macOS. Run in the Terminal application; macOS may prompt for your account password during installation. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Configure new server network and SSH Source: https://wiki.aeza.net/en/guides/disk-transfer Commands to run on the new server via VNC. Opens port 22, sets root password, and configures static IP. Replace NEW_SERVER_IP and the password. ```bash iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT; chpasswd <<<"root:aezasecretpass7725" nmcli con mod "Wired connection 1" ipv4.addresses NEW_SERVER_IP/32 ipv4.gateway 10.0.0.1; nmcli con mod "Wired connection 1" ipv4.dns "1.1.1.1" nmcli con mod "Wired connection 1" ipv4.method manual; nmcli con up "Wired connection 1" ``` -------------------------------- ### Download Webmin .deb file Source: https://wiki.aeza.net/en/guides/webmin Downloads the Webmin .deb file (version 1.973) from SourceForge. ```bash wget http://prdownloads.sourceforge.net/webadmin/webmin_1.973_all.deb ``` -------------------------------- ### Install MTR on macOS Source: https://wiki.aeza.net/en/guides/mtr Installs MTR on macOS via Homebrew. If prompted for confirmation during installation, press Y and then Enter. ```bash brew install mtr ``` -------------------------------- ### Enable site with a2ensite Source: https://wiki.aeza.net/en/guides/install-apache2 Enable the site using a2ensite, specifying the name of your site file. ```bash a2ensite server_name.conf # specify the name of your site file ``` -------------------------------- ### Create Nginx configuration file Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Opens the Nginx site configuration file for editing. ```bash nano /etc/nginx/sites-available/conduwuit ``` -------------------------------- ### .env file content for Conduwuit Source: https://wiki.aeza.net/en/guides/conduwuit-messenger This environment file sets the server name, enables registration, and specifies the registration token. Replace example.com with your domain and the placeholder with the generated token. ```dotenv SERVER_NAME=example.com ALLOW_REGISTRATION=true REGISTRATION_TOKEN= ``` -------------------------------- ### Create SSH key file with nano Source: https://wiki.aeza.net/en/guides/ssh-keys Use this command to create or open the authorized_keys file on the server. After running it, an empty text file opens where you can paste your public key. ```bash nano /root/.ssh/authorized_keys ``` -------------------------------- ### Open .env file for editing Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Use nano to create and edit the .env file in the conduwuit directory. ```bash nano .env ``` -------------------------------- ### View issued certificate files Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Lists the files of the issued certificate. Replace your-domain.example with your domain. ```bash ls -la /etc/letsencrypt/live/matrix.your-domain.example/ ``` -------------------------------- ### Navigate to Windows Config Directory Source: https://wiki.aeza.net/en/servers/virtual/rescue Navigates to the Windows configuration directory where the SAM file resides. ```bash cd /mnt/Windows/System32/config ``` -------------------------------- ### Fix dependency errors Source: https://wiki.aeza.net/en/guides/webmin Fixes unsatisfied dependencies if the Webmin installation fails. ```bash sudo apt-get install -f ``` -------------------------------- ### ExecStart line with --httpauth Source: https://wiki.aeza.net/en/guides/torrserver The original ExecStart line in the torrserver.service file that includes the --httpauth flag for authorization. ```ini ExecStart = /opt/torrserver/torrserver -d /opt/torrserver -p 8080 --httpauth ``` -------------------------------- ### Enable Nginx site configuration Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Creates a symbolic link to enable the Conduwuit site configuration. ```bash ln -s /etc/nginx/sites-available/conduwuit /etc/nginx/sites-enabled/ ``` -------------------------------- ### Check Nginx status Source: https://wiki.aeza.net/en/guides/install-apache2 Check if Nginx is running. If no large message with information appears, Nginx is not installed. ```bash service nginx status ``` -------------------------------- ### Check Apache2 status Source: https://wiki.aeza.net/en/guides/install-nginx Checks if Apache2 is running. If no large message with information appears, Apache2 is not installed. ```bash service apache2 status ``` -------------------------------- ### Configure old server network Source: https://wiki.aeza.net/en/guides/disk-transfer Commands to run on the old server via VNC. Sets static IP and DNS. Replace OLD_SERVER_IP. ```bash nmcli con mod "Wired connection 1" ipv4.addresses OLD_SERVER_IP/32 ipv4.gateway 10.0.0.1; nmcli con mod "Wired connection 1" ipv4.dns "1.1.1.1" nmcli con mod "Wired connection 1" ipv4.method manual; nmcli con up "Wired connection 1" ``` -------------------------------- ### Fix PATH for MTR on macOS Source: https://wiki.aeza.net/en/guides/mtr Adds Homebrew's sbin directory to the PATH in ~/.zshrc and reloads the configuration. Run these commands one by one if the MTR command does not start. ```bash echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc ``` ```bash source ~/.zshrc ``` -------------------------------- ### Restart Webmin to apply SSL settings Source: https://wiki.aeza.net/en/guides/webmin Restart the Webmin service to apply the new SSL certificate configuration. ```bash /etc/init.d/webmin restart ``` -------------------------------- ### Update TorrServer via console command Source: https://wiki.aeza.net/en/guides/torrserver Run this command in the server console to automatically update TorrServer to the current version and restart it. It stops the service, removes the old binary, detects the architecture, downloads the latest release, and starts the service again. ```bash dir="/opt/torrserver" bin="torrserver" systemctl stop torrserver.service rm -r ${dir}/${bin} dir="/opt/torrserver" mkdir -p ${dir} architecture="" case $(uname -m) in i386) architecture="386" ;; i686) architecture="386" ;; x86_64) architecture="amd64" ;; arm) dpkg --print-architecture | grep -q "arm64" && architecture="arm64" || architecture="arm7" ;; esac url=$(curl --silent https://github.com/YouROK/TorrServer/releases/ | grep TorrServer-linux-${architecture} | head -1 | awk -F " '{print $2}') wget -O ${dir}/${bin} https://github.com/${url} chmod +x ${dir}/${bin} systemctl start torrserver.service echo -e "\nTorrServer Online - update completed\n" >/dev/pts/0 ``` -------------------------------- ### Enable SSL module Source: https://wiki.aeza.net/en/guides/install-apache2 Enable the SSL encryption module for Apache2. ```bash a2enmod ssl ``` -------------------------------- ### Open docker-compose.yml for editing Source: https://wiki.aeza.net/en/guides/conduwuit-messenger Use nano to create and edit the docker-compose.yml file in the conduwuit directory. ```bash nano docker-compose.yml ``` -------------------------------- ### Mount main partition to /mnt Source: https://wiki.aeza.net/en/servers/virtual/rescue Mounts the main filesystem partition to /mnt for accessing server data via SFTP. ```bash mount /dev/vda2 /mnt ``` -------------------------------- ### Create Nginx server configuration Source: https://wiki.aeza.net/en/guides/install-nginx Create a file named server_name.conf in /etc/nginx/sites-available with this content, adjusting domain, paths, and PHP socket as needed. The PHP location block can be deleted if not required. ```nginx server { listen *:80; server_name aeza.net; # site domain client_max_body_size 1000M; # maximum file size transmitted through the site error_page 404 = @notfound; location / { root /home/site/aeza; # path to the site try_files $uri $uri.html $uri/ @extensionless-php; index index.html index.php; } # PHP connections, if not needed, then delete from line 12 to 19 location ~ \.(php|html|htm)$ { try_files $uri =404; root /home/site/aeza; # path to the site fastcgi_pass unix:/run/php/php7.0-fpm.sock; # path to php fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params; } } ``` -------------------------------- ### Open /etc/network/interfaces Source: https://wiki.aeza.net/en/guides/setting-network Open the network interfaces file for editing on Ubuntu/Debian. ```bash nano /etc/network/interfaces ```