<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Savelii Pototskii on Medium]]></title>
        <description><![CDATA[Stories by Savelii Pototskii on Medium]]></description>
        <link>https://medium.com/@savalione?source=rss-3cd5781f143e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GHwyJjFJAfNXz9lvtIVaaA.jpeg</url>
            <title>Stories by Savelii Pototskii on Medium</title>
            <link>https://medium.com/@savalione?source=rss-3cd5781f143e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:14:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@savalione/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to issue self-signed certificates for nginx for the default server]]></title>
            <link>https://medium.com/@savalione/self-signed-certs-7b5a4b7a718b?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b5a4b7a718b</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 00:00:38 GMT</pubDate>
            <atom:updated>2026-11-29T15:56:06.400Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2Nswg7O5aec6eqB5.jpg" /></figure><p>I run several containers and virtual machines around the world that host different websites. Most of these nodes have public IPv4 and IPv6 addresses and use nginx to serve content.</p><p>Instead of leaving the generic default landing page provided by distribution maintainers, I prefer to name each node and replace the default page with my own template to give it a cleaner look. I also configure HTTPS for all of these nodes to prevent man-in-the-middle attacks.</p><p>For example, my blog uses GeoDNS to route traffic across some of these servers. You can see more information about these nodes <a href="https://savalione.com/server/">here</a>.</p><h3>Setting everything up</h3><p>Choose a directory in which index.html will be stored for the default server. By default, it&#39;s/var/www/html. I don&#39;t like the default landing page provided by Debian, so I delete it:</p><pre>rm /var/www/html/index.nginx-debian.html</pre><p>Create index.html:</p><pre>touch /var/www/html/index.html</pre><p>I’ve created the following template, but you may design your page in any way you want:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;title&gt;Welcome to example.com!&lt;/title&gt;<br>        &lt;style&gt;<br>            body {<br>                width: 35em;<br>                margin: 0 auto;<br>                font-family: Tahoma, Verdana, Arial, sans-serif;<br>            }<br>        &lt;/style&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;h1&gt;Welcome to example.com!&lt;/h1&gt;<br>        &lt;p&gt;This is example.com server. Check example.com for more information.&lt;/p&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p>For my servers, it usually looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/0*TuA-7hQUij-Doip2.png" /></figure><p>Create a directory for certificates:</p><pre>mkdir -p /etc/nginx/ssl/default</pre><p>Issue self-signed certificates:</p><pre>openssl req -x509 -nodes -days 1825 -newkey rsa:2048 -keyout /etc/nginx/ssl/default/default.key -out /etc/nginx/ssl/default/default.crt</pre><p>Here, 1825 specifies the number of days the certificate will be valid.</p><p>You will be prompted with the following questions:</p><pre>Country Name (2 letter code) [AU]:<br>State or Province Name (full name) [Some-State]:<br>Locality Name (eg, city) []:<br>Organization Name (eg, company) [Internet Widgits Pty Ltd]:<br>Organizational Unit Name (eg, section) []:<br>Common Name (e.g. server FQDN or YOUR name) []:<br>Email Address []:</pre><p>You may enter any information you see fit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*sjWQyZZHBpvPONBh.png" /></figure><p>To configure the certificates for the default server, include the following lines in the server block:</p><pre>listen 443 ssl default_server;<br>listen [::]:443 ssl default_server;<br>ssl_certificate /etc/nginx/ssl/default/default.crt;<br>ssl_certificate_key /etc/nginx/ssl/default/default.key;<br>ssl_protocols TLSv1.2 TLSv1.3;<br>ssl_ciphers HIGH:!aNULL:!MD5;</pre><p>Usually, I completely wipe the default configuration:</p><pre>rm /etc/nginx/sites-available/default<br>touch /etc/nginx/sites-available/default</pre><p>And add the following:</p><pre># default server<br>server {<br>    listen 80 default_server;<br>    listen 443 ssl default_server;<br>    listen [::]:80 default_server;<br>    listen [::]:443 ssl default_server;<br><br>    server_name _;<br><br>    ssl_certificate /etc/nginx/ssl/default/default.crt;<br>    ssl_certificate_key /etc/nginx/ssl/default/default.key;<br><br>    ssl_protocols TLSv1.2 TLSv1.3;<br>    ssl_ciphers HIGH:!aNULL:!MD5;<br><br>    root /var/www/html;<br>    index index.html;<br><br>    location / {<br>        try_files $uri $uri/ =404;<br>    }<br>}</pre><p>Alternatively, you may want to redirect HTTP to HTTPS. In this case, your configuration may look like this:</p><pre># default server<br>server {<br>    listen 443 ssl default_server;<br>    listen [::]:443 ssl default_server;<br><br>    server_name _;<br><br>    ssl_certificate /etc/nginx/ssl/default/default.crt;<br>    ssl_certificate_key /etc/nginx/ssl/default/default.key;<br><br>    ssl_protocols TLSv1.2 TLSv1.3;<br>    ssl_ciphers HIGH:!aNULL:!MD5;<br><br>    root /var/www/html;<br>    index index.html;<br><br>    location / {<br>        try_files $uri $uri/ =404;<br>    }<br>}<br><br>server {<br>    listen 80 default_server;<br>    listen [::]:80 default_server;<br><br>    server_name _;<br><br>    return 301 https://$host$request_uri;<br>}</pre><p>Test that the nginx configuration is correct:</p><pre>nginx -t</pre><p>If everything is fine, restart nginx:</p><pre>systemctl restart nginx.service</pre><h3>Showcase</h3><p>If you used the provided html template, this is what the HTTP server will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/0*VHB9Q3siJvqOsSvo.png" /></figure><p>This is what the HTTPS server will look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/0*TbayN_e1_BnsH-kn.png" /></figure><p>Here is the certificate information displayed in the browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*0AEvTPNH2_-t9GmG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*_9QXHPNbHfA7Fi4r.png" /></figure><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/11/16/self-signed-certs/"><em>https://savalione.com</em></a><em> on November 16, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b5a4b7a718b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing AdaptiveCpp in an Incus container with full GPU support]]></title>
            <link>https://medium.com/@savalione/sycl-2e847fcb69d4?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e847fcb69d4</guid>
            <category><![CDATA[sycl]]></category>
            <category><![CDATA[adaptivecpp]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[heterogeneous-computing]]></category>
            <category><![CDATA[cpp]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 00:00:38 GMT</pubDate>
            <atom:updated>2026-08-30T21:55:19.979Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jHg7kuNyEz0sZgkB.jpg" /><figcaption>An HP ProLiant DL160 G6 server</figcaption></figure><p>SYCL is an amazing cross-platform abstraction layer that allows you to develop heterogeneous software directly within an existing C++ codebase.</p><p>In the case of many existing SYCL implementations, you often need to install a custom compiler toolchain with additional libraries and specific backends. Installing these packages directly on a host machine can cause multiple issues, such as version conflicts with existing toolchains and losing control over package management.</p><p>To avoid these issues, I suggest installing a SYCL compiler in an Incus container. This approach provides strict environment isolation and better control over your dependencies. Additionally, Incus provides a straightforward way to pass a GPU device into a container.</p><p>In this guide, I will use AdaptiveCpp as the SYCL compiler. The GPU passed into the container will be an Intel Arc A310, utilizing the SYCL OpenCL backend. To verify the correctness of the configured toolchain, I will compile a simple SYCL application: <a href="https://github.com/SavaLione/sycl-acpp-example">GitHub — sycl-acpp-example</a>.</p><p>These instructions are suitable whether you are configuring a SYCL compiler directly on a host machine or within a container using GPU passthrough.</p><p>This guide is divided into 5 steps:</p><ol><li>Setting up an Incus container and passing through a GPU device.</li><li>Configuring the passed GPU within the container.</li><li>Installing the LLVM toolchain.</li><li>Installing AdaptiveCpp.</li><li>Compiling an example SYCL application.</li></ol><p>You can find common issues and solutions at the end of this guide.</p><h3>Names and IP addresses used</h3><p>In this post I’ll use the following names and IP addresses. You should substitute these with your own values where appropriate:</p><ul><li>ubuntu/26.04 - the Incus container image with Ubuntu 26.04 LTS.</li><li>sycl-adaptivecpp - the name of the created container.</li><li>192.168.56.131 - the static IP address assigned to the container.</li><li>192.168.56.1 - the gateway for the container&#39;s network. This will almost certainly be different in your setup.</li><li>/root/adaptivecpp - the location where AdaptiveCpp will be installed.</li></ul><p>Versions:</p><ul><li>Ubuntu LTS 24.04 — host Linux distribution.</li><li>Ubuntu LTS 26.04 — container Linux distribution.</li><li>Incus version 6.0.0 (client and server).</li><li>LLVM toolchain version 21.1.8.</li><li>AdaptiveCpp version 25.10.0.</li></ul><h3>Setting up an Incus container and passing through a GPU device</h3><p>The process of creating an Incus container is straightforward. I’ll use the latest LTS version of Ubuntu, which is 26.04 at the time of writing:</p><pre>incus launch images:ubuntu/26.04 sycl-adaptivecpp</pre><p>By executing incus list, you can verify that the new container has been created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/0*_GbvKYE_nutFhdao.png" /><figcaption>Terminal output of incus list showing the new container</figcaption></figure><p>At this step, it’s a good idea to configure the container: update the package repositories, install necessary tools, and set up network.</p><p>Enter the container:</p><pre>incus exec sycl-adaptivecpp -- bash</pre><p>Update the package lists, upgrade installed packages, and install any additional tools you prefer:</p><pre>apt update<br>apt upgrade<br>apt install nano</pre><p>Even though the container was created from an Incus container registry, some packages still required an upgrade:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/0*SrisNIu0zpU-c79c.png" /><figcaption>Terminal output of apt update showing that some packages can be upgraded</figcaption></figure><p>By default, the container receives an IP address from a DHCP server. It’s also a good idea to set up a static IP in order to avoid potential connectivity issues later on, for example, when hosting services or transferring files over Samba.</p><p>Edit /etc/netplan/10-lxc.yaml with your preferred text editor:</p><pre>network:<br>  version: 2<br>  ethernets:<br>    eth0:<br>      dhcp4: false<br>      dhcp6: false<br>      dhcp-identifier: mac<br>      addresses:<br>        - 192.168.56.131/24<br>      nameservers:<br>        addresses:<br>          - 192.168.56.1<br>      routes:<br>        - to: default<br>          via: 192.168.56.1</pre><p>Here, 192.168.56.131 is the static IP assigned to the container, and 192.168.56.1 serves as both the gateway and the DNS server.</p><p>Apply the changes:</p><pre>netplan apply</pre><p>Run ip addr to verify that the new network configuration was applied successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/0*uCUUJY2gtTHvllV4.png" /><figcaption>Terminal output of ip addr showing that the new network settings were applied</figcaption></figure><p>Exit the container to configure GPU passthrough on the host:</p><pre>exit</pre><p>One of the coolest things about Incus is how straightforward it is to pass through a GPU device. To do so, the GPU drivers must be installed on the host, and you need to identify the device’s PCI address.</p><p>Find the PCI address of the device using:</p><pre>lspci</pre><p>In this post, I’m using an Intel Arc A310 that’s passed through to multiple containers (such as Jellyfin, OpenCL environments, and other SYCL compilers). Here is how the lspci output looks on the host server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/0*KVHnTYuWfKxmkuPH.png" /><figcaption>Terminal output of lspci showing the Intel Arc A310 GPU</figcaption></figure><p>Pass the GPU through to the Incus container:</p><pre>incus config device add sycl-adaptivecpp a310-gpu gpu pci=0000:45:00.0 uid=0 gid=44 mode=0666</pre><p>Here, a310-gpu is an arbitrary device name, and 0000:45:00.0 is the PCI address from the previous step (which will likely differ on your system). The uid=0, gid=44, and mode=0666 options configure the necessary permissions to ensure the device is accessible inside the container.</p><p>To check that the device was attached correctly, run:</p><pre>incus config device show sycl-adaptivecpp</pre><p>Here is the terminal output confirming the device configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/0*iItaazVYHcVvyuZ5.png" /><figcaption>Passing through the Intel Arc A310 GPU, terminal output of incus devices</figcaption></figure><p>Inside the container, you can inspect /sys/class/drm to see all DRM devices, including the newly passed-through GPU:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sZ-a4yG5G2zXmZFE.png" /><figcaption>Terminal output of `ls -lash /sys/class/drm` showing the Intel Arc A310 GPU</figcaption></figure><h3>Configuring the passed GPU within the container</h3><p>To use the passed-through GPU, you must install the appropriate drivers inside the container. In my case (using an Intel Arc A310), the required drivers and packages are available directly in the default repository. For other hardware, such as Nvidia or AMD GPUs, installing the corresponding drivers follows a similarly straightforward process.</p><p>Instead of oneAPI Level Zero, I’ll use the OpenCL backend for SYCL to keep this post applicable to as wide a range of hardware as possible.</p><p>Enter the container:</p><pre>incus exec sycl-adaptivecpp -- bash</pre><p>Install the OpenCL client driver:</p><pre>apt install intel-opencl-icd</pre><p>Install the OpenCL development headers and libraries:</p><pre>apt install ocl-icd-opencl-dev opencl-headers</pre><p>In this setup, the required OpenCL packages and their dependencies take up about 800 MB:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/0*bi66pe8_1BdwBkTW.png" /><figcaption>Terminal output of apt showing all packages that will be installed</figcaption></figure><p>You can also install clinfo to verify that OpenCL detects the GPU properly:</p><pre>apt install clinfo</pre><p>Run clinfo:</p><pre>clinfo</pre><p>The clinfo output confirms that the Intel Arc A310 is recognized as an available OpenCL device:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/0*TNNpLYVsjzr22fp8.png" /><figcaption>Terminal output of clinfo showing that the Intel ARC A310 was recognized as an OpenCL device</figcaption></figure><h3>Installing the LLVM toolchain</h3><p>To compile AdaptiveCpp, you must install the LLVM toolchain. Version compatibility is important: for the latest release of AdaptiveCpp (currently 25.10.0), LLVM 21 is required. Note that LLVM 22 is not compatible with this release. While there’re multiple ways to install LLVM, I’ll use the official automated installation script pinned to the required version.</p><p>First, install the prerequisites needed by the installation script:</p><pre>apt install lsb-release wget software-properties-common gnupg</pre><p>Download the official LLVM installation script:</p><pre>wget https://apt.llvm.org/llvm.sh</pre><p>Make the script executable:</p><pre>chmod +x llvm.sh</pre><p>Install LLVM toolchain version 21:</p><pre>./llvm.sh 21 all</pre><p>The script will download and configure the requested LLVM packages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/0*Jh2_Iw97UprUm5HB.png" /><figcaption>Terminal output showing a part of the official LLVM toolchain installation script</figcaption></figure><p>Verify that the LLVM toolchain was installed correctly:</p><pre>clang-21 --version</pre><p>The output confirms the installed Clang and LLVM versions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/0*dPNbVevLjawh64kw.png" /><figcaption>Terminal output showing versions of some LLVM tools</figcaption></figure><h3>Installing AdaptiveCpp</h3><p>The most straightforward way to install AdaptiveCpp is to clone the official Git repository and build it from source. I’ll use Ninja as the build system, but standard GNU Make works as well.</p><p>Install the prerequisites required to build the compiler:</p><pre>apt install git cmake ninja-build libboost-all-dev build-essential</pre><p>You can omit ninja-build if you plan to use Make instead.</p><p>In this setup, the dependencies require approximately 1800 MB of disk space across roughly 230 packages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*3lMXtP6B7MyCe_gM.png" /><figcaption>Terminal output of apt showing the packages to be installed</figcaption></figure><p>Install the C++ standard library development packages:</p><pre>apt install g++-16 libstdc++-16-dev</pre><p>At this step, configure your environment variables so that the LLVM tools are used as the default compiler, linker, and archiver. Additionally, set libstdc++ as the standard library. Add the following lines to your shell configuration file (typically~/.bashrc or ~/.zshrc):</p><pre>export CC=/usr/bin/clang-21<br>export CXX=/usr/bin/clang++-21<br>export LDFLAGS=&quot;-fuse-ld=lld&quot;<br>export AR=/usr/bin/llvm-ar-21<br>export RANLIB=/usr/bin/llvm-ranlib-21<br>export CXXFLAGS=&quot;-stdlib=libstdc++&quot;</pre><p>Since this container uses Bash, the updated .bashrc file looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*tsrTuUU_cvopgseV.png" /><figcaption>Terminal output showing the nano text editor with environment variables added to .bashrc</figcaption></figure><p>The new environment variables will apply on your next login, or you can reload them immediately in the current shell session:</p><pre># For Bash<br>source ~/.bashrc<br><br># For Zsh<br>source ~/.zshrc</pre><p>Clone the AdaptiveCpp repository:</p><pre>git clone https://github.com/AdaptiveCpp/AdaptiveCpp</pre><p>Optionally, check out a specific release tag:</p><pre>git switch --detach v25.10.0</pre><p>The repository will be cloned locally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/0*DJ8QnIaCwLnZsmst.png" /><figcaption>Terminal output of git showing the cloned AdaptiveCpp repository</figcaption></figure><p>Navigate into the repository directory and create a build directory:</p><pre>cd AdaptiveCpp<br>mkdir build<br>cd build</pre><p>Configure the project with CMake:</p><pre># Using Ninja<br>cmake -GNinja -DCMAKE_INSTALL_PREFIX=/root/adaptivecpp ..<br><br># Using Make<br>cmake -DCMAKE_INSTALL_PREFIX=/root/adaptivecpp ..</pre><p>The /root/adaptivecpp path defines the target directory where the compiled binaries and libraries will be installed.</p><p>The build files are generated successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*fvXwVa-NPhIkU4nN.png" /><figcaption>Terminal output of CMake showing successful configuration of AdaptiveCpp</figcaption></figure><p>Compile the project:</p><pre># Using Ninja<br>ninja -j0<br><br># Using Make<br>make</pre><p>The compiler builds without errors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/0*xYb6fCaBCyC0e9b0.png" /><figcaption>Terminal output of Ninja showing successful compilation of AdaptiveCpp</figcaption></figure><p>Install the compiler:</p><pre># Using Ninja<br>ninja install<br><br># Using Make<br>make install</pre><p>The compiler is installed into the designated installation path:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/0*NQDuhG_4We7kRsOy.png" /><figcaption>Terminal output of Ninja showing successful installation of AdaptiveCpp</figcaption></figure><p>It’s good practice to verify that the compiler built properly, the required target devices are detected, and there are no library or linking issues. Navigate to the bin directory of your installation path (/root/adaptivecpp/bin in this example) and run:</p><pre>./acpp-info</pre><p>The output confirms that the installation succeeded and the Intel Arc A310 is recognized as an available SYCL backend:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/0*OwuOWw7aERyNNkUO.png" /><figcaption>Terminal output of acpp-info showing device information for the Intel Arc A310</figcaption></figure><p>At this point, the AdaptiveCpp SYCL compiler is fully installed and ready to use.</p><h3>Compiling an example SYCL application</h3><p>I have published a sample Git repository containing a simple SYCL project built with the AdaptiveCpp compiler. You can compile this test project to verify that your toolchain works as expected.</p><p>The project is available on GitHub: <a href="https://github.com/SavaLione/sycl-acpp-example">GitHub — sycl-acpp-example</a>.</p><p>Clone the repository:</p><pre>git clone https://github.com/SavaLione/sycl-acpp-example</pre><p>The repository will be cloned locally:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*B5G1EU0b1bRXT071.png" /><figcaption>Terminal output of git showing the cloned sycl-acpp-example repository</figcaption></figure><p>Navigate to the project directory:</p><pre>cd sycl-acpp-example</pre><p>Create and enter the build directory:</p><pre>mkdir build<br>cd build</pre><p>Configure the project with CMake:</p><pre># Using Ninja<br>cmake -GNinja -DCMAKE_INSTALL_PREFIX=/root/adaptivecpp ..<br><br># Using Make<br>cmake -DCMAKE_INSTALL_PREFIX=/root/adaptivecpp ..</pre><p>Here, /root/adaptivecpp is the path to your AdaptiveCpp installation directory.</p><p>Compile the project:</p><pre># Using Ninja<br>ninja -j0<br><br># Using Make<br>make</pre><p>Run the compiled executable to view your hardware topology and verify that computational kernels execute successfully across all accessible devices:</p><pre>./sycl-acpp-example</pre><p>The output displays the detected backends and confirms kernel execution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/0*lj6kGzFFw0SUSTMG.png" /><figcaption>Terminal output of sycl-acpp-example showing detected SYCL devices and kernel execution</figcaption></figure><p>If the project is configured, compiled, and executed without errors, your AdaptiveCpp SYCL compiler is properly installed and verified. You are now ready to develop and run SYCL applications on your system. Congratulations! I wish you luck developing your SYCL software.</p><h3>Note: CMake Warning — Cannot generate a safe runtime search path for target rt-backend-omp</h3><p>If you encounter the following warning in your CMake output, it typically indicates that libstdc++ (GCC) was not configured as the default C++ standard library:</p><pre>-- Configuring done (4.6s)<br>CMake Warning at src/runtime/CMakeLists.txt:336 (add_library):<br>  Cannot generate a safe runtime search path for target rt-backend-omp<br>  because files in some directories may conflict with libraries in implicit<br>  directories:<br><br>    runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-linux-gnu/15 may be hidden by files in:<br>      /usr/lib/llvm-21/lib<br><br>  Some of these libraries may not be found correctly.<br><br><br>-- Generating done (0.1s)</pre><p>To resolve this issue, refer back to the environment configuration step and ensure that the following variable is properly exported in your shell:</p><pre>export CXXFLAGS=&quot;-stdlib=libstdc++&quot;</pre><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/08/16/sycl/"><em>https://savalione.com</em></a><em> on August 16, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e847fcb69d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing and configuring Cisco TRex]]></title>
            <link>https://medium.com/@savalione/trex-82c8e280191d?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/82c8e280191d</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cisco]]></category>
            <category><![CDATA[computer-network]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 00:00:05 GMT</pubDate>
            <atom:updated>2026-08-30T21:36:50.685Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qed-H3s-e1MWyzja.jpg" /><figcaption>An HP ProLiant DL160 G6 server with an Intel NIC used in this post</figcaption></figure><p>I often need to test some network equipment for homelab purposes. Even though almost any device I use has comprehensive documentation and a spec sheet, it’s better to check equipment personally to eliminate possible wrong configurations or simply broken devices.</p><p>There are many great tools to test networks like iPerf 3, iPerf 2, scamper, etc., but they often lack required features or not able to saturate high throughput links. Among specific tools designed to test network equipment, Cisco TRex is worth noting. It’s open source, uses DPDK, has comprehensive documentation, provides great Python API with Scapy support, and is a de facto a standard for testing equipment in many fields.</p><p>I’ve previously written how to install DPDK on an Ubuntu server. In this post I’ll show how to install Cisco TRex and do simple L2 benchmarks.</p><p>This post is divided into five steps:</p><ol><li>Installing DPDK</li><li>Installing Python</li><li>Setting up DPDK</li><li>Configuring Cisco TRex for a simple L2 loopback</li><li>Running a simple L2 benchmark</li></ol><p>At the end of this post, you may also find some common issues and ways to fix them.</p><h3>Installing DPDK</h3><p>I’ve previously written how to install DPDK on an Ubuntu server: <a href="https://medium.com/@savalione/dpdk-127fe8c3aa6b">Compiling and setting up DPDK on Ubuntu 24.04 LTS</a></p><p>In that post, I installed DPDK v26.03 on Ubuntu 24.04 LTS, but I had no issues doing the same for DPDK v26.07-rc1 and Ubuntu 26.04 LTS.</p><p>If you have DPDK installed, you can skip this step.</p><h3>Installing Python</h3><p>Cisco TRex v3.08 works well with Python 3.12. Ubuntu 24.04 LTS is shipped with Python 3.12 and there is no need to do anything, so if you use 24.04 you can skip this step.</p><p>If you use Ubuntu 26.04 LTS, you may need to install an additional Python 3.12 environment, because 26.04 is shipped with Python 3.14 by default. In this section I’ll be using pyenv to manage multiple Python installations. You may use any other environment manager you prefer.</p><p>Use the pyenv automatic installer script:</p><pre>curl -fsSL https://pyenv.run | bash</pre><p>Running the pyenv installation script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*A_rapj2096oWUVYw.png" /></figure><p>Add the following to your environment variables. For Bash it’s usually ~/.bashrc, for Zsh it&#39;s ~/.zshrc:</p><pre>export PYENV_ROOT=&quot;$HOME/.pyenv&quot;<br>[[ -d $PYENV_ROOT/bin ]] &amp;&amp; export PATH=&quot;$PYENV_ROOT/bin:$PATH&quot;<br>eval &quot;$(pyenv init - bash)&quot;</pre><p>Adding pyenv to environment variables:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/0*0gMAQKJ8jnF1K6Oe.png" /></figure><p>Apply the changes to the environment variables by running:</p><pre># For Bash<br>source ~/.bashrc<br><br># For Zsh<br>source ~/.zshrc</pre><p>Before installing required dependencies, I recommend updating and upgrading all packages:</p><pre>apt update<br>apt upgrade</pre><p>Install dependencies needed to compile Python:</p><pre>apt install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev curl git libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libzstd-dev</pre><p>Installing apt dependencies needed to compile Python:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/0*tUEXXR-G94sf4s0v.png" /></figure><p>Check available Python versions:</p><pre>pyenv install --list | grep &quot;3.12&quot;</pre><p>Available Python versions to be installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*eJC0dfKBrulfbNJL.png" /></figure><p>Install Python:</p><pre>pyenv install 3.12.13</pre><p>Python is being installed via pyenv:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*C-znTlcyjnDnztGg.png" /></figure><p>Check that it was installed:</p><pre>pyenv versions</pre><p>pyenv has been successfully installed, the right version of Python is in use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/0*m_9cV-fZvjwkq1hK.png" /><figcaption>The right version of Python is in use</figcaption></figure><h3>Installing Cisco TRex</h3><p>TRex can be installed anywhere on your system. I’ll be installing it in /opt/trex as suggested in the official documentation.</p><p>Create a directory and enter it:</p><pre>mkdir -p /opt/trex<br>cd /opt/trex</pre><p>Download the latest stable version:</p><pre>wget --no-cache https://trex-tgn.cisco.com/trex/release/latest</pre><p>Due to some certificate issues, I had to add the --no-check-certificate flag to bypass SSL check. So the command to download the stable version looked like this:</p><pre>wget --no-cache https://trex-tgn.cisco.com/trex/release/latest --no-check-certificate</pre><p>Downloading Cisco TRex from the official website:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/0*U3Lru_AbmKBNeS7E.png" /></figure><p>Unpack the archive:</p><pre>tar -xzvf latest</pre><p>If you download the file using your web browser, you’ll download the lates.tar file that isn&#39;t compressed. To unpack such file use:</p><pre>tar -xvf latest.tar</pre><p>Unpacking the archive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/0*9tMX9CVQgSn5Im8X.png" /></figure><p>You can delete the archive if you want:</p><pre>rm latest</pre><p>Right now TRex should be installed in the /opt/trex/v3.08 directory and ready to use. As of today June 22, 2026, version v3.08 is the latest available stable version.</p><p>The next sections of this post are not necessary and focused on configuring DPDK, network interfaces, and performing simple L2 tests.</p><h3>Setting up DPDK</h3><p>Allocate hugepages for DPDK:</p><pre>dpdk-hugepages.py --setup 1G</pre><p>Load the VFIO driver:</p><pre>modprobe vfio-pci</pre><p>Allocating hugepages and loading the VFIO driver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/0*Nf-QhnNge1qJxdNC.png" /></figure><p>Check available DPDK devices:</p><pre>dpdk-devbind.py --status</pre><p>All devices recognized by DPDK:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/0*TRx_F5bbNVo8s2Lr.png" /></figure><p>You can see that vfio-pci appeared in the unused= section.*Active* means that the network interface is currently in use.</p><p>Before changing the default NIC driver to vfio-pci, I recommend writing down all MAC addresses of all interfaces. On the L2 testing step, it may be useful to know NIC MACs, so you will be able to create TRex configuration manually:</p><pre>ip -br link</pre><p>Network devices using Linux kernel driver with their MAC addresses:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/0*vd9zsmwJkfA33Ks2.png" /></figure><p>Bind NICs to the VFIO driver:</p><pre>dpdk-devbind.py -b vfio-pci 0000:09:00.0 0000:09:00.1 0000:0a:00.0 0000:0a:00.1</pre><p>0000:09:00.0, 0000:09:00.1, 0000:0a:00.0, 0000:0a:00.1 - are my NICs that I want to bind to VFIO. In your case, the number of NICs and their addresses almost certainly will differ.</p><p>Check DPDK devices again to see that the NICs were successfully attached to the VFIO driver and are usable by DPDK:</p><pre>dpdk-devbind.py --status</pre><p>Network devices were successfully attached to the VFIO driver and are using DPDK-compatible driver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*Pp5og02sXgPOA_WT.png" /></figure><p>You can see that the VFIO driver was successfully loaded and NICs were detached from the Intel e1000e driver</p><p>At this point DPDK should be configured and TRex should be able to use DPDK devices.</p><h3>Configuring Cisco TRex for a simple L2 loopback</h3><p>In order to run L2 TRex tests, you need to create a TRex configuration file. It is supposed to be located here: /etc/trex_cfg.yaml. You can do it manually or by using the dpdk_setup_ports.py script.</p><p>First of all, get interfaces IDs:</p><pre>dpdk-devbind.py --status</pre><p>Interfaces IDs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*663tYcj1vkrGGQcx.png" /></figure><p>To create the configuration manually, add the following in the /etc/trex_cfg.yaml:</p><pre># Cisco TRex configuration<br># The file is /etc/trex_cfg.yaml<br>- version: 2<br>  interfaces: [&#39;09:00.0&#39;, &#39;09:00.1&#39;]<br>  port_info:<br>      - dest_mac: 00:15:17:78:82:b7<br>        src_mac:  00:15:17:78:82:b6<br>      - dest_mac: 00:15:17:78:82:b6<br>        src_mac:  00:15:17:78:82:b7</pre><p>For L2 tests you want to know MACs of the interfaces attached to DPDK. The first interface should have the destination MAC of the second interface, and vice versa. Here 00:15:17:78:82:b6 is a MAC address of my first NIC interface, and 00:15:17:78:82:b7 is the second.</p><p>A more convenient approach is to use the tool shipped with TRex for setting up interfaces:</p><pre>./dpdk_setup_ports.py -i</pre><p>If you use the tool, you want:</p><pre>Do you want to use MAC based config? (y/N): y<br>Enter list of interfaces separated by space (for example: 1 3): Your interfaces<br>Change it to MAC of DUT? (y/N): n<br>Safe the config to file? (Y/n): y</pre><p>Using the TRex DPDK bind tool, MAC based config and choosing interfaces:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/0*U8jW-_vU5at0yRvG.png" /></figure><p>Using the TRex DPDK bind tool, using loopback MACs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/0*GWkpVhcAe8JsyYK6.png" /></figure><p>Using the TRex DPDK bind tool, generated configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*01YEp2bDSNuI2bue.png" /></figure><p>Using the TRex DPDK bind tool, saving configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*-iHyH3Puil-KY6Ct.png" /></figure><p>By using the tool, you don’t have to know MAC addresses. Also, in the future you may simply use it to configure the traffic generator for L3 testing purposes.</p><p>To start an L2 loopback test run the following in the first terminal:</p><pre>./t-rex-64 --no-ofed-check --no-scapy-server -i</pre><p>Running TRex in the first terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/0*z0-9jm0Pg6chceyl.png" /></figure><p>Then, open a second terminal and enter TRex console:</p><pre>./trex-console</pre><p>Running TRex console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/0*zsfCnzd_TMZmmcrI.png" /></figure><p>Via this new TRex console you can start tests, see and clear the traffic statistic, see the queue, etc.</p><p>In this TRex console, run the following to enter text user interface:</p><pre>tui</pre><p>Running TUI without any traffic and a loopback cable connected:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/0*RUSMieR_JCrvf_AD.png" /></figure><p>Run a simple L2 loopback test:</p><pre>start -f stl/bench.py -m 90% --port 0 1 -t size=64</pre><p>Running a simple L2 loopback test with attached ethernet cable:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/0*2rD2L64-U1hcF3k3.png" /></figure><p>You can change different benchmark parameters according to your needs. In the previous test I was using ports 0 and 1, frame size 64 bytes, and 90% line utilization.</p><p>If you see traffic moving between interfaces, that means that TRex is functioning properly.</p><p>Congratulations on setting up this amazing open source software!</p><h3>Running a simple L2 benchmark</h3><p>In this section I’ll show a simple way to run an L2 benchmark. This command is designed to test your network interfaces by gradually increasing PPS rate until any frames go into the queue.</p><p>In the first terminal, you need to run TRex:</p><pre>./t-rex-64 --no-ofed-check --no-scapy-server -i</pre><p>In the second terminal, run the benchmark:</p><pre>./ndr --stl --port 0 1 --profile stl/bench.py --tun size=64 --pdr 0 --q-full 100</pre><p>L2 simple benchmark using Cisco TRex:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*h6leSFychLt3AWVc.png" /></figure><h3>Note: No module named ‘cgi’</h3><p>If you try to run ./trex-console and see this:</p><pre>Using &#39;python3&#39; as Python interpeter<br><br>Traceback (most recent call last):<br>  File &quot;&lt;frozen runpy&gt;&quot;, line 198, in _run_module_as_main<br>  File &quot;&lt;frozen runpy&gt;&quot;, line 88, in _run_code<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/console/trex_console.py&quot;, line 49, in &lt;module&gt;<br>    from ..stl.api import *<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/stl/api.py&quot;, line 4, in &lt;module&gt;<br>    from ..utils.common import *<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/utils/common.py&quot;, line 11, in &lt;module&gt;<br>    from scapy.utils import *<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/utils.py&quot;, line 31, in &lt;module&gt;<br>    from scapy.config import conf<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/config.py&quot;, line 23, in &lt;module&gt;<br>    from scapy.themes import NoTheme, apply_ipython_style<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/themes.py&quot;, line 14, in &lt;module&gt;<br>    import cgi<br>ModuleNotFoundError: No module named &#39;cgi&#39;<br>Error in sys.excepthook:<br>Traceback (most recent call last):<br>  File &quot;/usr/lib/python3/dist-packages/apport_python_hook.py&quot;, line 238, in partial_apport_excepthook<br>    return apport_excepthook(binary, exc_type, exc_obj, exc_tb)<br>  File &quot;/usr/lib/python3/dist-packages/apport_python_hook.py&quot;, line 122, in apport_excepthook<br>    report[&quot;ExecutableTimestamp&quot;] = str(int(os.stat(binary).st_mtime))<br>                                            ~~~~~~~^^^^^^^^<br>FileNotFoundError: [Errno 2] No such file or directory: &#39;/opt/trex/v3.08/-m&#39;<br><br>Original exception was:<br>Traceback (most recent call last):<br>  File &quot;&lt;frozen runpy&gt;&quot;, line 198, in _run_module_as_main<br>  File &quot;&lt;frozen runpy&gt;&quot;, line 88, in _run_code<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/console/trex_console.py&quot;, line 49, in &lt;module&gt;<br>    from ..stl.api import *<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/stl/api.py&quot;, line 4, in &lt;module&gt;<br>    from ..utils.common import *<br>  File &quot;/opt/trex/v3.08/automation/trex_control_plane/interactive/trex/utils/common.py&quot;, line 11, in &lt;module&gt;<br>    from scapy.utils import *<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/utils.py&quot;, line 31, in &lt;module&gt;<br>    from scapy.config import conf<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/config.py&quot;, line 23, in &lt;module&gt;<br>    from scapy.themes import NoTheme, apply_ipython_style<br>  File &quot;/opt/trex/v3.08/external_libs/scapy-2.4.3/scapy/themes.py&quot;, line 14, in &lt;module&gt;<br>    import cgi<br>ModuleNotFoundError: No module named &#39;cgi&#39;</pre><p>That means you’re trying to use an incompatible Python version. TRex v3.08 is intended to be used with Python 3.12.</p><p>The module cgi was removed in Python version 3.13: <a href="https://peps.python.org/pep-0594/">PEP 594 — Removing dead batteries from the standard library</a>.</p><p>To solve the issue, use Python 3.12. The Installing Python section of this guide is suggests a way to manage multiple Python installations using the version manager pyenv.</p><h3>Note: Could not determine MAC</h3><p>At any point of using DPDK or TRex scripts, you may see this error appearing in the terminal:</p><pre>Could not determine MAC of interface: 2. Please verify with -t flag.</pre><p>That probably means that you’ve already bound the interface to vfio-pci.</p><p>You can reverse this process by using:</p><pre>dpdk-devbind.py -b e1000e 0000:09:00.0 0000:09:00.1</pre><p>Here I replace the VFIO driver with the default e1000e driver so NICs can be used by the kernel again. In your case IDs and drivers will differ.</p><h3>Note: Requested device cannot be used</h3><p>You may see this message:</p><p>Or when trying to run ./t-rex-64 --no-ofed-check --no-scapy-server -i something like this:</p><pre>The ports are bound/configured.<br>Starting  TRex v3.08 please wait  ...<br>EAL: 0000:09:00.0 failed to select IOMMU type<br>PCI_BUS: Requested device 0000:09:00.0 cannot be used<br>EAL: 0000:09:00.1 failed to select IOMMU type<br>PCI_BUS: Requested device 0000:09:00.1 cannot be used<br>EAL: Bus (pci) probe failed.<br>ERROR in DPDK map<br>Could not find requested interface 09:00.0</pre><p>To solve this issue, you can try to bypass the VFIO safety check.</p><p>Allow unsafe interrupts:</p><pre>echo &quot;options vfio_iommu_type1 allow_unsafe_interrupts=1&quot; &gt; /etc/modprobe.d/iommu_unsafe_interrupts.conf</pre><p>Unload the module:</p><pre>modprobe -r vfio_iommu_type1</pre><p>Reload the module:</p><pre>modprobe vfio_iommu_type1</pre><p>See <a href="https://pve.proxmox.com/wiki/PCI_Passthrough#Verify_IOMMU_interrupt_remapping_is_enabled">Verify IOMMU interrupt remapping is enabled</a> for more information.</p><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/06/22/trex/"><em>https://savalione.com</em></a><em> on June 22, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82c8e280191d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrading Ubuntu from 24.04 LTS to 26.04 LTS]]></title>
            <link>https://medium.com/@savalione/ubuntu-24-26-35a0e3cda787?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/35a0e3cda787</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Sat, 20 Jun 2026 00:00:28 GMT</pubDate>
            <atom:updated>2026-08-30T21:13:43.100Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c9Bw7X1roBQIhf1V.jpg" /><figcaption>An HP ProLiant DL160 G6 server used in this post</figcaption></figure><p>I have a dedicated server for testing purposes. The server is an old HP ProLiant DL160 G6 with two Intel Xeon X5650 CPUs and 48GB RAM. It is often used to compile some code (Go, C++, drivers) and test network devices (DPDK, Cisco TRex). It has no sophisticated services on it and is meant to be disposable, and that’s why I decided to upgrade it from Ubuntu 24.04 LTS to 26.04 LTS using the default Ubuntu upgrade tool (do-release-upgrade).</p><p>In this post I’ll go through all the steps needed to upgrade a system from 24.04 to 26.04.</p><p>Some considerations you need to take into account before doing a similar upgrade:</p><ul><li>Even though the 26.04 LTS release was released on April 23, 2026, as of today (June 20, 2026) it is still considered to be in a development state. So in order to upgrade the system, I had to add the -d flag to do-release-upgrade.</li><li>The success of the upgrade depends on many factors, including the number of installed packages, their configuration, the machine’s age, etc. As a general rule, the fewer custom packages you have, the fewer issues you will have.</li><li>Most of the time, such an upgrade on a production server is not a great idea, so I discourage doing so.</li><li>Even though many teams work to make such an upgrade seamless, you should be ready to manually fix some services or potentially lose all data.</li></ul><p>This post is divided into two steps:</p><ol><li>Initial preparations</li><li>Upgrading the Ubuntu distribution</li></ol><p>At the end of this blog post, you will also find some common issues and ways to fix them.</p><h3>About the server</h3><p>The server hasn’t been updated in months. The Linux kernel version is 6.8.0-110-generic and many packages require an update.</p><p>You can check information about your system using:</p><pre>uname -a<br>lsb_release -a<br>cat /etc/os-release</pre><p>On my server everything looks like this right now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/0*vF80X2VHyIQPOxIV.png" /><figcaption>The initial state of the server</figcaption></figure><h3>Initial preparations</h3><p>The first thing you should really consider doing is a full backup of everything. Doing a distribution upgrade may corrupt important data or make your machine not bootable.</p><p>Then, you need to update and upgrade all packages.</p><p>Update the local package index and download the latest information about the packages:</p><pre>apt update</pre><p>Apt will show the status of the operation and the number of packages that can be upgraded:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*zw-eOsN7gox-J5WL.png" /><figcaption>Updating all packages metadata</figcaption></figure><p>Upgrade all packages:</p><pre>apt upgrade</pre><p>Before upgrading packages, apt will show additional information and will wait for user confirmation to continue the upgrade:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/0*JdI1Ejr7ebXjDCFl.png" /><figcaption>Upgrading all packages, apt waiting for user confirmation</figcaption></figure><p>After a successful upgrade, I noticed that the new Linux kernel version was available:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/0*Z-TGJWxU99dq2lB0.png" /><figcaption>Linux kernel version upgrade pending</figcaption></figure><p>To boot into the new kernel, the system should be rebooted:</p><pre>systemctl reboot</pre><p>After rebooting, you can see that the system booted into the new kernel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/0*aXnnCha0aYIuw2s0.png" /><figcaption>Ubuntu booted into the new Linux kernel version</figcaption></figure><p>I also recommend removing the packages that are no longer needed:</p><pre>apt autoremove</pre><h3>Upgrading the Ubuntu distribution</h3><p>As I already mentioned, the distribution upgrade process will solely depend on your particular setup. Also, because there is no 26.04.01 LTS yet, I had to add the -d flag to the do-release-upgrade command which makes everything a little bit more unstable. You may not need to add this flag.</p><p>Upgrade the distribution:</p><pre>do-release-upgrade</pre><p>You’ll be provided with the new release information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/0*qH3_d0mI7t7Jxgtl.png" /><figcaption>Information about the new available Ubuntu distribution release</figcaption></figure><p>To start the whole process, you’ll have to continue (type y and press enter):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/0*NR7kkQzMrgLb3A2h.png" /><figcaption>Initiate Ubuntu upgrade</figcaption></figure><p>The tool may tell you that it is not safe to upgrade the distribution via SSH, and a new ssh server instance should be created on a custom port:</p><pre>Continue running under SSH?<br><br>This session appears to be running under ssh. It is not recommended<br>to perform a upgrade over ssh currently because in case of failure it<br>is harder to recover.<br><br>If you continue, an additional ssh daemon will be started at port<br>&#39;1022&#39;.<br>Do you want to continue?<br><br>Continue [yN]</pre><p>Continue the installation (type y and press enter):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*geemOZY5sTzauoeq.png" /><figcaption>Ubuntu distribution upgrade, open an SSH port and continue</figcaption></figure><p>Then, the tool will display information about packages that will be installed and the amount of data to be downloaded:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/0*kf051wPlLxBaQ9kC.png" /><figcaption>Ubuntu distribution upgrade, information about packages and the amount of data needed to be downloaded</figcaption></figure><p>You can press y to continue installation or d to show details about the new packages.</p><p>Occasionally, the tool ask you some questions about different tools and what to do with the existing configuration. For example, I’ve modified the default chrony configuration, so the tool asks me what to do with it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YJ8dkgzdMHNEHY8t.png" /><figcaption>Ubuntu distribution upgrade, new version of a configuration file is available</figcaption></figure><p>Most of the time, you can just keep the local version currently installed.</p><p>After a successful installation, the tool may ask you what to do with obsolete packages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/0*RjattNShMqivAN1O.png" /><figcaption>Ubuntu distribution upgrade, what to do with obsolete packages</figcaption></figure><p>I recommend removing them (type y and press enter).</p><p>If the upgrade was successful, the tool will prompt the following:</p><pre>System upgrade is complete.<br><br>Restart required<br><br>To finish the upgrade, a restart is required.<br>If you select &#39;y&#39; the system will be restarted.<br><br>Continue [yN]</pre><p>To finish the upgrade, reboot the system (type y and press enter):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/411/0*9jsjIuEWIMlUrRfv.png" /><figcaption>Ubuntu upgrade is complete</figcaption></figure><p>If the system boots, you may consider the upgrade to be a success.</p><p>In my case, the new Linux kernel version is 7.0.0–22-generic. Here is the beautiful output using fastfetch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/0*2S26oV9m67RL7kyY.png" /><figcaption>Ubuntu 26.04 LTS fastfetch</figcaption></figure><p>Congratulations on the distribution upgrade from 24.04 LTS to 26.04 LTS!</p><h3>Note: There is no development version of an LTS available</h3><p>If you try to upgrade the system using do-release-upgrade and see the following:</p><pre>Checking for a new Ubuntu release<br>There is no development version of an LTS available.<br>To upgrade to the latest non-LTS development release<br>set Prompt=normal in /etc/update-manager/release-upgrades.</pre><p>This means that there is no Ubuntu 26.04.01 LTS yet.</p><p>To solve this issue, add the -d flag to do-release-upgrade:</p><pre>do-release-upgrade -d</pre><p>However, doing so is generally not recommended for production environments.</p><h3>Note: Configuring grub-pc</h3><p>At some point during the installation, you may see the following question:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xUvYKssJ_RtpTujQ.png" /><figcaption>Configuring grub-pc, devices to install on</figcaption></figure><p>The device to install grub-pc on will depend on your particular configuration. Generally it’s going to be the whole drive (for example sda) and not a partition (not sda2).</p><p>If you boot from an NVME device, the same principle may apply.</p><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/06/20/ubuntu-24-26/"><em>https://savalione.com</em></a><em> on June 20, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35a0e3cda787" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compiling and setting up DPDK on Ubuntu 24.04 LTS]]></title>
            <link>https://medium.com/@savalione/dpdk-127fe8c3aa6b?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/127fe8c3aa6b</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[dpdk]]></category>
            <category><![CDATA[computer-network]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Fri, 01 May 2026 00:00:35 GMT</pubDate>
            <atom:updated>2026-05-25T18:07:27.084Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FrrcSRG0CRxSuveT.jpg" /><figcaption>An AMD server and an Allied Telesis switch</figcaption></figure><p>I recently bought some old networking equipment and decided to test it (raw throughput, NAT, firewall). One of the best tools for this is Cisco TRex, an open source L3–7 traffic generator. TRex uses DPDK as its primary backend, so before getting started with the traffic generator, DPDK must be installed.</p><p>In this post, I will show you how to compile and install DPDK from scratch on an Ubuntu 24.04 LTS server.</p><p>This post is divided into 4 steps:</p><ol><li>Enabling IOMMU (recommended for full throughput)</li><li>Reserving hugepages (recommended for optimal performance)</li><li>Compiling and installing DPDK</li><li>Configuring DPDK</li></ol><p>The final section of this post provides some useful commands.</p><h3>IOMMU configuration</h3><p>On most systems, IOMMU is enabled by default, especially on AMD based machines.</p><p>To check the IOMMU status on an Intel based machine, use:</p><pre>dmesg | grep -i dmar</pre><p>On an AMD based machine, use:</p><pre>dmesg | grep -i amd-vi</pre><p>You can also use these commands to check the number of IOMMU groups and verify if they are enabled in the kernel boot parameters:</p><pre>ls /sys/kernel/iommu_groups/<br>cat /proc/cmdline</pre><p>The screenshot below shows the IOMMU status on my machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/0*0pCNfefW5myHLVnU.png" /><figcaption>Linux terminal output showing IOMMU status</figcaption></figure><p>I am using an AMD based machine, which does not require additional kernel parameters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*A0h9WW9OUnX6TbOb.png" /><figcaption>Linux kernel boot parameters (AMD)</figcaption></figure><p>If the (dmesg) commands above return nothing, you may need to enable IOMMU, particularly if you are using an Intel, ARM, or RISC-V processor.</p><p>To explicitly enable IOMMU on an Intel processor, modify your kernel boot parameters. Open your GRUB configuration file:</p><pre>nano /etc/default/grub</pre><p>Find the GRUB_CMDLINE_LINUX_DEFAULT line and add intel_iommu=on inside the quotes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*LJ-76gVD-0082KG7.png" /><figcaption>Linux kernel boot parameters (Intel)</figcaption></figure><p>Update the GRUB configuration:</p><pre>update-grub</pre><p>Restart the system:</p><pre>systemctl reboot</pre><p>After enabling IOMMU on an HP server with Intel processors, the boot log looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/0*8xcVmzuCYuvdKl_i.png" /><figcaption>Linux kernel boot, IOMMU, dmar in the boot log</figcaption></figure><p>If you can’t enable IOMMU or your system does not support it, you can still use DPDK, but performance will be degraded and it’s generally considered less secure.</p><h3>Reserving hugepages (HugeTLB Pages)</h3><p>Using hugepages is optional but highly recommended, as it allows a large, reserved chunk of memory to be managed entirely by DPDK.</p><p>First, check if your CPU supports hugepages:</p><pre>cat /proc/cpuinfo | grep &quot;pse&quot;<br>cat /proc/cpuinfo | grep &quot;pdpe1gb&quot;</pre><p>Here, pse indicates 2MB hugepage support, and pdpe1gb indicates 1GB support.</p><p>On my system, pse and pdpe1gb pages are supported:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BayAilf4QDpDJ0SD.png" /><figcaption>Terminal output, checking CPU hugepages status</figcaption></figure><p>You can find additional information about hugepages in /proc/meminfo:</p><pre>cat /proc/meminfo | grep Huge`</pre><p>Before reserving hugepages, the meminfo may look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/0*Yn-yVi4vaHeECy7f.png" /><figcaption>Terminal output, checking meminfo hugepages status (before changes)</figcaption></figure><p>There are several ways to reserve hugepages. In this section, I will do so using kernel boot parameters.</p><p>Open the GRUB configuration file again:</p><pre>nano /etc/default/grub</pre><p>Add default_hugepagesz=2M hugepagesz=2M hugepages=512 to the GRUB_CMDLINE_LINUX_DEFAULT line:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/0*x4KXLkMUOIHKVtTQ.png" /><figcaption>Editing Linux kernel boot parameters (grub)</figcaption></figure><p>Here, hugepages=512 defines the number of hugepages, default_hugepagesz=2M sets the default hugepage size, and hugepagesz=2M specifies the hugepage size to allocate.</p><p>For example, on my Intel server, I reserved 4 pages 1GB each ( default_hugepagesz=1G hugepagesz=1G hugepages=4):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/0*Iz3VxnFvTgYFUE4g.png" /><figcaption>Editing Linux kernel boot parameters (grub) Intel server</figcaption></figure><p>Update the GRUB configuration:</p><pre>update-grub</pre><p>Restart the system:</p><pre>systemctl reboot</pre><p>Verify the reserved pages:</p><pre>cat /proc/meminfo | grep Huge</pre><p>Here is how reserved pages look on my system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/0*Mbi8yfZUjM_L0TD5.png" /><figcaption>Terminal output, checking meminfo hugepages status (after changes)</figcaption></figure><h3>Installing dependencies</h3><p>DPDK can be compiled with GCC or Clang. To keep things simple, I will use GCC, which is provided by the build-essential package.</p><p>Install the required dependencies:</p><pre>apt install build-essential meson ninja-build python3-pyelftools libnuma-dev</pre><p>Here is a brief description of the packages:</p><ul><li>build-essential - general development tools (GCC, make).</li><li>meson ninja-build - build systems.</li><li>python3-pyelftools - parsing and analyzing ELF.</li><li>libnuma-dev - library for handling NUMA.</li></ul><p>Here is the APT output showing the packages and dependencies that will be downloaded and installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/0*p048sB_8UuP4eETC.png" /><figcaption>Terminal output of APT about the packages and dependencies that will be downloaded and installed</figcaption></figure><p>All packages have been installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*ZViuBwd-pYKX4G9e.png" /><figcaption>Terminal output, all packages have been installed</figcaption></figure><h3>Obtaining DPDK source code</h3><p>Next, you need to obtain the DPDK source code.</p><p>You can just download the archive and unpack it:</p><pre>tar xJf dpdk-&lt;version&gt;.tar.xz<br>cd dpdk-&lt;version&gt;</pre><p>While you can download a tarball, I prefer cloning the repository directly from git to ensure I am on the latest stable version. At the time of writing this post, the latest version is v26.03. Using git, download the source code and switch to the stable tag:</p><pre>git clone --branch v26.03 --recursive https://github.com/DPDK/dpdk.git</pre><p>The repository is being cloned:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*PA_QpcUyCCWo0RXC.png" /><figcaption>DPDK repository with the source code is being cloned</figcaption></figure><p>Enter the directory:</p><pre>cd dpdk</pre><p>Check that you’re on the stable tag:</p><pre>git describe --tags --exact-match</pre><p>The repository is on the v26.03 tag right now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/0*U4j2ChrBKOTIjFa6.png" /><figcaption>DPDK repository, git, stable tag</figcaption></figure><h3>Compiling DPDK</h3><p>Right now you should be in the directory containing the DPDK source code.</p><p>Check the possible configuration options:</p><pre>meson configure</pre><p>There are many configuration options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c37ptkKAofyNl1Ha.png" /><figcaption>DPDK meson configuration</figcaption></figure><p>You don’t have to change anything, but if you need to customize the build, use the following command:</p><pre>meson setup &lt;options&gt; build</pre><p>Build the project:</p><pre>meson setup build</pre><p>You’ll have to wait a moment while meson configures the project and generates the ninja build scripts.</p><p>It’s also a great idea to check which drivers will be compiled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/0*slvDFNCOkwNqztel.png" /><figcaption>DPDK meson configuration - enabled drivers</figcaption></figure><p>Switch to the build directory:</p><pre>cd build</pre><p>Finally, compile DPDK:</p><pre>ninja</pre><p>You can see that DPDK has been compiled:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/0*s06L5vShSvS6m7wp.png" /><figcaption>Compiling DPDK - ninja output</figcaption></figure><p>Install DPDK:</p><pre>meson install</pre><p>DPDK has been installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/0*Mhn9HZRYZ1YGM3IO.png" /><figcaption>DPDK meson - DPDK has been installed</figcaption></figure><p>Update the linker run time bindings:</p><pre>ldconfig</pre><p>Check that DPDK has been successfully installed:</p><pre>dpdk-devbind.py --status</pre><p>You can see that DPDK is working properly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/0*46zoCme-djsbS12V.png" /><figcaption>DPDK is working</figcaption></figure><h3>Configuring DPDK</h3><p>After completing the steps above, your DPDK environment should be ready. In this optional section, I’ll show you how you can interact with DPDK.</p><p>Allocate hugepages for DPDK:</p><pre>dpdk-hugepages.py --setup 1G</pre><p>Load the VFIO driver:</p><pre>modprobe vfio-pci</pre><p>Check DPDK devices:</p><pre>dpdk-devbind.py --status</pre><p>After loading the VFIO driver, you can see that vfio-pci appeared in the unused= section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*53vRL6bk3EPNdBjn.png" /><figcaption>DPDK devices, vfio-pci is available</figcaption></figure><p>At this step, it may be a good idea to obtain the devices’ MAC addresses, because after binding an interface to DPDK, it won’t be that simple to find out its MAC address:</p><pre>ip addr</pre><p>Bind NICs to the VFIO driver:</p><pre>dpdk-devbind.py -b vfio-pci 0000:09:00.0 0000:09:00.1</pre><p>Here, 0000:09:00.0 and 0000:09:00.1 are the NICs I&#39;m binding to DPDK.</p><p>Check DPDK devices again to see that the NICs have been successfully bound to DPDK:</p><pre>dpdk-devbind.py --status</pre><p>Network devices are using a DPDK-compatible driver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/0*5ch1yHARBIc1lZ6O.png" /><figcaption>Network devices are using a DPDK-compatible driver</figcaption></figure><p>In dmesg, you can see that the VFIO driver was successfully loaded and the NICs were detached from the Intel igb driver:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/0*-rOar_DjWngfZNmr.png" /><figcaption>dmesg VFIO and igb removed NICs</figcaption></figure><p>On my Intel HP server with multiple NICs, you can see that e1000e devices now use vfio-pci:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/0*hNIgJbdmhMkyiP-s.png" /><figcaption>Intel HP server - e1000e</figcaption></figure><p>That’s basically it. You’ve successfully compiled, configured, and installed DPDK from scratch!</p><p>In the future, I will demonstrate how to use DPDK with Cisco TRex. Thanks to the DPDK architecture, the initial configuration is now complete, and we can focus on the integration.</p><h3>How to reserve hugepages right away (without rebooting)</h3><p>On a single node system:</p><pre>echo 1024 &gt; /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages</pre><p>Here, 1024 represents the number of 2048kB pages. The example above reserves 2GB (1024 * 2048kB) of memory.</p><p>On a NUMA system:</p><pre>echo 1024 &gt; /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages<br>echo 1024 &gt; /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages</pre><p>Here you can see that hugepages are reserved for each NUMA node ( node0, node1).</p><p>See <a href="https://docs.kernel.org/admin-guide/mm/hugetlbpage.html">HugeTLB Pages</a> for more information.</p><h3>How to reserve hugepages via DPDK (dpdk-hugepages.py)</h3><p>DPDK provides a script for working with hugepages ( dpdk-hugepages.py). This script can reserve pages:</p><pre>dpdk-hugepages.py --reserve=2G</pre><p>See <a href="https://doc.dpdk.org/guides/tools/hugepages.html">dpdk-hugepages Application</a> for more information.</p><h3>How to reserve hugepages via kernel boot parameters on a NUMA architecture</h3><p>Just specify NUMA nodes in the kernel boot settings of the hugepages parameter:</p><pre>hugepages=0:1,1:2</pre><p>Here, 0 stands for NUMA node0, and 1 for NUMA node1.</p><p>So, on node0 a single page will be allocated, and on node1 two pages will be allocated.</p><p>See <a href="https://docs.kernel.org/admin-guide/mm/hugetlbpage.html">HugeTLB Pages</a> for more information.</p><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/05/01/dpdk/"><em>https://savalione.com</em></a><em> on May 1, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=127fe8c3aa6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Initial setup and firmware upgrade of a Cisco CT2504]]></title>
            <link>https://medium.com/@savalione/cisco-ct2504-4e745c05586f?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e745c05586f</guid>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[computer-network]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[wireless]]></category>
            <category><![CDATA[cisco]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 00:00:42 GMT</pubDate>
            <atom:updated>2026-05-02T12:33:50.440Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rkukUObsS2IANE91.jpg" /><figcaption>A photo of a physical Cisco CT2504 Wireless Controller, used as the header image for the setup and firmware upgrade guide</figcaption></figure><p>So, you’ve acquired a Cisco CT2504 Wireless Controller (WLC) and decided to set it up. A physical controller has a few advantages compared to a virtual one (vWLC). For example, you can use local mode (instead of FlexConnect) and you don’t have to deal with legacy virtual machines.</p><p>In this post, I’ll guide you through the initial steps of setting this controller up.</p><p>This post is divided into 5 steps:</p><ol><li>Preparing required tools and software.</li><li>Resetting the controller so it doesn’t retain any configuration from the previous owner.</li><li>Updating the firmware (FUS, AireOS, Bundle) to the latest available version (8.5.182.12).</li><li>Resetting all settings again.</li><li>Performing the initial setup.</li></ol><p>The last section of the post provides some useful commands and solutions to common issues.</p><h3>Preparing</h3><p>My controller is a Cisco CT2504 ( AIR-CT2504-K9). It&#39;s serial number is: PSJ1539020I. The base permanent number of access points is 5, though through additional licenses, it can be increased up to 75.</p><p>First of all, prepare an official Cisco rollover console cable. I will be using 72-3383-01 (DB9 to RJ45):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fb3Rptp5OwreEwm9.jpg" /><figcaption>Official Cisco rollover console cable DB9 to RJ45</figcaption></figure><p>Because I am using a DB9 connector, I need a serial port. For this, I’ll be using a dedicated port on my Dell R720:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bredrZ1Ux_bfP1I-.jpg" /><figcaption>Serial COM port on the back of a Dell R720 server</figcaption></figure><p>For some reason, Cisco APs and controllers are very sensitive to the serial cable and serial connection, so I highly advise you to use an official Cisco rollover cable. Also, if you use a DB9 connector, be sure to use a high quality port with good drivers. Something like a knockoff USB-to-DB9 cable without appropriate drivers for $3 almost certainly won’t work. For example, this cable didn’t work for me:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O2L5-0ocviF83124.jpg" /><figcaption>Cheap third-party USB to DB9 serial adapter cable</figcaption></figure><p>On the controller’s motherboard, an RTC battery is located. It’s a regular CR2032 that you can find on many motherboards. I recommend replacing it so you won&#39;t have any clock related issues in the future.</p><p>Unscrew these bolts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_PO6tjPrAVjQNKsV.jpg" /><figcaption>Location of the bolts holding the Cisco CT2504 cover</figcaption></figure><p>Gently remove the cover:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a0VgJ5ngi8zpRT0D.jpg" /><figcaption>Cisco CT2504 without the cover</figcaption></figure><p>Here is the controller motherboard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hFykdgGCh0uiWsAc.jpg" /><figcaption>View of the Cisco CT2504 motherboard</figcaption></figure><p>In the bottom left corner, you can see the battery. Replace it and reassemble everything in reverse order.</p><p>Next, prepare the firmware. The latest available version of AireOS is 8.5.182.12, but you&#39;ll also have to replace the FUS (Field Upgrade Software) firmware. In this post, I&#39;ll be updating firmware in the following order: FUS -&gt; AireOS 8.5.182.0 -&gt; AP bundle 8.5.182.0 (optional) -&gt; AireOS 8.5.182.12.</p><p>You can download all required files on the Cisco website (only if you have a working service contract): <a href="https://software.cisco.com/download/home/283848165/type">Cisco Software — 2504 Wireless Controller</a></p><p>Used files:</p><pre>AIR-CT2500-K9-2-0-0-0-FUS.aes<br>    Description: Cisco Unified Wireless Network Field Upgrade Software Release 2.0 for Cisco 2500 Series Wireless LAN Controllers.<br>    MD5 Checksum: 2f11bdb166f374ed1b7fcd83b0e67d6e<br>    SHA512 Checksum: ada963c50e5396e4eb0e712afb3322008443b55aba99f48e2cd1c7e18b511e6f04051363d140784fca155948ce98087620130419204fbe72906ff78d3d3651fb<br>AIR-CT2500-K9-8-5-182-0.aes<br>    Description: Cisco 2500 Series Wireless Controllers Release 8.5 Software.<br>    MD5 Checksum: 0ec0927df061c754ebbd9c5baa9047ad<br>    SHA512 Checksum: 8de868143326d027b175f99801287b7e65d0d4dced47c40a77fd7142d2eded1cceeda53e17813e13efaa4d27bd6eebc4158f9e9c23965f2f64b56f291b623486<br>AIR-CT2500-AP_BUNDLE-K9-8-5-182-0.aes<br>    Description: Supplementary AP Bundle Images for Cisco 2504 Series WLC Release 8.5. This bundle is mandatory to support AP802,AP803,AP1530, AP1550 , AP1570 and AP1600.<br>    MD5 Checksum: 304e1e7e0ed953da1fe447f3ef897825<br>    SHA512 Checksum: 3bcb44091d79402eeb695b46cdf76611ea76aa2a78230662ce895a77f5243bfcdab030378c89c2e2b08da8cc44fb12f6b0c16e84b012b01ac0a120488eb40174<br>AIR-CT2504-K9-8-5-182-12.aes<br>    Description: Addendum Release Notes for Cisco Wireless LAN Controllers and Lightweight Access Points for Special Build 8.5.182.12<br>    MD5 Checksum: c94c5d965787997111de3d5f7235926d<br>    SHA512 Checksum: f91df2457483e228ff2fc6e9735eb62c0aba49bb8e409daf6b1ac94417996d7f4be3f53200317ebc9702c4a255afe0f18c054f22828392e6418807d0d4a444ff</pre><p>The firmware should be uploaded to a TFTP server. My server is located at 192.168.56.3 and served by tftpd-hpa.</p><h3>Connect to the controller via the console</h3><p>I’ll be using minicom to do this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*EkSIzhZfsxRNIYp2.png" /><figcaption>minicom</figcaption></figure><p>To start minicom, use:</p><pre>sudo minicom -D /dev/ttyS1 -b 9600</pre><p>To exit, press CTRL+A, then X, and confirm that you want to exit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*XQfxCpj6R-1P0znS.png" /><figcaption>Prompt asking to confirm exit from minicom</figcaption></figure><h3>Reset current configuration</h3><p>Even if you know the credentials, it’s a good idea to reset the current configuration so there are no issues when the files are downloaded from the TFTP server (for example, when clients attempt to access a network, or multiple APs simultaneously download firmware). There are multiple ways to do this:</p><ol><li>Intercept booting by pressing the ESC button and entering the Boot Loader Menu.</li><li>Entering Recover-Config as the username (this works only once after the controller is reloaded).</li><li>Via the WebUI: Advanced -&gt; Commands -&gt; Reset to Factory Default.</li></ol><p>I’ll be resetting the configuration via the Boot Loader Menu. Simply press ESC and power on the controller. Shortly after, you&#39;ll see the menu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/0*shYojfe3ZAcG54-n.png" /><figcaption>Cisco WLC Boot Loader Menu terminal output</figcaption></figure><p>Here, press 4 (Clear configuration):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/0*UZfm3GKXs9AUCREe.png" /><figcaption>Terminal output showing successful clearing of WLC configuration</figcaption></figure><p>After a successful reset, the system will boot and prompt for auto install:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/0*seXdQ7Nlx2ynamGS.png" /><figcaption>Terminal output showing WLC attempting to terminate auto install</figcaption></figure><p>It’s not possible to skip this process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/0*PSbRrbDLazX6rwfE.png" /><figcaption>Terminal message indicating auto install cannot be skipped</figcaption></figure><p>Simply set up the controller enough so that it can connect to the TFTP server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*QwSoR0jZSKBNQ0Qa.png" /><figcaption>Terminal output showing the initial configuration of the WLC</figcaption></figure><h3>Updating FUS</h3><p>First of all, the FUS (Field Upgrade Software) needs to be updated.</p><p>To update FUS, do the following:</p><pre>transfer download mode tftp<br>transfer download datatype code<br>transfer download serverip 192.168.56.3<br>transfer download filename AIR-CT2500-K9-2-0-0-0-FUS.aes<br>transfer download start</pre><p>The controller will ask you whether you want to start the download:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/0*tmHVgigucURXDIdY.png" /><figcaption>Terminal prompt asking to confirm TFTP file transfer for FUS</figcaption></figure><p>Press y.</p><p>You can verify that the file is being downloaded from your TFTP server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*ruiC4fGlJIKrBvvk.png" /><figcaption>Log output on the TFTP server showing the WLC requesting the FUS file</figcaption></figure><p>Then, reboot the system:</p><pre>reset system</pre><p>Press y again to confirm all configuration changes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/0*tkidXhRplvVXwcZO.png" /><figcaption>Terminal prompt asking to save changes before resetting</figcaption></figure><p>On the first boot after uploading the FUS, you’ll see a message about the FUS updating:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/0*ksLRiIvAjQhut5VR.png" /><figcaption>Terminal output warning not to power off during FUS upgrade</figcaption></figure><p>Make sure the controller does not lose power during the FUS update.</p><p>Shortly after, the FUS will finish updating:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/0*k8DdxmWOb4OX0uww.png" /><figcaption>Terminal output confirming the successful FUS software upgrade</figcaption></figure><p>You can compare the boot logs to verify that the FUS was indeed updated:</p><pre>WLCNG Boot Loader Version 1.0.16 (Built on Feb 28 2011 at 13:14:54 by cisco)<br>WLCNG Boot Loader Version 1.0.20 (Built on Jan 14 2014 at 11:40:45 by cisco)</pre><h3>Updating AirOS</h3><p>After updating FUS, it’s time to update AireOS.</p><p>I updated AireOS from version 7.0.116.0 to 8.5.182.0, and then to 8.5.182.12. I&#39;m not sure if skipping version 8.5.182.0 is possible, but the first 8.5.182.0 boot took a really long time due to the configuration update process. Just to be safe, we&#39;ll update to 8.5.182.0 first.</p><p>To update AireOS, do the following:</p><pre>transfer download mode tftp<br>transfer download datatype code<br>transfer download serverip 192.168.56.3<br>transfer download filename AIR-CT2500-K9-8-5-182-0.aes<br>transfer download start</pre><p>The system will again ask you if you want to start the download (press y):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/0*PH6u9zkzi9KD81T4.png" /><figcaption>Terminal prompt asking to confirm TFTP file transfer for AireOS 8.5.182.0</figcaption></figure><p>Reboot the system:</p><pre>reset system</pre><p>After rebooting, you can see the new version in the logs:</p><pre>Press &lt;ESC&gt; now to access the Boot Menu...<br><br>Loading primary image (8.5.182.0)<br>100%<br><br>38700281 bytes read</pre><p>Running show sysinfo also confirms this:</p><pre>(Cisco Controller) &gt;show sysinfo<br><br>Manufacturer&#39;s Name.............................. Cisco Systems Inc.<br>Product Name..................................... Cisco Controller<br>Product Version.................................. 8.5.182.0<br>Bootloader Version............................... 1.0.20<br>Field Recovery Image Version..................... 7.6.101.1<br>Firmware Version................................. PIC 16.0</pre><p>Next, update the bundle:</p><pre>transfer download mode tftp<br>transfer download datatype code<br>transfer download serverip 192.168.56.3<br>transfer download filename AIR-CT2500-AP_BUNDLE-K9-8-5-182-0.aes<br>transfer download start</pre><p>The system will again ask you if you want to start the download (press y):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*TLIZKKB-1_AA6BpB.png" /><figcaption>Terminal prompt asking to confirm TFTP file transfer for AP bundle</figcaption></figure><p>Reboot the system:</p><pre>reset system</pre><p>Next, update AireOS from 8.5.182.0 to 8.5.182.12:</p><pre>transfer download mode tftp<br>transfer download datatype code<br>transfer download serverip 192.168.56.3<br>transfer download filename AIR-CT2504-K9-8-5-182-12.aes<br>transfer download start</pre><p>The system will again ask you if you want to start the download (press y):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*MacYo6HVIbNEhlGO.png" /><figcaption>Terminal prompt asking to confirm TFTP file transfer for AireOS 8.5.182.12</figcaption></figure><p>Reboot the system:</p><pre>reset system</pre><p>After rebooting, you will see the new version in the logs, which is the last version ever released for the Cisco CT2504 ( 8.5.182.12):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/0*smGPJOFNWidNmo2G.png" /><figcaption>Terminal output showing primary image loaded as 8.5.182.12</figcaption></figure><h3>Resetting system to the factory defaults (again)</h3><p>I recommend resetting the system to factory defaults again so there are absolutely no issues with the controller caused by the old configuration or the version merging and updating process. The controller will feel like a brand new device with the latest possible firmware.</p><p>Here is the final result ( show sysinfo):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/0*eMcGVCg1QTDnrhcB.png" /><figcaption>Terminal output of the show sysinfo command displaying the updated firmware versions</figcaption></figure><p>After completing the autoinstall prompt, you can continue setting up the controller via the web interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MmBKv_32JMbE_AXq.png" /><figcaption>Cisco WLC Web GUI</figcaption></figure><h3>Useful controller commands</h3><p>Reboot the controller:</p><pre>reset system</pre><p>Show all licenses:</p><pre>show license all</pre><p>Show system information:</p><pre>show sysinfo</pre><p>Show all access points:</p><pre>show ap summary</pre><p>Reboot an access point:</p><pre>config ap reset &lt;AP&gt;</pre><p>Log all CAPWAP events (the protocol used to exchange information between a controller and an AP):</p><pre>debug capwap events enable<br>debug capwap errors enable</pre><p>To disable all logs:</p><pre>debug disable-all</pre><p>Increase session IDLE timeout (to 160 minutes):</p><pre>config sessions timeout 160</pre><p>Convert all APs to FlexConnect mode automatically (particularly useful for vWLC):</p><pre>config ap autoconvert flexconnect</pre><h3>How to configure FlexConnect if the DHCP server doesn’t support Option 43</h3><p>You can use a DNS server, just create a couple of records pointing to the controller.</p><p>For example:</p><pre>CISCO-CAPWAP-CONTROLLER     net.savalione.com   192.168.1.200<br>CISCO-CAPWAP-CONTROLLER     savalione.com       192.168.1.200<br>CISCO-CAPWAP-CONTROLLER     localdomain         192.168.1.200</pre><h3>How to check MD5 and SHA512 checksums</h3><p>Use md5sum and sha512sum:</p><pre>md5sum AIR-CT2500-AP_BUNDLE-K9-8-5-182-0.aes AIR-CT2500-K9-2-0-0-0-FUS.aes AIR-CT2500-K9-8-5-182-0.aes<br>sha512sum AIR-CT2500-AP_BUNDLE-K9-8-5-182-0.aes AIR-CT2500-K9-2-0-0-0-FUS.aes AIR-CT2500-K9-8-5-182-0.aes</pre><p>Here is how it looks on my server:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BL5oeEq-KSgRXnIy.png" /><figcaption>Linux terminal output showing md5sum and sha512sum results for Cisco firmware files</figcaption></figure><h3>What to do if there is no console/serial output</h3><p>First of all, check the rollover cable. Use only official Cisco cables.</p><p>Also, avoid using third-party USB-to-DB9 adapters, such as this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qsc_gU97CzliIiR9.jpg" /><figcaption>A generic USB to Serial DB9 adapter</figcaption></figure><h3>Why can’t APs connect to the controller?</h3><p>This can be due to a huge version mismatch between the controller and the AP. To solve this issue, manually update the firmware on the AP.</p><p>It can also be due to certificate issues. You can try to disable the certificate check or manually update the AP’s firmware to the same version installed on the controller.</p><p>To disable the certificate check, run:</p><pre>config ap cert-expiry-ignore mic enable<br>config ap cert-expiry-ignore ssc enable<br>save config</pre><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/04/10/cisco-ct2504/"><em>https://savalione.com</em></a><em> on April 10, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e745c05586f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to migrate from Certbot to acme.sh on nginx]]></title>
            <link>https://medium.com/@savalione/certbot-acme-sh-b61114da3a7a?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61114da3a7a</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[self-hosted]]></category>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[certbot]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 00:00:10 GMT</pubDate>
            <atom:updated>2026-04-04T19:39:30.758Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QIqPv2IRh5e8h4Jyehwj-Q.png" /><figcaption>Header image for the article ‘How to migrate from Certbot to acme.sh on nginx’</figcaption></figure><p>When you need to get an SSL certificate from Let’s Encrypt on Ubuntu via the default challenge (HTTP-01), Certbot is amazing. Certbot is available in the default Ubuntu repository, and it automatically integrates with nginx and Ubuntu (via a systemd timer for automatic renewals).</p><p>But when you need to easily switch an ACME challenge provider or the HTTP-01 challenge won’t work (for example, if you have a geographically distributed website that serves content from different servers and relies on GeoDNS), Certbot may not be enough.</p><p>Reasons to consider using something other than Certbot:</p><ul><li>You use GeoDNS and want native support for different DNS providers to use the DNS-01 challenge. It can be useful if you have a distributed website that serves content from multiple servers.</li><li>You want native support for different CAs (for example, Google Trust Services).</li><li>You don’t want to use Snap or Python Package Manager (pip) just to install Certbot, and the version of Certbot in the APT repository is too old.</li><li>You want to obtain certificates as a user without root privileges.</li></ul><p>A great alternative to Certbot is <a href="https://github.com/acmesh-official/acme.sh">acme.sh</a>.</p><p>Reasons to consider using acme.sh:</p><ul><li>It’s a zero dependency shell script, so it will work on almost any distribution that has a bash terminal (it will even work on Windows with bash).</li><li>It has massive DNS API support, so you can use DNS-01 challenge to obtain certificates (<a href="https://github.com/acmesh-official/acme.sh/wiki/dnsapi">dnsapi</a>, <a href="https://github.com/acmesh-official/acme.sh/wiki/dnsapi2">dnsapi2</a>).</li><li>It has native support for many Certificate Authorities (CAs).</li><li>It’s highly portable and can be installed and run entirely by a user without root privileges.</li><li>It has a simple update process. It can update itself with a simple command (acme.sh --upgrade) or can be set to auto upgrade (for example, via crontab).</li></ul><p>In this post, we will replace Certbot with acme.sh on a simple static website hosted on an Ubuntu 24.04 LTS server with nginx.</p><h3>Analyzing Certbot behavior</h3><p>When using Certbot with nginx in automatic mode, Certbot usually does two things:</p><ol><li>Creates a redirect from the HTTP (80) port to the HTTPS (443) port.</li><li>Adds certificates and SSL settings in the main server block.</li></ol><p>Most elements added by Certbot have the # managed by Certbot comment.</p><p>Here is an example of an nginx configuration for a static site with HTTPS support that was modified by Certbot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*709Rg25njodALHJtO1M4sw.png" /><figcaption>A screenshot of an nginx configuration for a site that was modified by Certbot</figcaption></figure><p>The redirect part looks like this:</p><pre>server {<br>    if ($host = example.savalione.com) {<br>        return 301 https://$host$request_uri;<br>    } # managed by Certbot<br><br>    server_name example.savalione.com;<br><br>    listen [::]:80;<br>    listen 80;<br><br>    return 404; # managed by Certbot<br>}</pre><p>In this section, nginx listens for all incoming connections on port 80 across all IPv4 and IPv6 addresses. If the host is specified in the request, the request is forwarded to the HTTPS port.</p><p>The main part looks like this:</p><pre>server {<br>    server_name example.savalione.com;<br><br>    root /www/example.savalione.com;<br>    index index.html;<br>    charset utf-8;<br><br>    location / {<br>        try_files $uri $uri.html $uri/ =404;<br>    }<br><br>    listen [::]:443 ssl ipv6only=on; # managed by Certbot<br>    listen 443 ssl; # managed by Certbot<br>    ssl_certificate /etc/letsencrypt/live/example.savalione.com/fullchain.pem; # managed by Certbot<br>    ssl_certificate_key /etc/letsencrypt/live/example.savalione.com/privkey.pem; # managed by Certbot<br>    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot<br>    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot<br>}</pre><p>Here, nginx listens for connections, but on port 443 this time. These settings mean the following:</p><ul><li>[::]:443 - specifies port 443 on all IPv6 addresses.</li><li>443 - specifies port 443 on all IPv4 addresses.</li><li>ssl - specifies that all connections accepted on this port should work in SSL mode.</li><li>ipv6only=on - determines whether an IPv6 socket listening on a wildcard address ([::]) will accept only IPv6 connections, or both IPv6 and IPv4 connections.</li><li>include - includes specific Let&#39;s Encrypt settings provided by Certbot.</li><li>ssl_certificate, ssl_certificate_key - specify the locations of the SSL certificate and private key.</li><li>ssl_dhparam - specifies a file provided by Certbot with DH parameters for DHE ciphers.</li></ul><p>While some HTTPS parameters added by Certbot are standard and will be required by most HTTPS servers, the ones that specify certificate locations and additional CAs settings will have to be removed. These specific parameters are:</p><pre>ssl_certificate /etc/letsencrypt/live/example.savalione.com/fullchain.pem;<br>ssl_certificate_key /etc/letsencrypt/live/example.savalione.com/privkey.pem;<br>include /etc/letsencrypt/options-ssl-nginx.conf;<br>ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;</pre><p>We will remove these after installing acme.sh.</p><h3>Installing acme.sh</h3><p>The official guide provides detailed instructions on how to install acme.sh (<a href="https://github.com/acmesh-official/acme.sh/wiki/How-to-install">acme.sh — How to install</a>).</p><p>In this guide, I will be obtaining acme.sh via Git and installing it as the root user.</p><p>Clone the repository:</p><pre>git clone https://github.com/acmesh-official/acme.sh.git</pre><p>Enter the created directory:</p><pre>cd acme.sh/</pre><p>Install acme.sh (replace email with your own email address):</p><pre>./acme.sh --install -m johndoe@example.com</pre><p>Update your sources or simply relogin so the acme.sh script can be used in your bash terminal:</p><pre>source ~/.bashrc</pre><p>Cloning repository and installing acme.sh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*MraMpqtTakz5jMnAF_TRTQ.png" /><figcaption>Screenshot of a bash terminal (cloning repository and installing acme.sh)</figcaption></figure><p>Using crontab -e, you can check whether acme.sh was successfully added to your crontab for automatic renewals:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*MOYo3bi1Ndfv-3Cvwl9B0g.png" /><figcaption>Screenshot of a bash terminal (editing crontab records via nano)</figcaption></figure><p>acme.sh has been installed. The next step is issuing certificates.</p><h3>Issuing Let’s Encrypt certificates</h3><p>To issue a certificate, specify the CA server, the domain, and the location of your static files:</p><pre>acme.sh --server letsencrypt --issue -d example.com -w /www/example.com</pre><p>The SSL certificate has been issued using acme.sh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yCy6_4uzRvMNs-mmmYgYFw.png" /><figcaption>Screenshot of a bash terminal (issuing a certificate for an example domain)</figcaption></figure><p>Create a directory for storing the new certificates:</p><pre>mkdir -p /etc/nginx/ssl/example.com</pre><p>Install the certificate into the new directory and configure acme.sh to reload nginx automatically upon renewal:</p><pre>acme.sh --install-cert -d example.com --key-file /etc/nginx/ssl/example.com/key.pem --fullchain-file /etc/nginx/ssl/example.com/fullchain.pem --reloadcmd &quot;systemctl reload nginx&quot;</pre><p>The command above looks self explanatory. The certificates for the domain are now located at /etc/nginx/ssl/example.com/. It&#39;s generally better to reload nginx rather than restart it during renewals to avoid dropping active connections.</p><p>Certificates have been installed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*3YMabVKBFexjMHMvkzIp0w.png" /><figcaption>Console message about acme.sh certificates being installed</figcaption></figure><h3>Installing new certificates in nginx</h3><p>The next step is to simply remove the parameters that were automatically added by Certbot from your site’s nginx configuration.</p><p>Edit the site’s nginx settings:</p><pre>nano /etc/nginx/sites-available/example.com</pre><p>Remove these Certbot specific lines:</p><pre>ssl_certificate /etc/letsencrypt/live/example.savalione.com/fullchain.pem;<br>ssl_certificate_key /etc/letsencrypt/live/example.savalione.com/privkey.pem;<br>include /etc/letsencrypt/options-ssl-nginx.conf;<br>ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;</pre><p>Add the paths to your new acme.sh certificates (replace the paths with your own):</p><pre>ssl_certificate /etc/nginx/ssl/example.com/fullchain.pem;<br>ssl_certificate_key /etc/nginx/ssl/example.com/key.pem;</pre><p>Optionally, you can add support for the HTTP/2 protocol and remove the ipv6only=on flag:</p><pre>listen [::]:443 ssl http2;<br>listen 443 ssl http2;</pre><p>Here is how the settings may look now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*sUNlSNoQXD9vbHIvclWGGg.png" /><figcaption>New nginx settings</figcaption></figure><p>Check that the nginx configuration is valid ( nginx -t):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*6xU3K1MNGa8eTvUAMjhd0Q.png" /><figcaption>Checking the nginx configuration via ‘nginx -t’</figcaption></figure><p>If the nginx configuration is valid, restart nginx:</p><pre>systemctl restart nginx</pre><p>Now we can check the browser and see that the SSL certificate has been updated and the site works perfectly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*dtgVK1KG1ZDNNoGKOca9RQ.png" /><figcaption>Screenshot from Chrome browser about the current SSL certificate</figcaption></figure><h3>Uninstalling Certbot</h3><p>Be sure to migrate all of your websites from Certbot to acme.sh first. After that, you can safely remove Certbot, and all of your sites will continue to work seamlessly:</p><pre># For APT<br>apt remove certbot<br><br># For Snap<br>snap remove certbot<br><br># For Python package manager (pip)<br>pip3 uninstall certbot</pre><p>Additionally, you can remove all the additional files and directories that were created by Certbot:</p><pre># Remove certificates and account configurations<br>rm -rf /etc/letsencrypt<br><br># Remove renewal state data<br>rm -rf /var/lib/letsencrypt<br><br># Remove Certbot logs<br>rm -rf /var/log/letsencrypt</pre><p>Removing Certbot that was installed from an APT repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*syP5b_iNbKpwkvUbp92KmA.png" /><figcaption>Console output about certbot package being removed</figcaption></figure><p>Congratulations, you’ve successfully migrated from Certbot to acme.sh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*v58aYBjBif9fMX-uVpDCiQ.png" /><figcaption>Screenshot of an example webpage with correct SSL certificates obtained via acme.sh</figcaption></figure><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/03/05/certbot-acme-sh/"><em>https://savalione.com</em></a><em> on March 5, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61114da3a7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Host a Static Website Using nginx and Certbot on Ubuntu]]></title>
            <link>https://medium.com/@savalione/static-nginx-56ffbe16757a?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/56ffbe16757a</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[certbot]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[self-hosted]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Mon, 16 Feb 2026 00:00:42 GMT</pubDate>
            <atom:updated>2026-03-05T12:31:31.159Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="Header image for the article ‘How to Host a Static Website Using nginx and Certbot on Ubuntu’" src="https://cdn-images-1.medium.com/max/1024/0*kj5vsHYaB18eSGz4.png" /></figure><p>Static websites are amazing. They don’t require a sophisticated runtime environment, the whole setup process is easy, and they can be easily horizontally scaled. Thanks to modern Linux distributions, efficient web servers, and hosting providers, it’s very easy to set up a virtual machine and host a static site.</p><p>In this post, I’ll show a simple, modern, and secure way to host a static website using nginx, Certbot, UFW (Uncomplicated Firewall), and Ubuntu.</p><p>I will use example.savalione.com as the example domain for this post.</p><h3>Setting up DNS</h3><p>This guide assumes you already have a virtual machine (VPS, cloud instance, etc.) and a domain name.</p><p>First, log in to your hosting provider’s dashboard and find the network settings for your virtual machine. You need to find the public IPv4 and IPv6 addresses (IPv6 is optional but highly recommended).</p><p>Here is an example of the network settings for a virtual machine (Droplet) on DigitalOcean:</p><figure><img alt="DigitalOcean droplet network settings showing IPv4 and IPv6 addresses" src="https://cdn-images-1.medium.com/max/1024/1*1TpwcWO_tubl6x8pU65YBQ.png" /></figure><p>In the screenshot above:</p><ul><li>144.126.221.211 - is the public IPv4 address.</li><li>2604:a880:4:1d0:0:1:e14f:0 - is the public IPv6 address.</li></ul><p>After obtaining the public IPs, you need to create DNS records for your domain:</p><ul><li>Type A - point to the virtual machine&#39;s public IPv4 address.</li><li>Type AAAA - point to the virtual machine&#39;s public IPv6 address.</li></ul><p>Example of adding a AAAA DNS record for a domain:</p><figure><img alt="DNS GCore configuration interface adding an AAAA record" src="https://cdn-images-1.medium.com/max/697/1*hRIqOQn-snGz1xMB1RON4A.png" /></figure><h3>Setting up the virtual machine</h3><p>Login to your server via SSH. You’ll see something like this:</p><figure><img alt="Terminal window showing initial SSH login to an Ubuntu server" src="https://cdn-images-1.medium.com/max/646/1*8gvMoeIk8gFX0BsAnbeVFw.png" /></figure><p>It is generally advised to update all packages before starting:</p><pre>apt update<br>apt upgrade</pre><p>After updating, install nginx and the additional required packages:</p><pre>apt install nginx python3-certbot-nginx ufw</pre><figure><img alt="Terminal output showing installation of nginx, python3-certbot-nginx, and ufw" src="https://cdn-images-1.medium.com/max/1024/1*xqJxLVZz5tjWgbd8uxaG-w.png" /></figure><p>In order for users to connect to your site, you need to open the HTTP and HTTPS ports. Using the Uncomplicated Firewall (UFW), this is very easy.</p><p>Open ports 80 (HTTP) and 443 (HTTPS):</p><ol><li>ufw allow 80</li><li>ufw allow 443</li></ol><p>Don’t forget to open the port for SSH connections (usually port 22), otherwise you might lock yourself out:</p><pre>ufw allow 22</pre><p>Enable the firewall:</p><pre>ufw enable</pre><p>You can check the firewall status and open ports using ufw status verbose:</p><figure><img alt="Output of ‘ufw status verbose’ showing the firewall open ports and status" src="https://cdn-images-1.medium.com/max/838/1*Y7op1X5Sm8lSwQ_-2YHigw.png" /></figure><h3>Choose a directory for the static site</h3><p>You need to choose a directory where your static site files will be located. In this post, I’ll be using /www/example.savalione.com:</p><ol><li>mkdir /www</li><li>mkdir /www/example.savalione.com</li></ol><p>Upload or clone your static site content into this created directory.</p><h3>Set up the nginx default server (optional)</h3><p>Optionally, you can create a default server. This is the page people will see if they try to access your server via its IP address directly, rather than the domain name.</p><p>Create a directory for the default content:</p><pre>mkdir /www/default</pre><p>Create a simple index.html file ( nano /www/default/index.html). You can use your imagination to create a neat design. I usually use something simple like this:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;title&gt;Welcome to example.com!&lt;/title&gt;<br>        &lt;style&gt;<br>            body {<br>                width: 35em;<br>                margin: 0 auto;<br>                font-family: Tahoma, Verdana, Arial, sans-serif;<br>            }<br>        &lt;/style&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;h1&gt;Welcome to example.com!&lt;/h1&gt;<br>        &lt;p&gt;This is example.com server. Check example.com for more information.&lt;/p&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p>Next, modify the nginx default site configuration file:</p><pre>nano /etc/nginx/sites-available/default</pre><p>I usually configure the default server like this:</p><pre># default server<br>server {<br>    listen 80 default_server;<br>    listen [::]:80 default_server;<br><br>    root /www/default;<br>    index index.html;<br><br>    server_name _;<br><br>    location / {<br>        try_files $uri $uri/ =404;<br>    }<br>}</pre><p>Where:</p><ul><li>default_server, _ - specifies the catch-all server for requests that don&#39;t match other domains.</li><li>80, [::]:80 - listen on IPv4 and IPv6 ports.</li><li>/www/default - the directory where the static site files are stored.</li></ul><p>This is how the configuration file looks in the editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*TdPXEukllYmtZQRamsM75Q.png" /></figure><p>Check the nginx configuration:</p><pre>nginx -t</pre><p>If everything is fine, restart nginx:</p><pre>systemctl restart nginx</pre><p>Now, if you connect to the server via its IP address, you will see the default page:</p><figure><img alt="Accessing the default server via Chrome and IPv4 address" src="https://cdn-images-1.medium.com/max/862/1*M3_Mx8mBI8DqTyWhB0NiHg.png" /></figure><h3>Setup the nginx static website configuration</h3><p>Now, let’s set up the actual website. Create a configuration file for your domain:</p><pre>nano /etc/nginx/sites-available/example.savalione.com</pre><p>Add the following configuration:</p><pre>server {<br>    server_name example.savalione.com;<br><br>    listen [::]:80;<br>    listen 80;<br><br>    root /www/example.savalione.com;<br>    index index.html;<br>    charset utf-8;<br><br>    location / {<br>        try_files $uri $uri.html $uri/ =404;<br>    }<br>}</pre><p>Here is how the configuration file looks:</p><figure><img alt="Editing the specific nginx configuration for example.savalione.com" src="https://cdn-images-1.medium.com/max/838/1*pK6hGI_RmqRnN8HP4VdOkA.png" /></figure><p>Enable the site by creating a symbolic link to the sites-enabled directory:</p><pre>ln -s /etc/nginx/sites-available/example.savalione.com /etc/nginx/sites-enabled/</pre><p>Check the nginx configuration:</p><pre>nginx -t</pre><p>If everything is fine, restart nginx:</p><pre>systemctl restart nginx</pre><p>You should now be able to access your static website via HTTP.</p><h3>Obtain SSL certificates</h3><p>In this step, SSL certificates will be obtained so the website is modern and secure. We will use Certbot to obtain free certificates from Let’s Encrypt.</p><p>Run Certbot with the nginx plugin:</p><pre>certbot --nginx -d example.savalione.com</pre><p>Certbot will ask for your email and agreement to the Terms of Service:</p><figure><img alt="Certbot prompt asking for email and Terms of Service agreement" src="https://cdn-images-1.medium.com/max/838/1*3QSqrKgNUYRIaHqctw71cA.png" /></figure><p>If successful, you will see a message confirming the certificate deployment:</p><figure><img alt="Certbot success message confirming certificates were obtained" src="https://cdn-images-1.medium.com/max/838/1*iCdnlIjpd8IcIgG9i36VqA.png" /></figure><p>Certbot will automatically modify your nginx configuration to enable SSL and redirect HTTP traffic to HTTPS. You can verify the changes by opening the config file again:</p><figure><img alt="Nginx configuration file showing modifications made by Certbot for SSL" src="https://cdn-images-1.medium.com/max/838/1*WAcF_MzrHk53PGHn8EdUGg.png" /></figure><p>Before restarting nginx, check the configuration again:</p><pre>nginx -t</pre><p>Restart nginx:</p><pre>systemctl restart nginx</pre><p>Now you can access your static website via HTTPS:</p><figure><img alt="Final result showing the secured website in a Chrome browser" src="https://cdn-images-1.medium.com/max/857/1*kKZi3fSRWOd5cDhH7aqq9w.png" /></figure><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/02/16/static-nginx/"><em>https://savalione.com</em></a><em> on February 16, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56ffbe16757a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Easy Static Site Development Using Containers]]></title>
            <link>https://medium.com/@savalione/easy-jekyll-incus-76a4da2b552d?source=rss-3cd5781f143e------2</link>
            <guid isPermaLink="false">https://medium.com/p/76a4da2b552d</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[incu]]></category>
            <category><![CDATA[static-site-generator]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[jekyll]]></category>
            <dc:creator><![CDATA[Savelii Pototskii]]></dc:creator>
            <pubDate>Fri, 23 Jan 2026 00:00:11 GMT</pubDate>
            <atom:updated>2026-02-20T09:06:04.329Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="Header image for the article ‘Easy Static Site Development Using Containers’" src="https://cdn-images-1.medium.com/max/1024/0*lFHwYrb6p3gKkZ0_.png" /></figure><p>I love static site generators like Jekyll because all posts and assets can be stored in a single Git repository. From time to time I find myself needing to publish a new post or to change the way the content is generated (for example to change the appearance). For short modifications, a bash terminal and nano are perfect, because I can simply connect to the server via ssh, apply changes, and push them to the repository. However, when I write more than a single line of text, I prefer a modern text editor with full spellcheck support and Markdown preview capabilities.</p><p>There are countless ways to connect to a container and setup your favorite text editor, but I usually use only two approaches:</p><ol><li>Set up a local samba server. It’s great when you need to access a server in a local network. If your text editor is Visual Studio Code, this way you will be able to use already installed version. Also, a shared directory will behave almost exactly like a directory on your computer.</li><li>Set up Visual Studio Code in the browser and connect to it through the internet. It’s great when I need to connect to a container through the internet. This way all settings will be stored inside the container so you’ll be able to continue your work no matter where you are.</li></ol><p>Many parts of this post can be skipped (for example if you already have a working container or VPS). The post is structured in the following way:</p><ol><li>Creating and setting up an incus container. You don’t have to do it. You can just use an existing VPS or server.</li><li>Installing Jekyll and common tools. You can install an SSG of your choice.</li><li>Setting up a Samba server (if you need a local access).</li><li>Setting up Visual Studio Code in the browser (if you want to have an access through a web browser).</li><li>Setting up Git.</li><li>Setting up GitHub.</li><li>Developing a static website.</li></ol><h3>Used names and IPs</h3><p>In this post I’ll use the following names and IP addresses. You should substitute these with your own values where appropriate.</p><ul><li>ubuntu/24.04 - the Incus container image.</li><li>incus-jekyll - the name of the created Incus container.</li><li>192.168.205.50/24 - the static IP address assigned to the Incus container.</li><li>192.168.205.1 - the gateway for the container&#39;s network (this will almost certainly be different in your setup).</li><li>username - the name of created user.</li></ul><p>Versions:</p><ul><li>Ubuntu LTS 24.04 — host and agent operating system.</li><li>Incus version 6.0.0.</li></ul><h3>Creating an Incus container</h3><p>Even though you could install an interpreter (Ruby for example) and static site generator on your main server, I wouldn’t recommend doing so. Doing so will increase complexity of your server, you’ll have to think about more things and you won’t be able to easily delete all packages related to an SSG.</p><p>It doesn’t matter what containerization system you use (Docker, Podman, FreeBSD jails, etc.). I just prefer Incus because it’s easier and faster to set up and it doesn’t have a proprietary nature as Canonical LXD.</p><p>Create an Incus container:</p><pre>incus launch images:ubuntu/24.04 incus-jekyll</pre><p>By incus list you can see the list of all containers and virtual machines, including the newly created container (if there weren&#39;t any issues creating it):</p><figure><img alt="‘incus list’ output showing all containers and virtual machines in Incus" src="https://cdn-images-1.medium.com/max/766/1*2olrkLZYmnhEQIrEXJvlCw.png" /></figure><h3>Setting up the created container</h3><p>After creating a container, I update all packages and install common tools I often use:</p><pre>apt update<br>apt upgrade<br>apt install nano</pre><p>Right now the container has 192.168.205.100 IP assigned by my DHCP server located at 192.168.205.1. I would like to change the IP to static so in the future it won&#39;t change. To do so:</p><p>Enter a bash shell in the container:</p><pre>incus exec incus-jekyll -- bash</pre><p>Set up the network interface by editing /etc/netplan/10-lxc.yaml. Right now it looks like this:</p><pre>network:<br>  version: 2<br>  ethernets:<br>    eth0:<br>      dhcp4: true<br>      dhcp-identifier: mac</pre><p>Change it to this:</p><pre>network:<br>  version: 2<br>  ethernets:<br>    eth0:<br>      dhcp4: false<br>      dhcp6: false<br>      dhcp-identifier: mac<br>      addresses:<br>        - 192.168.205.50/24<br>      nameservers:<br>        addresses:<br>          - 192.168.205.1<br>      routes:<br>        - to: default<br>          via: 192.168.205.1</pre><p>The new settings are configured as follows:</p><figure><img alt="New settings in the ‘/etc/netplan/10-lxc.yaml’" src="https://cdn-images-1.medium.com/max/510/1*r0LN_JKrTDE6mQp-k58zZg.png" /></figure><p>Apply the new Netplan settings:</p><pre>netplan apply</pre><p>Now you can exit the container. By using incus list we can see that the ip has been updated:</p><figure><img alt="Network settings of the incus container were updated" src="https://cdn-images-1.medium.com/max/759/1*fuxraP5ZT8wOBpJMWzCTNA.png" /></figure><h3>Installing Jekyll and common tools</h3><p>If you use Incus, enter the instance:</p><pre>incus exec incus-jekyll -- bash</pre><p>Inside the instance install common tools (optional):</p><pre>apt install wget curl git</pre><p>Install the Ruby interpreter that Jekyll relies on:</p><pre>apt install ruby-full build-essential zlib1g-dev</pre><p>By default you connect to an instance as the root user, so it&#39;s better to create a new one and give sudo access:</p><pre>adduser username<br>usermod -aG sudo username</pre><p>Login as the new user:</p><pre>su username</pre><p>Add the following to ~/.bashrc or ~/.zshrc:</p><pre># Install Ruby Gems to ~/gems<br>export GEM_HOME=&quot;$HOME/gems&quot;<br>export PATH=&quot;$HOME/gems/bin:$PATH&quot;</pre><p>Update bash rc file:</p><pre># For Bash<br>source ~/.bashrc<br><br># For Zsh<br>source ~/.zshrc</pre><p>Finally install Jekyll:</p><pre>gem install jekyll bundler</pre><p>Right now you should be able to compile a simple Jekyll static website as the username user. You also can develop your website via the terminal and, for example, nano.</p><h3>Setting up Samba</h3><p>I like this method because it allows me to develop an SSG site without too much hassle with Git credentials, keys, GitHub SSH key, etc.</p><p>Enter the instance. In case of Incus:</p><pre>incus exec incus-jekyll -- bash</pre><p>Optionally you can create a directory so your Samba share doesn’t point to ~/ and everything looks clean:</p><pre>mkdir ~/git</pre><p>Install Samba server:</p><pre>apt install samba</pre><p>Samba settings are located here: /etc/samba/smb.conf I usually delete it and replace with something like this:</p><pre>[global]<br>    workgroup = WORKGROUP<br>    server string = %h server<br>    netbios name = jekyll.net.savalione.com<br>    dns proxy = no<br>    log file = /var/log/samba/log.%m<br>    max log size = 1000<br>    passdb backend = tdbsam<br>    unix password sync = yes<br>    passwd program = /usr/bin/passwd %u<br>    pam password change = yes<br>    map to guest = bad user<br>    usershare allow guests = no<br>    # protocol<br>    server min protocol = SMB2<br>    client max protocol = SMB3<br>    client min protocol = SMB2<br>    # sharing<br>    browseable = yes<br>    # default mask<br>    create mask = 0664<br>    directory mask = 0775<br>    # Printers<br>    printing = cups<br>    printcap name = cups</pre><p>Then add a new share:</p><pre>[jekyll]<br>    path = /home/username/git<br>    browsable = yes<br>    writable = yes<br>    guest ok = no<br>    create mask = 0664<br>    directory mask = 0775<br>    read only = no<br>    valid users = username</pre><p>The part of Samba configuration file with a new share may look like this now:</p><figure><img alt="A new Samba share" src="https://cdn-images-1.medium.com/max/263/1*qmFkB4JwZxdHUyF3Dy3bJw.png" /></figure><p>Set up the password for a new user:</p><pre>smbpasswd -a username</pre><p>Reload Samba:</p><pre>systemctl restart smbd nmbd</pre><p>Now you should be able to access the created Samba share. When you try to do it via Windows you’ll be asked to provide network credentials:</p><figure><img alt="Windows 11 asking for Samba server network credentials" src="https://cdn-images-1.medium.com/max/460/1*LFkMRdFGKB256YmW6bSWhw.png" /></figure><p>Your username and password were set by Samba configuration file and the smbpasswd command.</p><p>Here is how the new share looks like in the Windows Explorer:</p><figure><img alt="Windows 11 Explorer connected to the new Samba share" src="https://cdn-images-1.medium.com/max/974/1*ITc3UiUmBMF21O1e5fp0IQ.png" /></figure><h3>Setting up Visual Studio Code in the browser</h3><p>If you use Incus, enter the instance:</p><pre>incus exec incus-jekyll -- bash</pre><p>Coder provides a simple sh script for installing code-server (VS Code in the browser):</p><pre>curl -fsSL https://code-server.dev/install.sh | sh</pre><p>code-server is being installed:</p><figure><img alt="VS Code in the browser (code-server) is being installed, image of the bash terminal" src="https://cdn-images-1.medium.com/max/646/1*VW5sMyqdcwtxXrICCubuwQ.png" /></figure><p>To start a background code-server service run:</p><pre>code-server</pre><p>Shortly after the successful initialization of code-server, close it and edit settings. Settings are located here: ~/.config/code-server/config.yaml. To have a local network access, edit the file:</p><ul><li>IP: 192.168.205.50</li><li>Port: 8080</li></ul><figure><img alt="code-server settings" src="https://cdn-images-1.medium.com/max/478/1*ytJQq0I5l4A0JUVxf0T5dA.png" /></figure><p>Make sure to record the password. In my case the password is: f428c8309cad1ec6fd33f6a9.</p><p>To start code-server immediately and run on boot via systemd:</p><pre>systemctl enable --now code-server@$USER</pre><p>Access 192.168.205.50:8080, enter the password:</p><figure><img alt="code-server requires password" src="https://cdn-images-1.medium.com/max/654/1*9UlfH2SoScziMFhb2hVIGA.png" /></figure><p>Now you should be able to use VS Code in the browser (code-server). You can set it up almost as a regular VS Code desktop application.</p><h3>Setting up Git</h3><p>I set up the following Git settings:</p><pre>git config --global user.name &quot;John Doe&quot;<br>git config --global user.email johndoe@example.com<br>git config --global core.editor nano<br>git config --global init.defaultBranch main</pre><p>To check current Git settings use git config --list:</p><figure><img alt="Git current settings" src="https://cdn-images-1.medium.com/max/356/1*KkCGmbEVBZ-2tYoZinvsLw.png" /></figure><h3>Setting up GitHub</h3><p>To push changes and work with private GitHub repositories, you need to generate a SSH key and add it to GitHub.</p><p>Generate key:</p><pre>ssh-keygen -t ed25519 -C &quot;johndoe@example.com&quot;<br><br># The public key is generated at: ~/.ssh/id_ed25519.pub</pre><p>You need to add it to your GitHub account:</p><ul><li>github.com -&gt; Settings -&gt; SSH and GPG keys -&gt; New SSH Key</li><li>Title: any</li><li>Key type: Authentication key</li><li>Key: content of ~/.ssh/id_ed25519.pub</li></ul><p>The GitHub form looks like this:</p><figure><img alt="GitHub adding a new SSH key" src="https://cdn-images-1.medium.com/max/962/1*mZ4B3liAp_vmm1WVB26OnQ.png" /></figure><p>Press Add SSH key, complete 2-FA authentication and your key should be added to your account:</p><figure><img alt="GitHub a new SSH key has been added" src="https://cdn-images-1.medium.com/max/546/1*40OErZVGx3dhXbdXUKNZew.png" /></figure><h3>Develop your static website</h3><p>You are now ready to work on your static site.</p><p>For example, here is the way you can work with the source code of my blog.</p><p>Clone the repository:</p><pre>git clone git@github.com:SavaLione/savalione.com.git</pre><p>Change directory:</p><pre>cd savalione.com</pre><p>Install Ruby and Jekyll dependencies:</p><pre>bundle install</pre><p>To run the blog, create a local server accessible via local network:</p><pre>bundle exec jekyll server -H 0.0.0.0</pre><p>To build the production version:</p><pre>bundle exec jekyll build</pre><p>Local server with the generated website:</p><figure><img alt="Static Jekyll website savalione.com accessible through local network" src="https://cdn-images-1.medium.com/max/672/1*CdiBFiAqQRzO7vLUJtChNg.png" /></figure><h3>Note: Opening ports in local network</h3><p>If your virtual machine, container or server is behind a firewall you may need to open ports. It’s strongly inadvisable to open Samba and code-server ports so they’re accessible via the Internet. For a local network this should be fine.</p><p>Ports:</p><ul><li>Samba: 137, 138, 139, 445</li><li>code-server: 8080 (depends on the configuration file)</li></ul><p><em>Originally published at </em><a href="https://savalione.com/posts/2026/01/23/easy-jekyll-incus/"><em>https://savalione.com</em></a><em> on January 23, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76a4da2b552d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>