Disclaimer: This guide was automatically translated by AI from the German original. Please verify commands and technical details before using them.
Update your system:
apt update ; apt upgrade -y
Install Apache2, PHP, MariaDB, and the required PHP modules:
apt install sudo unzip curl gnupg2 apache2 php php-cli php-curl php-gd php-intl php-json php-mbstring php-mysql php-opcache php-readline php-xml php-xsl php-zip php-bz2 libapache2-mod-php mariadb-server mariadb-client -y
Secure the MariaDB installation:
mysql_secure_installation
Note: Press Enter at the password prompt and confirm all questions with Enter, except when setting the root password.
Restart the Apache web server:
systemctl restart apache2
Download and extract phpMyAdmin:
cd /usr/share && wget https://files.phpmyadmin.net/phpMyAdmin/5.0.3/phpMyAdmin-5.0.3-all-languages.zip ; unzip phpMyAdmin-5.0.3-all-languages.zip ; rm phpMyAdmin-5.0.3-all-languages.zip ; mv phpMyAdmin-5.0.3-all-languages phpmyadmin ; chmod -R 0755 phpmyadmin
Create the configuration file:
nano /etc/apache2/conf-available/phpmyadmin.conf
Add the following lines:
# phpMyAdmin Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/templates>
Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/libraries>
Require all denied
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Require all denied
</Directory>
Enable the configuration and reload Apache:
a2enconf phpmyadmin
systemctl reload apache2
Create a new user in MariaDB:
mysql -u root
Create the user:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Note: Adjust
usernameandpasswordas needed.
Grant all privileges:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;
Exit MariaDB:
exit
Log in at IP/phpmyadmin or Domain/phpmyadmin.
apt update && apt upgrade -y
apt install certbot python-certbot-apache -y
Note: If the package is not available, use this instead:
apt install certbot python3-certbot-apache -y
Start Certbot:
certbot --authenticator webroot --installer apache
Follow the instructions:
Y for yes, N for no./var/www/html/.1 = No, no redirect2 = Yes, enable redirectTo renew the certificates automatically, run the following command:
cd /etc/cron.daily ; wget https://raw.githubusercontent.com/kanuracer/scripts/main/linux/helper/certrenew.sh ; chmod +x certrenew.sh ; cd
Tip: This cron job is checked daily and renews the certificate automatically when needed.
To install WordPress, switch to the web directory:
cd /var/www/html
Download the WordPress files:
wget https://de.wordpress.org/latest-de_DE.zip
Extract the files:
unzip latest-de_DE.zip
Delete the .zip file:
rm latest-de_DE.zip
Move the files into the web directory:
cp -ar /var/www/html/wordpress/* /var/www/html/
rm -r wordpress/
Set the correct permissions:
chown www-data:www-data -R *
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
Create a user and a database in phpMyAdmin. You can then finish the installation via your IP address or domain.
sudo apt update && sudo apt upgrade -y
Install Redis:
sudo apt install redis-server -y
Check the Redis status:
systemctl status redis
If Redis is not running, start it:
sudo systemctl start redis
Open the Redis configuration file:
nano /etc/redis/redis.conf
Change supervised no to:
supervised systemd
Save the file and restart Redis:
sudo systemctl restart redis
Check whether Redis works:
redis-cli ping
If everything is correct, PONG should be displayed.
Install the PHP Redis extension:
sudo apt install php-redis -y
Restart the web server:
systemctl restart apache2
Install and activate the Redis Object Cache plugin in WordPress. Go to Settings → Redis and click Connect.
Run the following command to check whether Redis is active:
redis-cli monitor
Make sure bind 127.0.0.1 is set in /etc/redis/redis.conf.
Set a password in the configuration file:
requirepass YOUR_SECURE_PASSWORD
Restart Redis:
systemctl restart redis
Check access with:
redis-cli -a YOUR_SECURE_PASSWORD ping
Add the following lines to wp-config.php:
define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PORT', 6379 );
define( 'WP_REDIS_PASSWORD', 'YOUR_SECURE_PASSWORD' );
define( 'WP_REDIS_TIMEOUT', 1 );
define( 'WP_REDIS_READ_TIMEOUT', 1 );
define('WP_REDIS_SCHEME', 'tcp');
define('WP_REDIS_MAXTTL', 3600);
Download the setup script:
wget -O /root/serverupdate.sh https://raw.githubusercontent.com/kanuracer/scripts/main/linux/helper/serverupdate.sh
Make it executable:
chmod +x /root/serverupdate.sh
Run the setup:
/root/serverupdate.sh
Note: You will be asked for an update interval (daily / weekly / monthly / custom). After that, all required scripts and services are created.
You can then check whether everything worked:
systemctl list-timers | grep auto-apt
systemctl status auto-apt.timer
If needed, you can also check the log:
cat /var/log/auto-apt.log
Install Nextcloud in the /var directory:
cd /var/www/html
Download the installation files:
wget https://download.nextcloud.com/server/releases/latest.tar.bz2
Extract the files:
tar xfvj latest.tar.bz2
Delete the .tar.bz2 file:
rm latest.tar.bz2
Enable the Apache rewrite module:
a2enmod rewrite
Restart Apache:
systemctl restart apache2
Set permissions:
chown -R www-data:www-data /var/www/html/nextcloud/
Finish the installation at IP/nextcloud or Domain/nextcloud.
Update the system:
apt update && apt upgrade -y
Add a new user:
adduser --disabled-login ts3
Switch to the user:
su - ts3
Download TeamSpeak and extract it:
wget https://files.teamspeak-services.com/releases/server/3.13.2/teamspeak3-server_linux_amd64-3.13.2.tar.bz2
tar xfvj teamspeak3-server_linux_amd64-3.13.2.tar.bz2
Accept the license:
touch .ts3server_license_accepted
Start the server:
./ts3server_startscript.sh start
Create the autostart script and run it:
cd /home/ts3
wget https://raw.githubusercontent.com/kanuracer/scripts/main/linux/helper/ts3-autostart.sh
chmod 777 ts3-autostart.sh
./ts3-autostart.sh /home/ts3/teamspeak3-server_linux_amd64
Add the Webmin repository to your sources.list:
nano /etc/apt/sources.list
Add the following line:
deb https://download.webmin.com/download/repository sarge contrib
Save and close the file. Switch to the root directory:
cd /root
Download the Webmin key and install it:
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
Switch to the /var directory and install Webmin:
cd /var/www
apt install apt-transport-https
apt update
apt install webmin
Access the web panel at IP:10000.
Add the repository:
echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
Update the data:
apt update
Install Cockpit:
apt install cockpit
Access Cockpit at Domain:9090 or IP:9090.
Install the dependencies:
apt -y install libapache2-mod-php7.4 php7.4-mbstring php7.4-xml php7.4-common php7.4-sqlite3 php7.4-zip git
Warning: Make sure to adjust the PHP version.
Create a new folder in /usr/share:
cd /usr/share && mkdir heimdall
cd heimdall/
Download Heimdall:
git clone -q https://github.com/linuxserver/Heimdall.git /usr/share/heimdall
Set permissions:
chown -R www-data:www-data /usr/share/heimdall/
chmod -R 755 /usr/share/heimdall/
Link the public folder into the web root:
ln -s /usr/share/heimdall/public/ /var/www/html
Rename it as desired:
mv public heimdall
Run the following commands:
cp .env.example .env && php artisan key:generate
Start the development server:
php artisan serve --host 0.0.0.0
Open http://ip-or-domain:8000 to customize the dashboard.