Tutorials - Ubuntu

Video thumbnail image for Monitor EVERYTHING! Simple homelab monitoring for servers, websites, and more!

Monitor EVERYTHING! Simple homelab monitoring for servers, websites, and more!

Setting up monitoring on your homelab is crucial. Get alerted when anything goes down, configure settings, and be confident your homelab services are all working appropriately. Uptime-Kuma github: https://github.com/louislam/uptime-kuma Uptime-Kuma installation instrucitons: https://github.com/louislam/uptime-kuma/wiki/%F0%9F%94%A7-How-to-Install Install NVM on ubuntu: sudo apt install curl, git curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash source ~/.bashrc Install Node 20 nvm install 20 Use Node 20 nvm use 20 check that node and npm are working: node -v npm -v Get uptime kuma and start setup git clone https://github.com/louislam/uptime-kuma.git cd uptime-kuma npm run setup Install pm2 and logrotate npm install pm2 -g && pm2 install pm2-logrotate start your server with pm2 pm2 start server/server.js --name uptime-kuma setup startup service to ensure uptime kuma starts on boot pm2 save && pm2 startup ensure that you copy the command from your terminal and run it to get startup working appropriately Simple monitoring: DNS - use this to monitor any domains and DNS entries you want Ping - simply pings a machine and returns a response, good for checking that a machine is running HTTP(s) - use this to pull an actual webpage and check that you got a response ** A note about SSL When I initially was running uptime kuma at first it was confused about SSL certs and thought it was getting the wrong ones, the next day this magically resolved itself, so you can ignore ssl cert errors if you are confident your ssl certs are correct, and you can likely come back and unignore them later Grouping if your friend, setup groups to be able to monitor things more easily Setting up notifications: Discord go to your own discord channel right click on your channel name server settings -- integrations -- view webhooks -- new webhook copy the webhook URL save the webhook in discord in uptime kuma paste the webhook URL check default enabled if you want check apply on all existing monitors if you want test and save

Watch Video on Youtube

Published on: 12/13/2023

Video thumbnail image for Run the newest LLM's locally!  No GPU needed, no configuration, fast and stable LLM's!

Run the newest LLM's locally! No GPU needed, no configuration, fast and stable LLM's!

This is crazy, it can run LLM's without needing a gpu at all, and it runs it fast enough that it is usable! Setup your own AI chatbots, AI coder, AI medical bot, AI creative writer, and more! Install on Linux or Windows Subsystem for Linux 2 curl https://ollama.ai/install.sh | sh Install on Mac: https://ollama.ai/download/mac Pull and run a model ollama run [modelname] Pull and run a 13b model ollama run [modelname]:13b Exit out from running ollama /bye Ollama website: https://ollama.ai/ Ollama Github https://github.com/jmorganca/ollama Start Ollama if it is not running sudo systemctl start ollama Stop Ollama if you wanted to for some reason sudo systemctl stop ollama Stop ollama from booting up on system boot sudo systemctl disable ollama

Watch Video on Youtube

Published on: 12/9/2023

Video thumbnail image for Training SD Models with AMD GPU's in DreamBooth!  Surprisingly fast results!

Training SD Models with AMD GPU's in DreamBooth! Surprisingly fast results!

Training your own custom Stable Diffusion models in dreambooth with AMD GPU's is awesome! Add pictures of people you know and train the AI to put them into pictures. Bring patterns and textures into a model. Train SD to draw a character more reliably by using real photos and telling SD who that character is to produce reliable results! Endless possibilities! Install Dreambooth extension in Automatic1111 Change diffusers to 0.23.1 go to stable-dffusion-webui/extensions/sd_dreambooth_extension edit file requirements.txt find line with diffusers and change to ==0.23.1 save file In command line source venv/bin/activate pip install -r /extensions/sd_dreambooth_extension/requirements.txt After that you should be able to start SD like normal Dreambooth tab create a model once created ensure that model is selected go to concepts put in directory of training images put in the prompt you want to be associated with those images sample images tab put in a prompt to generate images after training is done -- include the new prompt you just made parameters tab 8bit adam uses bits and bytes, only viable if you have bits and bytes compiled correctly with ROCm or are using Nvidia cards AMD use Torch AdamW uncheck use ema uncheck cache latents Mixed precision bf16 Check Full Mixed Precision Intervals Save Model Frequency bump up to only saving a few times during training Save Previews Frequency drop to 0 Image Generation Tab Native Diffusers EulerAncestralDiscrete has worked for me Image Processing - if you have vram issues drop down scale to 256 Save config before training! Hit train and see how it goes, you can train a model more, but if you over train a model you will need to start over.

Watch Video on Youtube

Published on: 12/2/2023

Video thumbnail image for How to run your own VOIP server.  Open source voice server for friends, gaming, and more!

How to run your own VOIP server. Open source voice server for friends, gaming, and more!

In this video we will go over step by step instruction for installing and running your own VOIP server. Incredibly stable voice server that can be used for chatting, gaming, friends, family, and more. Ultra low latency for clear communication, highly customizable, and able to support hundreds of concurrent users. Client software available on windows/mac/linux/ios/android. Users should be able to connect to your VOIP server from just about any device. Server Installation: sudo apt update sudo apt upgrade sudo apt-get install mumble-server sudo dpkg-reconfigure mumble-server Inside reconfigure Yes to running on boot Yes to higher priority set [SuperUser password] Edit Mumble configuration file sudo nano /etc/mumble-server.ini Inside configuration file lines to consider editing welcometext port serverpassword users messageburst messagelimit public server registration if you really want it to be public sslCert sslKey autobanAttempts autobanTimeframe autobanTime To connect to your server from mumble client Server -- click connect click add new address = [ip of server] or [domain or subdomain setup through DNS] port = [64738] username = [pick a username] label = give it a label so you know what server you are connecting to To connect as super user username = SuperUser password = [super user password] To allow users to connect from a domain rather than your home IP address setup a DNS entry pointing to your home [IP address] Home router port forwarding find port forwarding and setup a rule as follows from anywhere on port [64738] to [serverIP] on port [64738] accept You and friends who you give access to should now be able to connect using the DNS entry you created and connect to your mumble server! You can also install the server on windows as a windows service! For more installation instructions on different operating systems see the mumble documentation here: https://wiki.mumble.info/wiki/Installing_Mumble

Watch Video on Youtube

Published on: 11/30/2023

Video thumbnail image for Install and run LLM's Locally with text generation webui on AMD gpu's!

Install and run LLM's Locally with text generation webui on AMD gpu's!

Let's setup and run large language models similar to ChatGPT locally on our AMD gpu's! ### Installing ROCm sudo apt update sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev sudo apt update wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb sudo apt install ./amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm sudo usermod -aG video $USER sudo usermod -aG render $USER sudo reboot ### Installing Text Generation Webui mkdir ~/gpt cd gpt/ git clone https://github.com/oobabooga/text-generation-webui cd text-generation-webui # Setup virtual env python3 -m venv venv source venv/bin/activate # Install correct torch ROCm5.6 pip3 install torch --index-url https://download.pytorch.org/whl/rocm5.6 # Install the rest of dependencies pip3 install -r requirements_amd.txt # Installing with no avx support pip3 install -r requirements_amd_noavx2.txt # Create launch script sudo nano launch.sh # Inside launch script paste: #!/bin/bash source venv/bin/activate export HIP_VISIBLE_DEVICES=0 export HSA_OVERRIDE_GFX_VERSION=11.0.0 python3 ./server.py --listen ### save and exit your launch script # Make script executable sudo chmod +x launch.sh # Now you can launch webui with your script ./launch.sh Model from the video: TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ Some settings to check if models are not loading: Disable exllama float 32 fp4 Transformers works most of the time, not always performant though. Generally load_in_8bit and load_in_4bit will not work -- it uses bitsandbytes which has bad ROCm support.

Watch Video on Youtube

Published on: 11/22/2023

Video thumbnail image for AMD ROCm in linux with Automatic1111 running stable diffusion!  Simple guide to getting started!

AMD ROCm in linux with Automatic1111 running stable diffusion! Simple guide to getting started!

This is the one. The simplest way to get ROCm running Automatic1111 Stable diffusion with all features on AMD gpu's! Inside terminal: sudo apt update sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev sudo apt update wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb sudo apt install ./amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm sudo usermod -aG video $USER sudo usermod -aG render $USER sudo reboot After you have rebooted, inside terminal again make a directory for stable diffusion mkdir sd If you get a permission denied then use sudo mkdir sd Skip this step if you did not have to use sudo change owner to be yourself sudo chown -R $USER:$USER sd/ change into new directory cd sd clone automatic1111 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui cd stable-diffusion-webui setup python venv python3 -m venv venv source venv/bin/activate install packages pip3 install -r requirements.txt uninstall cuda torch pip3 uninstall torch torchvision install torch ROCm pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6 create launch script: sudo nano launch.sh inside the launch file paste the contents of this url: https://github.com/jhodak/linux-configuration-files/blob/main/SD/launch-sh to launch SD bash launch.sh   optional parameters for your launch script: --no-half --precision full --upcast-sampling --no-half-vae --medvram If you don't need these extra parameters I would recommend not to turn them on. You may only need one or two of these parameters. If you do not have an 11.0.0 graphics card, you may need to try: HSA_OVERRIDE_GFX_VERSION=10.3.0 If you have an AMD integrated GPU, and you are having troubles, you may need to change: HIP_VISIBLE_DEVICES=1 If you are having some memory troubles try changing garbage collection threshold in launch script to 0.9

Watch Video on Youtube

Published on: 11/12/2023

Video thumbnail image for Let's make a dual-boot PC!  Windows + Ubuntu 22.04 Desktop!

Let's make a dual-boot PC! Windows + Ubuntu 22.04 Desktop!

This goes over creating a dual-boot PC that will let you boot into both Windows or Ubuntu Desktop. **If you are formatting drives, ensure that you choose the correct drive to install Ubuntu Desktop onto!** Requirements: Empty USB stick larger than 6Gb Ubuntu desktop 22.04 iso image Rufus.exe file Recommended: A drive entirely dedicated to linux, 1Tb or larger ideally. Ubuntu Downloads: https://ubuntu.com/download/desktop Rufus Tool for creating a bootable USB drive: https://rufus.ie/downloads/

Watch Video on Youtube

Published on: 11/12/2023

Video thumbnail image for Absolute beginners guide to linux command line

Absolute beginners guide to linux command line

Guide for absolute beginners learning command line including many of the most commonly used commands in linux. Commands in this video: sudo ls cd touch mkdir cp mv rm apt-get nano man htop df exit shutdown reboot ping which clear whoami unzip

Watch Video on Youtube

Published on: 11/5/2023

Video thumbnail image for Make Nextcloud fast!  Full tutorial and server setup!

Make Nextcloud fast! Full tutorial and server setup!

Nextcloud is a great system for setting up your personal cloud and sharing with friends. It can be frustrating when it is slow. Let's get nextcloud entirely setup and optimized for performance on your server! ** PHP 8.3 is out. Nextcloud currently will NOT run on php8.3. Many required php packages for php8.3 are not out yet, such as intl, mysql, curl, and others** ** This guide has been updated to specify installing php 8.2 packages, be sure you are running php8.2!** **Nextcloud 28 is out, it also wants you to install bz2 php extension** **sudo apt-get install php8.2-bz2** *Server setup* sudo apt-get update sudo apt-get upgrade sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get install apache2 php8.2-fpm sudo nano /etc/apache2/sites-available/nextcloud.conf *paste in the code from here:* https://github.com/jhodak/linux-configuration-files/blob/main/Apache_Reverse_Proxy_Configs/Nextlcoud sudo a2enconf php8.2-fpm sudo a2ensite nextcloud.conf sudo apt-get install imagemagick php8.2-imagick memcached libmemcached-tools php8.2-memcached php8.2-apcu mariadb-server php8.2-gd php8.2-mysql php8.2-curl php8.2-mbstring php8.2-intl php8.2-gmp php8.2-bcmath php8.2-xml php8.2-zip unzip smbclient sudo a2enmod headers rewrite mpm_event http2 mime proxy proxy_fcgi setenvif alias dir env ssl proxy_http proxy_wstunnel sudo a2dismod mpm_prefork sudo nano /etc/memcached.conf change 64 to 1024 *save and exit* sudo nano /etc/php/8.2/fpm/pool.d/www.conf max_children = 80 start_servers = 20 min_spare_servers = 20 max_spare_servers = 60 *uncomment these lines:* env[HOSTNAME] = $HOSTNAME env[PATH] = /usr/local/bin:/usr/bin:/bin env[TMP] = /tmp env[TMPDIR] = /tmp env[TEMP] = /tmp *save and exit* sudo nano /etc/php/8.2/fpm/php.ini memory_limit = 1024M post_max_size = 512M upload_max_filesize = 1024M *down in opcache settings:* opcache.enable=1 opcache.memory_consumption=1024 opcache.interned_strings_buffer=64 opcache.max_accelerated_files=150000 opcache.max_wasted_percentage=15 opcache.revalidate_freq=60 opcache.save_comments=1 opcache.jit=1255 opcache.jit_buffer_size=256M *save and exit* *setup MariaDB* sudo mysql CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON nextcloud.* TO 'username'@'localhost'; FLUSH PRIVILEGES; quit; cd /var/www sudo wget https://download.nextcloud.com/server/releases/nextcloud-27.1.4.zip sudo unzip nextcloud-27.1.4.zip sudo chown -R www-data:www-data /var/www/nextcloud sudo systemctl restart apache2 sudo systemctl restart memcached sudo systemctl restart php8.2-fpm *open website and continue nextcloud isntallation on new website* sudo nano /var/www/nextcloud/config/config.php *grab the code to add from here:* https://github.com/jhodak/linux-configuration-files/blob/main/nextcloud/config save and exit sudo systemctl restart apache2 just in case. *Your nextcloud should now be running optimally!* **Optional but highly recommended** Enable OCC -- nextcloud command line function sudo nano /etc/php/8.2/mods-available/apcu.ini *add the following line at the bottom:* apc.enable_cli=1 save and exit in nextcloud go to administration settings -- basic settings -- change from Ajax to Cron (recommended) if you want to test if cron is working sudo -u www-data php -f /var/www/nextcloud/cron.php if you see nothing it is working, if you get an error it is not working

Watch Video on Youtube

Published on: 11/2/2023

Video thumbnail image for Setup a DNS server with automatic Ad Blocking!

Setup a DNS server with automatic Ad Blocking!

Setup an recursive DNS caching server and block annoying ads! Then have your entire network use this as the DNS server for all devices by default! Install Pi-hole sudo curl -sSL https://install.pi-hole.net | bash Change pi-hole password pihole -a -p [password or blank] Install Unbound DNS Resolver sudo apt-get install unbound Create and edit the pi-hole config file for Unbound sudo nano /etc/unbound/unbound.conf.d/pi-hole.conf Copy the example from pi-hole website: https://docs.pi-hole.net/guides/dns/unbound/ Restart Unbound sudo systemctl restart unbound Ad Lists I use: https://adaway.org/hosts.txt https://v.firebog.net/hosts/static/w3kbl.txt https://v.firebog.net/hosts/Easyprivacy.txt https://github.com/silv3rr/pihole-scripts/blob/master/pihole-whitelist.txt Update Gravity after you install new lists. Update router or computer DNS to use your new piholes!

Watch Video on Youtube

Published on: 10/30/2023

Video thumbnail image for UFW Firewalls are EASY!  Setup and manage your UFW in Ubuntu 22.04

UFW Firewalls are EASY! Setup and manage your UFW in Ubuntu 22.04

Setting up and managing your firewall in Ubuntu is simple. Here is a guide showing you everything you need to know to manage your firewall effectively! BE SURE TO ALLOW YOURSELF ON SSH BEFORE ENABLING FIREWALL! Enable UFW sudo ufw enable Disable UFW sudo ufw disable Allow a service sudo ufw allow ssh Allow a service from a specific ip range sudo ufw allow from 192.168.0.0/24 to any port 22 proto tcp Check status of UFW sudo ufw status Get numbered rules for UFW sudo ufw status numbered Delete a rule by number sudo ufw delete [number of rule] Reload UFW sudo ufw reload Deny by default all incoming sudo ufw default deny incoming Allow outgoing by default sudo ufw default allow outgoing Allow specific port sudo ufw allow 443/tcp Allow range of ports sudo ufw allow 443:449/tcp Block specific ip sudo ufw deny from 123.123.123.123 Block specific ip on specific port sudo ufw deny from 123.123.123.123 to any port 22 Check what an application rule allows sudo ufw app info apache That is it, deny all incoming connections by default, and figure out what needs to be allowed, common ports: 80 - http, 443 - https, 22 - ssh

Watch Video on Youtube

Published on: 10/29/2023

Video thumbnail image for Build your own Minecraft server - add texture packs - let your friends play!

Build your own Minecraft server - add texture packs - let your friends play!

This video goes over a lot. The absolute simplest way to get minecraft up and running on an ubuntu server. Automatic Backups. Automatic updates. Configure your server properties. Add a texture pack. Set port forwarding to allow the outside world in. We go over it all here! Minecraft script for installing: curl https://raw.githubusercontent.com/TheRemote/MinecraftBedrockServer/master/SetupMinecraft.sh | bash edit server.properties sudo nano /minecraftbe/[your world name]/server.properties install git sudo apt-get install git make directory sudo mkdir git cd git sudo git clone https://github.com/mariospants/Minecraft-RTX-HD-512x512-textures.git sudo cp -r ~/git/Minecraft-RTX-HD-512x512-textures/Tokomiki_Resource_Pack_512x512 /minecraftbe/[your world name]/resource_packs/ sudo nano /minecraftbe/[your world name]/worlds/world_resource_packs.json inside paste the code from this link: https://github.com/jhodak/linux-configuration-files/blob/main/Minecraft/world_resource_packs.json restart your server sudo systemctl restart [your world name].service after this to open to the outside world just add a port forwarding rule from your router! forward from any port 19132 (if using standard port) going to server.ip.address port 19132 (if using standard port) and then you should be able to share it either using a domain name if you have one running through DNS to your home IP, or you can also just directly use your home IP address, and tell your friends "hey connect to my minecraft by adding my home IP as server IP, and the port im using is XXXXX" and folks from the outside should be able to connect with you!

Watch Video on Youtube

Published on: 10/29/2023

Video thumbnail image for Setup a NAS on your home server!  How to create a samba server in Ubuntu 22.04

Setup a NAS on your home server! How to create a samba server in Ubuntu 22.04

Setting up a sambashare is probably one of the first and easiest things you can do in a homelab. Give yourself a permanent backup, store your plex movies, record videos for youtube, anything you want to store and share across devices can go on a samba share. It is easily used in windows/mac/linux! Server: sudo apt update sudo apt install samba sudo mkdir /home/[username]/sambashare/ sudo nano /etc/samba/smb.conf paste at the bottom: https://github.com/jhodak/linux-configuration-files/blob/main/Samba/samba.txt sudo service smbd restart sudo ufw allow samba sudo ufw reload create username and password sudo smbpasswd -a [username] In windows to connect: map network drive \\[ip.of.server]\sambashare check connect using different credentials -- input the username and password you just created In linux edit fstab: sudo nano /etc/fstab in fstab at the bottom put in: //[ip.of.server]/sambashare /mnt/sambashare/ cifs cred=/home/[username]/.smb,vers=3.0,noperm 0 0 sudo apt-get install cifs-utils sudo nano ~/.smb inside .smb file: user=[username] pass=[password] check if it mounts properly sudo mount -a You should now have your sambashare from a different server mounted as a drive in your /mnt/ directory. Enjoy!

Watch Video on Youtube

Published on: 10/27/2023