<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Server on Luiz Felipe F M Costa</title><link>https://thenets.org/tags/server/</link><description>Recent content in Server on Luiz Felipe F M Costa</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 26 Aug 2025 10:04:12 +0000</lastBuildDate><atom:link href="https://thenets.org/tags/server/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Deploy Nginx Proxy Manager on MikroTik RouterOS Using Containers</title><link>https://thenets.org/posts/how-to-deploy-nginx-proxy-manager-on-mikrotik-routeros-using-containers/</link><pubDate>Tue, 26 Aug 2025 10:04:12 +0000</pubDate><guid>https://thenets.org/posts/how-to-deploy-nginx-proxy-manager-on-mikrotik-routeros-using-containers/</guid><description>&lt;p&gt;Use the MikroTik RouterOS device as a reverse proxy server using Nginx Proxy Manager container. This guide walks you through enabling container support on RouterOS v7.4+, setting up external storage to protect your device&amp;rsquo;s flash memory, and deploying a fully functional reverse proxy with SSL certificate management.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alert: for some reason, the container performance currently is terrible, without a proper solution. During my investigation, the CPU usage for containers is very limited no matter how powerful you router is:\&lt;/p&gt;</description></item><item><title>How to forward a TCP port using systemd + socat</title><link>https://thenets.org/posts/how-to-forward-a-tcp-port-using-systemd-socat/</link><pubDate>Wed, 04 Jun 2025 05:17:47 +0000</pubDate><guid>https://thenets.org/posts/how-to-forward-a-tcp-port-using-systemd-socat/</guid><description>&lt;p&gt;A common problem I need to solve with my web servers are simple TCP port forwarding. This allows you to redirect an application traffic, from a HTTP server for example, to another port or even server. There are many ways of achieving this goal and this post will guide you to solve this problem using &lt;code&gt;systemd&lt;/code&gt; and &lt;code&gt;socat&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;p&gt;You need to have a Linux distribution using &lt;code&gt;systemd&lt;/code&gt; and you must have &lt;code&gt;socat&lt;/code&gt; installed.&lt;/p&gt;</description></item><item><title>How to resize Ubuntu server LVM disk to all available disk space</title><link>https://thenets.org/posts/resize-ubuntu-server-lvm-disk-to-all-available-disk-space/</link><pubDate>Tue, 03 Jun 2025 23:06:42 +0000</pubDate><guid>https://thenets.org/posts/resize-ubuntu-server-lvm-disk-to-all-available-disk-space/</guid><description>&lt;p&gt;I need to resize a virtual machine disks multiple times a year. Most of the time, I&amp;rsquo;m lazy enough to just jump into the &lt;a href="https://cockpit-project.org"&gt;Cockpit&lt;/a&gt; web interface and change things there. But in Ubuntu, I need to use command line and I always forget how to resize a Logical Volume Manager (LVM) disk in an Ubuntu server to utilize all available disk space. So, this is my personal notes to remember how to do that next time.&lt;/p&gt;</description></item><item><title>How to install Ollama + Open-WebUI on Fedora/RHEL using podman Quadlets</title><link>https://thenets.org/posts/how-to-install-ollama-open-webui-on-fedora-using-podman-quadlets/</link><pubDate>Wed, 28 May 2025 08:02:31 +0000</pubDate><guid>https://thenets.org/posts/how-to-install-ollama-open-webui-on-fedora-using-podman-quadlets/</guid><description>&lt;p&gt;Ollama is a powerful tool for running large language models locally. This guide walks you through setting up Ollama on Fedora using Podman Quadlets, ensuring it runs as a systemd service with persistent storage and GPU support.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;p&gt;Make sure you have full GPU support for podman containers:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;# This must return something like
# &amp;gt; GPU 0: NVIDIA GeForce RTX 3070 (UUID: GPU-...)
podman run --rm --security-opt=label=disable \
 --device nvidia.com/gpu=all \
 ubi9 \
 nvidia-smi -L
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;Check podman GPU support&lt;/figcaption&gt;
&lt;p&gt;If you have a NVIDIA GPU and the command above didn&amp;rsquo;t work, check the following post to fix that:&lt;/p&gt;</description></item><item><title>How to install Syncthing on Fedora/RHEL using podman Quadlets</title><link>https://thenets.org/posts/how-to-install-syncthing-on-fedora/</link><pubDate>Wed, 28 May 2025 00:47:59 +0000</pubDate><guid>https://thenets.org/posts/how-to-install-syncthing-on-fedora/</guid><description>&lt;p&gt;The Syncthing is the best Peer-to-Peer solution I&amp;rsquo;ve ever used. It is flexible, has clients for most platforms, decentralized, and open source. This guide will show you how to install it and use it for your Fedora. I&amp;rsquo;m lazy, so everything will be on top of &lt;code&gt;podman&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="install-podman"&gt;Install podman&lt;/h2&gt;
&lt;p&gt;If you are familiar with &lt;code&gt;docker&lt;/code&gt;, &lt;code&gt;podman&lt;/code&gt; is similar but with a more secure approach out-of-the-box. Let&amp;rsquo;s install it:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;sudo dnf install -y podman
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="create-the-systemd-service"&gt;Create the systemd service&lt;/h2&gt;
&lt;p&gt;Create the config dir:&lt;/p&gt;</description></item><item><title>Backup is not Disaster Recovery</title><link>https://thenets.org/posts/backup-is-not-disaster-recovery/</link><pubDate>Tue, 27 May 2025 13:57:19 +0000</pubDate><guid>https://thenets.org/posts/backup-is-not-disaster-recovery/</guid><description>&lt;p&gt;You probably already heard that RAID is not a backup. When world is ending and everything is burning, we also discover that a backup is not a Disaster Recovery plan. In this blog post I want to discuss why is so important to have an unplugged and reliable Disaster Recovery strategy.&lt;/p&gt;
&lt;h2 id="common-scenario-for-backup-plus-disaster-recovery"&gt;Common scenario for Backup plus Disaster Recovery&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s start talking about the common differences between snapshots, backups, and Disaster Recovery strategies.&lt;/p&gt;</description></item><item><title>Running Vagrant + libvirt on Bluefin or Aurora</title><link>https://thenets.org/posts/running-vagrant-libvirt-on-bluefin-or-aurora/</link><pubDate>Tue, 28 Jan 2025 03:22:43 +0000</pubDate><guid>https://thenets.org/posts/running-vagrant-libvirt-on-bluefin-or-aurora/</guid><description>&lt;p&gt;Vagrant is one of the greatest way to develop solutions using virtual machines, with all the isolation that a container can&amp;rsquo;t provide. Unfortunately, Vagrant doesn&amp;rsquo;t support &lt;code&gt;libvirt&lt;/code&gt; out-of-the-box and the existing plugin must be built using your distro libraries. This post will guide you how to install the &lt;code&gt;libvirt&lt;/code&gt; plugin on Bluefin or Aurora but it should also work on Fedora Silverblue.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m assuming you are running an &lt;a href="https://www.youtube.com/shorts/SoDCrnvKv9A"&gt;ostree-based distro&lt;/a&gt;. It works with a filesystem in the same fashion as containers images, with immutable layers overlaying each other and mount-points to mutable areas of the system.&lt;/p&gt;</description></item><item><title>Managing multiple Kubernetes clusters with kubectl</title><link>https://thenets.org/posts/managing-multiples-kubernetes-clusters-with-kubectl/</link><pubDate>Wed, 18 Jan 2023 09:01:08 +0000</pubDate><guid>https://thenets.org/posts/managing-multiples-kubernetes-clusters-with-kubectl/</guid><description>&lt;p&gt;Learn how to use &lt;code&gt;kubectl&lt;/code&gt; CLI to manage multiple Kubernetes clusters. Import new config, add cluster, user, and context. Switch between contexts to manage different clusters.&lt;/p&gt;
&lt;p&gt;Kubernetes is an open-source platform for managing containerized workloads and services, allowing you to easily deploy and run applications in a cloud-native environment. The &lt;code&gt;kubectl&lt;/code&gt; command-line interface (CLI) is a key component of Kubernetes, providing a powerful and flexible way to manage clusters and deploy applications.&lt;/p&gt;</description></item><item><title>How to create a database and user for your new app on PostgreSQL</title><link>https://thenets.org/posts/how-to-create-a-database-and-user-for-your-new-app-on-postgresql/</link><pubDate>Sat, 07 Jan 2023 23:40:21 +0000</pubDate><guid>https://thenets.org/posts/how-to-create-a-database-and-user-for-your-new-app-on-postgresql/</guid><description>&lt;p&gt;Creating a database and user for a single application is a common task for developers and database administrators in small and medium environments. In this tutorial, we will walk through the steps to create a new database and user on a Postgres server using the command line.&lt;/p&gt;
&lt;p&gt;Here are the steps you can follow to create a database and user on Postgres:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Connect to the Postgres server by typing the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;# Connect to your PostgreSQL server using the `psql` CLI
psql -h &amp;lt;hostname&amp;gt; -p &amp;lt;port&amp;gt; -U &amp;lt;username&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;Replace `hostname` with the name of the server where the Postgres service is running, the `port` if you have a custom one, and `username` with the name of a user who has permission to create databases and users.&lt;/figcaption&gt;
&lt;ol&gt;
&lt;li&gt;Enter the password for the user when prompted.&lt;/li&gt;
&lt;li&gt;Once connected, you can create a new database by typing the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;CREATE DATABASE databasename;
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;Replace `databasename` with the desired name for the new database.&lt;/figcaption&gt;
&lt;ol&gt;
&lt;li&gt;To create a new user, type the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;CREATE USER username WITH PASSWORD 'password';
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;Replace `username` with the desired name for the new user, and `password` with the desired password for the user.&lt;/figcaption&gt;
&lt;ol&gt;
&lt;li&gt;To grant the new user full privileges on the new database, type the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;GRANT ALL PRIVILEGES ON DATABASE databasename TO username;
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;Replace `databasename` with the name of the database, and `username` with the name of the user.&lt;/figcaption&gt;
&lt;ol&gt;
&lt;li&gt;Exit the &lt;code&gt;psql&lt;/code&gt; prompt by typing &lt;code&gt;\q&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should now have a new database and user on the Postgres server, and the user should have full privileges on the database.&lt;/p&gt;</description></item><item><title>How to create a service for Fedora/RHEL (systemd)</title><link>https://thenets.org/posts/how-to-create-a-service-for-fedora-rhel/</link><pubDate>Sun, 01 May 2022 05:55:53 +0000</pubDate><guid>https://thenets.org/posts/how-to-create-a-service-for-fedora-rhel/</guid><description>&lt;p&gt;A common task for Linux administrators is to create a background task that must be executed in the background. The most popular service manager in the Linux world is the systemd. This is an example of how to create a new service and use it.&lt;/p&gt;
&lt;p&gt;If you want to learn more about the &lt;code&gt;systemd&lt;/code&gt;, I recommend this video made by &amp;ldquo;DJ Ware&amp;rdquo;:&lt;/p&gt;

&lt;div class="youtube-embed"&gt;
 &lt;iframe
 src="https://www.youtube.com/embed/Fz8Ldw-s8"
 title="YouTube video"
 allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
 allowfullscreen
 loading="lazy"
 &gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fedora/RHEL distro family flavor&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="create-the-background-service-file"&gt;Create the background service file&lt;/h2&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;[Unit]
Description=my-service nginx example

# You may want to start after your network is ready
After=network-online.target

[Service]
ExecStart=/usr/bin/env docker run --name nginx --rm -p 8080:80 docker.io/nginx:alpine
Restart=Always
PIDFile=/tmp/my_service_pid
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;/etc/systemd/system/my-service.service&lt;/figcaption&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;# Create the service file
vim /etc/systemd/system/my-service.service

# (if you change an existent file, you must reload the daemon config)
# Reload daemon config
systemctl daemon-reload

# Enable
systemctl enable my-service.service

# Start
systemctl start my-service.service

# (if you need to restart)
# Restart
systemctl restart my-service.service
&lt;/code&gt;&lt;/pre&gt;
&lt;figcaption class="code-caption"&gt;how to create a systemd service&lt;/figcaption&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd"&gt;https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>How to commit encrypted files to Git with Mozilla SOPS</title><link>https://thenets.org/posts/how-to-commit-encrypted-files-to-git-with-mozilla-sops/</link><pubDate>Sun, 22 Aug 2021 10:11:09 +0000</pubDate><guid>https://thenets.org/posts/how-to-commit-encrypted-files-to-git-with-mozilla-sops/</guid><description>&lt;p&gt;It&amp;rsquo;s a common scenario where it&amp;rsquo;s needed to share some keys/secrets with other members of the project team and it&amp;rsquo;s also common that those keys are closely attached to some source code. SOPS allows you to do that securely using Git or other VCS.&lt;/p&gt;
&lt;p&gt;A Git repository would be a perfect solution, but Git works in plain text, like any other VCS (Version Control Service) for source code, even when the communication channels and storage system are encrypted. That means, if someone has access to the source code, it&amp;rsquo;ll also have access to all keys inside of the code.&lt;/p&gt;</description></item><item><title>How to create a k3s cluster with Nginx Ingress controller</title><link>https://thenets.org/posts/how-to-create-a-k3s-cluster-with-nginx-ingress-controller/</link><pubDate>Fri, 23 Jul 2021 11:13:00 +0000</pubDate><guid>https://thenets.org/posts/how-to-create-a-k3s-cluster-with-nginx-ingress-controller/</guid><description>&lt;p&gt;One of the easiest ways to install a Kubernetes distro for personal projects is using k3s, but you may not want to use some features built-in, like traefik as the default Ingress controller. Here you will learn how to create a k3s cluster with Nginx as the Ingress controller.&lt;/p&gt;
&lt;h2 id="why-use-k3s-with-nginx-ingress-controller"&gt;Why use k3s with Nginx Ingress controller?&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;k3s&lt;/code&gt; project was created by Rancher Labs (&lt;a href="https://k3s.io/"&gt;https://k3s.io/&lt;/a&gt;) with the goal to be a lightweight Kubernetes distro. It&amp;rsquo;s maybe not the best distro for the production environment, but it fits as a good solution for personal projects. It&amp;rsquo;s also compatible with ARM architecture if you want to run it in a Raspberry Pi, for example.&lt;/p&gt;</description></item><item><title>Using rsync to backup Linux servers</title><link>https://thenets.org/posts/using-rsync-to-backup-linux-servers/</link><pubDate>Mon, 12 Jul 2021 04:02:49 +0000</pubDate><guid>https://thenets.org/posts/using-rsync-to-backup-linux-servers/</guid><description>&lt;p&gt;Imagine that you have some servers running applications and you need to find a way to backup the files and preserve their properties, like the user, group, date, and permissions. How do you do that?&lt;/p&gt;
&lt;p&gt;Does exist many ways to create a backup solution, but here I&amp;rsquo;ll focus on a backup solution to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copy all files from one Linux server to another Linux.&lt;/li&gt;
&lt;li&gt;Preserve all files properties, including date change and file permissions.&lt;/li&gt;
&lt;li&gt;Allow a file restore simply by rsync the content back to the original server.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;This is not a solution for any kind of backup routine!&lt;/p&gt;</description></item><item><title>Create a Linux Server for VM and manage through the web with KVM + Kimchi + Wok</title><link>https://thenets.org/posts/create-a-linux-server-for-vm-and-manage-through-web-with-kvm-kimchi-wok/</link><pubDate>Thu, 17 May 2018 21:20:04 +0000</pubDate><guid>https://thenets.org/posts/create-a-linux-server-for-vm-and-manage-through-web-with-kvm-kimchi-wok/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Kimchi is an HTML5 based management tool for KVM. It is designed to make it as easy as possible to get started with KVM and create your first guest. - &lt;a href="https://github.com/kimchi-project/kimchi"&gt;Kimchi project&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In this tutorial, I&amp;rsquo;ll show you how to create a Linux Server to manage VMs (Virtual Machines) through the web.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;About the girl in the cover image, she is using a red hat&amp;hellip; Red Hat&amp;hellip; RedHat&amp;hellip; Do you got it?&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>