<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tshenolo Mos</title>
    <description>The latest articles on DEV Community by Tshenolo Mos (@tshenolo).</description>
    <link>https://dev.to/tshenolo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F450241%2Fb4a51dd2-d267-4604-ba31-d57c9efcf102.jpeg</url>
      <title>DEV Community: Tshenolo Mos</title>
      <link>https://dev.to/tshenolo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tshenolo"/>
    <language>en</language>
    <item>
      <title>Secure Apache with SSL in Docker</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Thu, 06 Nov 2025 21:49:27 +0000</pubDate>
      <link>https://dev.to/tshenolo/secure-apache-with-ssl-in-docker-8k3</link>
      <guid>https://dev.to/tshenolo/secure-apache-with-ssl-in-docker-8k3</guid>
      <description>&lt;p&gt;This guide will walk you through setting up an Apache server with PHP support within a Docker container, secured with an SSL certificate for local development purposes. We’ll ensure that the server can be accessed securely via &lt;a href="https://localhost" rel="noopener noreferrer"&gt;https://localhost&lt;/a&gt; using a self-signed SSL certificate. If you’re eager to jump straight into the code, you can locate the complete project on GitHub. Feel free to access it at &lt;a href="https://github.com/tshenolo/docker-Secure-Apache" rel="noopener noreferrer"&gt;https://github.com/tshenolo/docker-Secure-Apache&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;Step 1: Preparing SSL Certificates&lt;/li&gt;
&lt;li&gt;Step 2: Creating the Dockerfile&lt;/li&gt;
&lt;li&gt;Step 3: Configuring Apache for SSL&lt;/li&gt;
&lt;li&gt;Step 4: Building and Running the Docker Container&lt;/li&gt;
&lt;li&gt;Step 5: Accessing Your Secure Apache Server&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Deploying your web applications in a development environment that closely mirrors your production setup is crucial. This guide focuses on configuring an Apache server with SSL in Docker, providing a secure, isolated environment for development.&lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="https://www.youtube.com/@tshenolo" rel="noopener noreferrer"&gt;Youtube Channel&lt;/a&gt; where I post all kinds of content accompanying my posts, including this video showing everything in this post.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/8A7bO7MDG9Y"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker installed on your machine.&lt;/li&gt;
&lt;li&gt;Basic knowledge of Docker, Apache, and SSL certificates.&lt;/li&gt;
&lt;li&gt;OpenSSL for generating a self-signed certificate (if not already installed).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Preparing SSL Certificates
&lt;/h2&gt;

&lt;p&gt;Before setting up the Docker container, you’ll need to generate a self-signed SSL certificate for localhost. Open a terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;openssl req &lt;span class="nt"&gt;-x509&lt;/span&gt; &lt;span class="nt"&gt;-nodes&lt;/span&gt; &lt;span class="nt"&gt;-days&lt;/span&gt; 365 &lt;span class="nt"&gt;-newkey&lt;/span&gt; rsa:2048 &lt;span class="nt"&gt;-keyout&lt;/span&gt; localhost.key &lt;span class="nt"&gt;-out&lt;/span&gt; localhost.crt &lt;span class="nt"&gt;-subj&lt;/span&gt; &lt;span class="s2"&gt;"/C=US/ST=YourState/L=YourCity/O=YourOrganization/CN=localhost"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command generates a new SSL certificate (localhost.crt) and a private key (localhost.key), valid for 365 days.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Creating the Dockerfile
&lt;/h2&gt;

&lt;p&gt;Create a Dockerfile in your project directory with the following contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use an official PHP image with Apache&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; php:7.4-apache&lt;/span&gt;

&lt;span class="c"&gt;# Install Vim (optional)&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; vim &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /var/lib/apt/lists/&lt;span class="k"&gt;*&lt;/span&gt;

&lt;span class="c"&gt;# Copy SSL certificate and key&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; localhost.crt /etc/ssl/certs/localhost.crt&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; localhost.key /etc/ssl/private/localhost.key&lt;/span&gt;

&lt;span class="c"&gt;# Copy the custom Apache virtual host config&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; ./my-httpd-vhosts.conf /etc/apache2/sites-available/my-ssl.conf&lt;/span&gt;

&lt;span class="c"&gt;# Enable SSL module, configure Apache for PHP support, and enable our SSL site configuration&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;a2enmod ssl &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    a2enmod rewrite &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    a2dissite 000-default default-ssl &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    a2ensite my-ssl

&lt;span class="c"&gt;# Copy your PHP application into the default Apache document root&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; ./public-html/ /var/www/html/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Configuring Apache for SSL
&lt;/h2&gt;

&lt;p&gt;Create a file named my-httpd-vhosts.conf in your project directory with the following Apache virtual host configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&amp;lt;VirtualHost &lt;span class="k"&gt;*&lt;/span&gt;:443&amp;gt;
    DocumentRoot &lt;span class="s2"&gt;"/var/www/html"&lt;/span&gt;
    ServerName localhost

    SSLEngine on
    SSLCertificateFile &lt;span class="s2"&gt;"/etc/ssl/certs/localhost.crt"&lt;/span&gt;
    SSLCertificateKeyFile &lt;span class="s2"&gt;"/etc/ssl/private/localhost.key"&lt;/span&gt;

    &lt;span class="c"&gt;# Other directives here&lt;/span&gt;
&amp;lt;/VirtualHost&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Building and Running the Docker Container
&lt;/h2&gt;

&lt;p&gt;With the Dockerfile and SSL configuration in place, build your Docker image:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; apache-php-ssl &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, run your container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 443:443 apache-php-ssl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command starts a container from your image, mapping port 443 inside the container to port 443 on your host machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Accessing Your Secure Apache Server
&lt;/h2&gt;

&lt;p&gt;Open a web browser and navigate to &lt;a href="https://localhost" rel="noopener noreferrer"&gt;https://localhost&lt;/a&gt;. You should see your PHP application running securely under HTTPS. Since the certificate is self-signed, your browser may warn you about the site’s security certificate. You can proceed by allowing an exception for this certificate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You’ve successfully set up an Apache server with SSL inside a Docker container, making your local development environment secure and more aligned with production settings. This setup ensures that your development practices include necessary security measures right from the start.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post. If you found the post helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;p&gt;🐦 Follow me on &lt;a href="https://x.com/tshenolo" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;br&gt;
📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt;&lt;br&gt;
Your support and engagement means a lot to me as an open-source developer.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>apache</category>
      <category>ssl</category>
      <category>localhost</category>
    </item>
    <item>
      <title>Guide to Creating an SFTP Server with Docker (using SSH keys)</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Fri, 31 Oct 2025 02:36:25 +0000</pubDate>
      <link>https://dev.to/tshenolo/guide-to-creating-an-sftp-server-with-docker-using-ssh-keys-1ij6</link>
      <guid>https://dev.to/tshenolo/guide-to-creating-an-sftp-server-with-docker-using-ssh-keys-1ij6</guid>
      <description>&lt;p&gt;This guide will show you how to make a Docker image step by step that works as an SFTP server. By the time we wrap up, you’ll have a simple but secure SFTP server up and running in a Docker container. If you’re keen on getting your hands dirty or just want to dive right into the code, you can find the full project on GitHub. Go ahead and grab it from &lt;a href="https://github.com/tshenolo/docker-sftp-server-with-sshkey" rel="noopener noreferrer"&gt;tshenolo/docker-sftp-server-with-sshkey&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;SSH Key Configuration&lt;/li&gt;
&lt;li&gt;Set Up the Docker File&lt;/li&gt;
&lt;li&gt;Build Your Docker Image&lt;/li&gt;
&lt;li&gt;Running the Docker Container&lt;/li&gt;
&lt;li&gt;Verifying the Container’s Status&lt;/li&gt;
&lt;li&gt;Connecting to the SFTP Server&lt;/li&gt;
&lt;li&gt;Using the SFTP Server&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;An SFTP server provides a secure way to transfer files between computers over an encrypted SSH transport. Docker allows you to package an SFTP server with all its dependencies into a standardized unit for software development, ensuring easy deployment and scalability.&lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="https://www.youtube.com/@tshenolo" rel="noopener noreferrer"&gt;Youtube Channel&lt;/a&gt; where I post all kinds of content accompanying my posts, including this video showing everything in this post.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/YWaSJ3fiQhE"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker installed on your machine.&lt;/li&gt;
&lt;li&gt;Basic understanding of Docker and SFTP.&lt;/li&gt;
&lt;li&gt;Git is also required to clone the repository.&lt;/li&gt;
&lt;li&gt;Basic knowledge of command-line operations is assumed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SSH Key Configuration
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Generate SSH Key
&lt;/h2&gt;

&lt;p&gt;If you do not already have an SSH key pair, you can generate one using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; rsa &lt;span class="nt"&gt;-b&lt;/span&gt; 4096 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"your_email@example.com"&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.ssh/id_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Set Permissions
&lt;/h2&gt;

&lt;p&gt;Ensure your private key (~/.ssh/id_rsa) is kept secure with the appropriate permissions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.ssh/docker_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Ensure your SSH key is loaded and available
&lt;/h2&gt;

&lt;p&gt;Make sure the SSH key you’ve generated and added to GitHub is loaded into your SSH agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;ssh-agent &lt;span class="nt"&gt;-s&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you haven’t already, you can load your SSH key into the SSH agent by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-add ~/.ssh/docker_rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Set Up the Docker File
&lt;/h2&gt;

&lt;p&gt;There are two approaches to setting up your Docker environment: either by creating a new Dockerfile from scratch or by cloning an existing GitHub repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Create the Dockerfile
&lt;/h2&gt;

&lt;p&gt;To create your Dockerfile manually, proceed with the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initiate a Dockerfile: In your preferred directory, open a new file named Dockerfile.&lt;/li&gt;
&lt;li&gt;Insert the Dockerfile Content: Populate your Dockerfile with the following configuration:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use Ubuntu latest as the base image&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; ubuntu:latest&lt;/span&gt;

&lt;span class="c"&gt;# Avoid prompts from apt&lt;/span&gt;
&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; DEBIAN_FRONTEND=noninteractive&lt;/span&gt;

&lt;span class="c"&gt;# Update packages and install OpenSSH Server and vim&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; openssh-server vim &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /var/lib/apt/lists/&lt;span class="k"&gt;*&lt;/span&gt;

&lt;span class="c"&gt;# Set up user for SFTP with no shell login&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; /home/sftpuser &lt;span class="nt"&gt;-s&lt;/span&gt; /usr/sbin/nologin sftpuser &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /home/sftpuser/.ssh &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chown &lt;/span&gt;sftpuser:sftpuser /home/sftpuser/.ssh &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chmod &lt;/span&gt;700 /home/sftpuser/.ssh

&lt;span class="c"&gt;# Copy the public key&lt;/span&gt;
&lt;span class="c"&gt;# Ensure you replace 'docker_rsa.pub' with your actual public key file name&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; docker_rsa.pub /home/sftpuser/.ssh/authorized_keys&lt;/span&gt;

&lt;span class="c"&gt;# Set permissions for the public key&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 /home/sftpuser/.ssh/authorized_keys &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chown &lt;/span&gt;sftpuser:sftpuser /home/sftpuser/.ssh/authorized_keys

&lt;span class="c"&gt;# Create a directory for SFTP that the user will have access to&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /home/sftpuser/sftp/upload &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chown &lt;/span&gt;root:root /home/sftpuser /home/sftpuser/sftp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chmod &lt;/span&gt;755 /home/sftpuser /home/sftpuser/sftp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chown &lt;/span&gt;sftpuser:sftpuser /home/sftpuser/sftp/upload &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;chmod &lt;/span&gt;755 /home/sftpuser/sftp/upload

&lt;span class="c"&gt;# Configure SSH for SFTP&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /run/sshd &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Match User sftpuser"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    ChrootDirectory /home/sftpuser/sftp"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    ForceCommand internal-sftp"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    PasswordAuthentication no"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    PubkeyAuthentication yes"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    PermitTunnel no"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    AllowAgentForwarding no"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    AllowTcpForwarding no"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"    X11Forwarding no"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/ssh/sshd_config

&lt;span class="c"&gt;# Expose the SSH port&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 22&lt;/span&gt;

&lt;span class="c"&gt;# Run SSHD on container start&lt;/span&gt;
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["/usr/sbin/sshd", "-D", "-e"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Option 2: Clone the Repository
&lt;/h2&gt;

&lt;p&gt;If you prefer to work with an existing setup clone the GitHub Repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/tshenolo/docker-sftp-server-with-sshkey.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change your current working directory to the newly cloned repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;docker-sftp-server-with-sshkey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To ensure SSH key-based authentication for your SFTP server, place your SSH public key into the working directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.ssh/docker_rsa.pub &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build Your Docker Image
&lt;/h2&gt;

&lt;p&gt;To build your Docker image, run the following command in the directory containing the Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; your_sftp_server &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running the Docker Container
&lt;/h2&gt;

&lt;p&gt;To run your SFTP server container without data persistence, you might use a command like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; my_sftp_container &lt;span class="nt"&gt;-p&lt;/span&gt; 2222:22 your_sftp_server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To ensure that uploaded files are not lost when the container stops or is removed, you should persist data by mapping a directory from your host machine to a directory inside the container&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; /local/sftp/upload:/home/your_user/sftp/upload &lt;span class="nt"&gt;--name&lt;/span&gt; my_sftp_container &lt;span class="nt"&gt;-p&lt;/span&gt; 22:22 your_sftp_server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Verifying the Container’s Status
&lt;/h2&gt;

&lt;p&gt;Check if the container is running with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View logs with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker logs my_sftp_container
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Connecting to the SFTP Server
&lt;/h2&gt;

&lt;p&gt;Connect to your SFTP server using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sftp &lt;span class="nt"&gt;-oPort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2222 sftpuser@0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using the SFTP Server
&lt;/h2&gt;

&lt;p&gt;Basic SFTP commands like ls (list files), put (upload files), get (download files), and rm (remove files)&lt;/p&gt;

&lt;p&gt;Listing Files with ls&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; /path/to/directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Uploading Files with put&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;put example.txt /remote/directory/example.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Downloading Files with get&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;get example.txt /local/directory/example.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Removing Files with rm&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm example.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You’ve got a simple, safe SFTP server up and running in a Docker container now. This gets you started on the right foot for secure file transfers. But if you’re gearing up for realworld use, you’ll want to tweak and toughen things up more to fit your unique requirements and shield against possible security holes. Docker makes it a breeze to expand your SFTP server and keep it under control when it’s just one piece of a bigger app puzzle.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post. If you found the project helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;p&gt;Star the GitHub Repository: If you haven’t already, please consider starring the &lt;a href="https://github.com/tshenolo/docker-sftp-server" rel="noopener noreferrer"&gt;Docker SFTP Server&lt;/a&gt; repository on GitHub. Your stars help us gain visibility and recognition in the open-source community.&lt;/p&gt;

&lt;p&gt;🐦 Follow me on &lt;a href="https://twitter.com/tshenolo" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;br&gt;
📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your support and engagement means a lot to me as an open-source developer.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>sftp</category>
      <category>ssh</category>
    </item>
    <item>
      <title>Detect Linux Server Intrusions</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Fri, 24 Oct 2025 17:56:47 +0000</pubDate>
      <link>https://dev.to/tshenolo/detect-linux-server-intrusions-4f3f</link>
      <guid>https://dev.to/tshenolo/detect-linux-server-intrusions-4f3f</guid>
      <description>&lt;p&gt;If someone breached your server right now, would you even know? The faster you detect an intrusion, the faster you can stop it. In this post, we will walk through simple steps you can take to check for signs of unauthorized access and take immediate action - all within 60 seconds.&lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="https://www.youtube.com/@tshenolo" rel="noopener noreferrer"&gt;Youtube Channel&lt;/a&gt; where I post all kinds of content accompanying my posts, including this video showing everything in this post.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/zfuV2NKSSu8"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: See Who’s Logged In
&lt;/h2&gt;

&lt;p&gt;Run the following command to check who is currently logged in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;who&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should only see authorized users. If you spot a suspicious login, it might be time to investigate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Check Running Processes
&lt;/h2&gt;

&lt;p&gt;See what’s running and sort by memory usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps aux &lt;span class="nt"&gt;--sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;-%mem | &lt;span class="nb"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for unfamiliar or suspicious processes. Malware often disguises itself with odd names or runs in the background silently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Inspect Network Connections
&lt;/h2&gt;

&lt;p&gt;Identify listening services and active connections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-tulwn&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check for unexpected open ports or connections to unknown IPs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Review Auth Logs
&lt;/h2&gt;

&lt;p&gt;Look at recent authentication attempts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 20 /var/log/auth.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Watch for failed login attempts or unusual root access events. On some systems, you might need to check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;journalctl &lt;span class="nt"&gt;-xe&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5: Check for Recently Banned IPs (if using Fail2Ban)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;fail2ban-client status sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review which IPs have been banned and why. This helps track brute force attempts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: File Integrity Check
&lt;/h2&gt;

&lt;p&gt;If you’re using tools like AIDE or Tripwire, run an integrity scan to detect any unauthorized file changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aide &lt;span class="nt"&gt;--check&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Speed matters. While these steps won’t replace a full intrusion detection system, they can help you spot threats early and react quickly.&lt;/p&gt;

&lt;p&gt;Want to go further? Set up automated alerts, enable two-factor authentication, and install Fail2Ban to actively block brute-force attacks.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post. If you found the post helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;p&gt;🐦 Follow me on &lt;a href="https://twitter.com/tshenolo" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;br&gt;
📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your support and engagement means a lot to me as an open-source developer.&lt;/p&gt;

&lt;p&gt;Stay safe out there!&lt;/p&gt;

</description>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>fail2ban</category>
      <category>ssh</category>
    </item>
    <item>
      <title>Keep Calm and Use Docker Volumes</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Thu, 16 Oct 2025 01:00:01 +0000</pubDate>
      <link>https://dev.to/tshenolo/keep-calm-and-use-docker-volumes-35p6</link>
      <guid>https://dev.to/tshenolo/keep-calm-and-use-docker-volumes-35p6</guid>
      <description>&lt;p&gt;Docker volumes provide a way to store and share data generated by and used within containers. Unlike a container’s filesystem, which is lost when the container stops, volumes are designed for durability and ease of use.&lt;/p&gt;

&lt;p&gt;Check out my &lt;a href="https://www.youtube.com/@tshenolo" rel="noopener noreferrer"&gt;Youtube Channel&lt;/a&gt; where I post all kinds of content accompanying my posts, including this video showing everything in this post.&lt;/p&gt;

&lt;p&gt;

  &lt;iframe src="https://www.youtube.com/embed/87qxMHw_bfI"&gt;
  &lt;/iframe&gt;


&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Docker Volumes:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Data Persistence: Keeps data intact even after the container is removed.&lt;/li&gt;
&lt;li&gt;Sharing: Allows multiple containers to access the same data.&lt;/li&gt;
&lt;li&gt;Backup-Friendly: Simplifies data management and backups.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating a Docker Volume
&lt;/h2&gt;

&lt;p&gt;The first step is to create a Docker volume. Use the following command to do so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker volume create myvolume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Happens Here?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;myvolume is the name of the volume you're creating.&lt;/li&gt;
&lt;li&gt;Docker handles where and how this volume is stored, using the default driver unless specified otherwise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Use descriptive names for your volumes to make them easier to manage later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using a Docker Volume
&lt;/h2&gt;

&lt;p&gt;Once the volume is created, you can mount it to a container. Here’s how:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-v&lt;/span&gt; myvolume:/var/lib/mysql &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 3306:3306 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; mycontainer &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-secret-pw &lt;span class="se"&gt;\&lt;/span&gt;
  mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Breaking It Down:
&lt;/h2&gt;

&lt;p&gt;This command runs a MySQL database server in a Docker container with the following setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run in the Background:&lt;/strong&gt; The -d flag ensures the container runs in the background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Data:&lt;/strong&gt; The -v flag maps the MySQL data directory inside the container to a Docker volume (myvolume).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessible Ports:&lt;/strong&gt; The -p flag maps the MySQL port inside the container (3306) to the same port on your host, making the database accessible from outside the container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Name:&lt;/strong&gt; The  -name flag assigns the container the name mycontainer, so you can easily reference it later.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set Root Password:&lt;/strong&gt; The -e flag sets the MySQL root user’s password (my-secret-pw) via an environment variable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uses MySQL Image:&lt;/strong&gt; The command pulls and runs the default MySQL Docker image.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why Use Volumes?&lt;/strong&gt; Mounting a volume ensures that any data written to /var/lib/mysql persists, even if the container is removed or recreated. This is crucial for retaining your database data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspecting a Docker Volume
&lt;/h2&gt;

&lt;p&gt;Need to see what’s inside your volume or its configuration details? Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker volume inspect myvolume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output:
&lt;/h2&gt;

&lt;p&gt;The command displays metadata about the volume, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mount Point: Where the volume is stored on your host machine.&lt;/li&gt;
&lt;li&gt;Driver: The software managing the volume.&lt;/li&gt;
&lt;li&gt;Usage Details: Information about the containers using the volume.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Removing a Docker Volume
&lt;/h2&gt;

&lt;p&gt;When a volume is no longer needed, you can remove it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker volume &lt;span class="nb"&gt;rm &lt;/span&gt;myvolume
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Note:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ensure no container is using the volume before attempting to remove it.&lt;/li&gt;
&lt;li&gt;Removing a volume deletes all its data permanently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Caution:&lt;/strong&gt; Double-check before removing a volume to avoid accidental data loss.&lt;/p&gt;

&lt;p&gt;Docker volumes are a vital part of containerized workflows, enabling efficient data management and sharing. Whether you’re building a small project or scaling up a large application, understanding and using volumes effectively can save time and simplify your operations.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post. If you found the post helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐦 Follow me on &lt;a href="https://x.com/tshenolo" rel="noopener noreferrer"&gt;X&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your support and engagement means a lot to me as an open-source developer.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>volumes</category>
      <category>containers</category>
    </item>
    <item>
      <title>From Chaos to Clarity - How I Document My Work Effectively</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Thu, 13 Mar 2025 12:45:31 +0000</pubDate>
      <link>https://dev.to/tshenolo/from-chaos-to-clarity-how-i-document-my-work-effectively-38nc</link>
      <guid>https://dev.to/tshenolo/from-chaos-to-clarity-how-i-document-my-work-effectively-38nc</guid>
      <description>&lt;p&gt;I used to struggle with disorganization, which significantly hindered my productivity and led to inefficiencies. However, I found that effective documentation is the key to transforming chaotic workflows into organized, structured, and highly productive processes. Whether I’m working on software development, managing projects, or tackling technical challenges, dedicating time to document my work thoroughly has greatly enhanced my organization, collaboration, and accessibility to vital information. Here are the four fundamental principles I follow to bring clarity to my documentation practices:&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule #1: Stay Organized
&lt;/h2&gt;

&lt;p&gt;The first step I took in achieving clarity was maintaining a well-structured documentation system. Staying organized has reduced my stress, saved time, and boosted my productivity. Here's how I stay on top of my documentation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Folder Organization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I create dedicated folders for each of my projects.&lt;/li&gt;
&lt;li&gt;I categorize files based on subjects to streamline access.&lt;/li&gt;
&lt;li&gt;I utilize cloud storage solutions to enable access from multiple devices.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Keeping a Calendar:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I schedule periodic documentation reviews and updates.&lt;/li&gt;
&lt;li&gt;I track deadlines and project milestones effectively.&lt;/li&gt;
&lt;li&gt;I use tools like Google Calendar and Trello to stay organized.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rule #2: Break Tasks Into Manageable Steps
&lt;/h2&gt;

&lt;p&gt;Whether I am taking a course, working out, or handling a task, I always break down the process into smaller, achievable steps. This approach helps me stay focused, track progress, and avoid feeling overwhelmed. By dividing tasks into bite-sized chunks, I can tackle them more efficiently and systematically.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Define Clear Objectives:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set specific goals for each step to maintain focus.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Prioritize Tasks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Identify the most critical steps and tackle them first.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Use Checklists:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep track of progress with to-do lists and checkboxes.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rule #3: Document Everything
&lt;/h2&gt;

&lt;p&gt;I've found that comprehensive documentation acts as a reliable reference for future projects, troubleshooting, and knowledge sharing. To achieve thorough documentation, I use these methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Guides:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I write step-by-step instructions and tutorials to simplify processes.&lt;/li&gt;
&lt;li&gt;You can check out some examples at &lt;a href="https://medium.com/@tshenolomos" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Vlogs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I create video documentation to explain complex workflows visually.&lt;/li&gt;
&lt;li&gt;You can view my vlogs at &lt;a href="https://www.youtube.com/@tshenolo" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Open Source Contributions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I document and share my code contributions on platforms like GitHub.&lt;/li&gt;
&lt;li&gt;Explore my contributions at &lt;a href="https://github.com/tshenolo" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I've also created an open-source Chrome plugin, &lt;a href="https://github.com/tshenolo/chrome-jira-details" rel="noopener noreferrer"&gt;chrome-jira-details&lt;/a&gt;, that helps me quickly copy Jira titles, full Jira details, or save them as a file. This has been an invaluable tool in my workflow to capture and document tasks efficiently.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rule #4: Keep Code Snippets
&lt;/h2&gt;

&lt;p&gt;Reusable code snippets have been a game-changer for me when it comes to efficiency and consistency. Maintaining an organized collection of snippets allows me to quickly access frequently used code. Here’s how I do it effectively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Digital Note-Taking Apps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I use tools like OneNote to categorize and store my snippets.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repositories:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I share and manage my code snippets using &lt;a href="https://github.com/tshenolo/snippets" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Gist for Quick Sharing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I store and share snippets effortlessly on &lt;a href="https://gist.github.com/tshenolo" rel="noopener noreferrer"&gt;GitHub Gist&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  Practical Examples of My Documentation Process
&lt;/h2&gt;

&lt;p&gt;Here are some of the tools and strategies I use to stay organized and productive:&lt;/p&gt;

&lt;h3&gt;
  
  
  Trello for Task Management
&lt;/h3&gt;

&lt;p&gt;I use Trello to manage my content creation workflow by categorizing tasks into backlog, blog, script, video, and posted stages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvl70intje5zugiwegle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnvl70intje5zugiwegle.png" alt="Image description" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Google Calendar for Scheduling
&lt;/h3&gt;

&lt;p&gt;Scheduling my daily activities, such as workouts, meetings, and tasks, helps me stay on track.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk66reauzgkr2us7can0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhk66reauzgkr2us7can0.png" alt="Image description" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Spreadsheet for Website Development Planning
&lt;/h3&gt;

&lt;p&gt;Breaking down website development tasks into stages ensures that I cover all critical aspects efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb1qth9jcfajilupcz9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb1qth9jcfajilupcz9m.png" alt="Image description" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Workout Planning
&lt;/h3&gt;

&lt;p&gt;Tracking my workout routines ensures consistency and progress over time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqz7spoy8faa3zk6elyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbqz7spoy8faa3zk6elyc.png" alt="Image description" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Training Progress Tracking
&lt;/h3&gt;

&lt;p&gt;I track my training progress to ensure I stay on course with my learning goals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv67l863mlx2msskot46b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv67l863mlx2msskot46b.png" alt="Image description" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Jira Plugin and Folder Organization
&lt;/h3&gt;

&lt;p&gt;To streamline my workflow, I use my custom Jira Chrome plugin to copy issue details quickly and organize my project files efficiently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvs9uen9143a37g8aguu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvs9uen9143a37g8aguu.png" alt="Image description" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By following these four essential rules: staying organized, breaking tasks into manageable steps, documenting everything, and maintaining code snippets I have turned my chaotic workflow into a well-structured, efficient system. Implement these strategies today and experience the benefits of clear and concise documentation!&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post. If you found the post helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;p&gt;🐦 Follow me on &lt;a href="https://x.com/tshenolo" rel="noopener noreferrer"&gt;X&lt;/a&gt;&lt;br&gt;
📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1" rel="noopener noreferrer"&gt;Youtube channel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your support and engagement means a lot to me as an open-source developer.&lt;/p&gt;

&lt;p&gt;Do you have a favorite organization technique? Share it with us in the comments!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>calendar</category>
      <category>focus</category>
      <category>documentation</category>
    </item>
    <item>
      <title>Platforms for Developers and Content Creators to Post Articles</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Mon, 18 Mar 2024 15:24:10 +0000</pubDate>
      <link>https://dev.to/tshenolo/platforms-for-developers-and-content-creators-to-post-articles-1m7b</link>
      <guid>https://dev.to/tshenolo/platforms-for-developers-and-content-creators-to-post-articles-1m7b</guid>
      <description>&lt;p&gt;In the digital age, the demand for platforms to share knowledge, experiences, and ideas has significantly increased. For developers and content creators, this can mean sharing technical know-how, providing insights into the industry, or simply telling stories about their experiences. This blog post will introduce you to platforms where you can post your articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dev.to
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://dev.to"&gt;https://dev.to&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcjvl9mwdlbig68gh64r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frcjvl9mwdlbig68gh64r.png" alt="Image description" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dev.to is a vibrant community of software developers who write and share articles. It's an open-source platform, making it an excellent space for individuals looking to contribute directly or import from an RSS feed. By posting on Dev.to, you join a community eager to learn, engage, and grow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Medium
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://medium.com"&gt;https://medium.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4ebffx00b9y8dmvpkoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4ebffx00b9y8dmvpkoj.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Medium is a diverse platform that opens its doors to anyone eager to publish articles on any topic. Medium features various publications that you can contribute to, providing a built-in audience that can help your content gain visibility. The platform supports a broad range of topics, making it a great place for interdisciplinary content creators.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Pages
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://pages.github.com"&gt;https://pages.github.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3qhgdypv0ee7talxm97.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff3qhgdypv0ee7talxm97.png" alt="Image description" width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub isn't just a repository for code; it also offers GitHub Pages, a service that allows you to host webpages directly from a GitHub repository. This feature makes it an ideal place to post articles for developers, enabling you to include code snippets and other technical details in a developer-friendly environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  LinkedIn Articles
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://www.linkedin.com"&gt;https://www.linkedin.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffd3htsga34ur3sk6017u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffd3htsga34ur3sk6017u.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn allows users to publish articles directly on their profile. It's a fantastic platform for sharing professional insights and engaging with your network. LinkedIn Articles can help you establish your professional brand and connect with peers in your industry.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hashnode
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://hashnode.com"&gt;https://hashnode.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyux4moj0toijbukw2uit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyux4moj0toijbukw2uit.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hashnode enables you to publish articles on your domain for free. It's a community of software developers who write and share articles on a wide range of topics. Posting on Hashnode, you're not just publishing content; you're becoming a part of a community eager to learn and share.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blogger
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://www.blogger.com"&gt;https://www.blogger.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgf4moukhoeo3pwf3eut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgf4moukhoeo3pwf3eut.png" alt="Image description" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Blogger is a free blog publishing tool from Google. It's user-friendly, making it easy to start sharing your ideas with the world. As it integrates seamlessly with other Google services, Blogger is an excellent choice for those heavily invested in the Google ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  WordPress
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://wordpress.com"&gt;https://wordpress.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgx290ccyqgpcp0diekf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgx290ccyqgpcp0diekf9.png" alt="Image description" width="800" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WordPress is a popular choice for blog publishing, offering two different services. WordPress.com provides a managed service that takes care of all the technical aspects, while WordPress.org allows you to host your own WordPress site, providing more flexibility and control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Daily.dev
&lt;/h2&gt;

&lt;p&gt;URL: &lt;a href="https://daily.dev/"&gt;https://daily.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkoy338xw9l3looddnz9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdkoy338xw9l3looddnz9.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Daily.dev is a unique platform tailored for developers, offering a curated feed of the latest articles, news, and tutorials from across the tech industry. Unlike traditional blogging platforms, daily.dev aggregates content from a wide range of sources, providing developers with a comprehensive and diversified view of the tech landscape. Users can customize their feed to match their interests, ensuring they always stay updated with the trends and technologies relevant to their work.&lt;/p&gt;

&lt;p&gt;Each of these platforms has its unique strengths and caters to different needs. It's important to choose a platform that aligns with your goals as a content creator. Whether you're a developer looking to share your expertise or a writer aiming to reach a wider audience, these platforms provide you with the tools you need to share your content with the world.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thank you for the Support
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🐦 Follow me on &lt;a href="https://twitter.com/tshenolo"&gt;X&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;📺 Subscribe to my &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1"&gt;Youtube channel&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>contentcreation</category>
      <category>community</category>
      <category>platforms</category>
      <category>technews</category>
    </item>
    <item>
      <title>Creating a Mixcloud Desktop App in Record Time with Electron.js</title>
      <dc:creator>Tshenolo Mos</dc:creator>
      <pubDate>Fri, 30 Jun 2023 15:00:38 +0000</pubDate>
      <link>https://dev.to/tshenolo/creating-a-mixcloud-desktop-app-in-record-time-with-electronjs-2im8</link>
      <guid>https://dev.to/tshenolo/creating-a-mixcloud-desktop-app-in-record-time-with-electronjs-2im8</guid>
      <description>&lt;p&gt;Are you interested in building a desktop application for Mixcloud? Look no further! In this guide, we'll walk you through creating a Mixcloud desktop app using Electron.js. Electron.js is a powerful framework that allows you to develop cross-platform desktop applications using web technologies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Prerequisites&lt;/li&gt;
&lt;li&gt;Getting Started&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Contributing&lt;/li&gt;
&lt;li&gt;License&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we dive into the process, ensure that you have the following prerequisites installed on your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/"&gt;Node.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;npm (Node Package Manager)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Let's get started on building our Mixcloud desktop app!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Initialize Your Project&lt;br&gt;
Begin by initializing a new Node.js project. Open your command-line interface, navigate to your desired project directory, and run the following command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install Electron&lt;br&gt;&lt;br&gt;
Next, install Electron.js as a project dependency. Run the following command in your project directory:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;electron
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Creating the main.js File&lt;br&gt;&lt;br&gt;
Now, it's time to create the main.js file. This file will serve as the entry point for your Electron application. Add the following code to main.js:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Import necessary modules&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;BrowserWindow&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;electron&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Function to create the main window&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;createWindow&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mainWindow&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;BrowserWindow&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;webPreferences&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;nodeIntegration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Load the Mixcloud website&lt;/span&gt;
&lt;span class="nx"&gt;mainWindow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loadURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.mixcloud.com/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Uncomment the following line to open DevTools for debugging&lt;/span&gt;
&lt;span class="c1"&gt;// mainWindow.webContents.openDevTools();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Create the window when Electron is ready&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;whenReady&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;createWindow&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Quit the app when all windows are closed&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;window-all-closed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;darwin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The code above sets up a basic Electron application with a browser window that loads the Mixcloud website. You can uncomment the openDevTools line if you want to enable the DevTools for debugging purposes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Modifying package.json&lt;br&gt;&lt;br&gt;
Now, let's modify the package.json file. Update the "main" field to point to main.js:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mixcloud-desktop-app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"main"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"main.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"start"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"electron ."&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"dependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"electron"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^13.0.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Running the Application&lt;br&gt;
To run the Mixcloud desktop application, execute the following command in your project directory:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Packaging the Application&lt;br&gt;&lt;br&gt;
If you wish to distribute your Mixcloud desktop app, Electron Packager can help you package it. Install Electron Packager as a development dependency by running:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;electron-packager &lt;span class="nt"&gt;--save-dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, update the "scripts" section in package.json as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```json
"scripts": {
"start": "electron .",
"package": "electron-packager . --platform=&amp;lt;platform&amp;gt; --arch=&amp;lt;arch&amp;gt; --out=dist --overwrite"
}
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace  with your target platform (e.g., win32, darwin, or linux), and  with the target architecture (e.g., x64 or arm64). You can specify multiple platforms and architectures separated by commas if needed.&lt;/p&gt;

&lt;p&gt;To package the application, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```bash
npm run package
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The packaged application files will be placed in the dist directory.&lt;/p&gt;

&lt;p&gt;Thank you for reading this blog post and showing interest in the Mixcloud Desktop App. If you found the project helpful or interesting, here are a few ways you can show your support:&lt;/p&gt;

&lt;h2&gt;
  
  
  ⭐ Star the GitHub Repository
&lt;/h2&gt;

&lt;p&gt;If you haven't already, please consider starring the &lt;a href="https://github.com/tshenolo/mixcloud-desktop-app"&gt;Mixcloud Desktop App repository&lt;/a&gt; on GitHub. Your stars help us gain visibility and recognition in the open-source community. Let's make this project shine together! ✨&lt;/p&gt;

&lt;h2&gt;
  
  
  🐦 Follow Me on Twitter
&lt;/h2&gt;

&lt;p&gt;Stay updated with the latest news, updates, and announcements about the Mixcloud Desktop App by following me on Twitter &lt;a href="https://twitter.com/tshenolo"&gt;@tshenolo&lt;/a&gt;. I'll share insights, tips, and other exciting developments related to the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  📺 Subscribe to My YouTube Channel
&lt;/h2&gt;

&lt;p&gt;Join my YouTube channel and subscribe to receive video tutorials, demos, and other content related to the Mixcloud Desktop App. You can subscribe to my channel &lt;a href="https://www.youtube.com/@tshenolo?sub_confirmation=1"&gt;here&lt;/a&gt;. Don't miss out on valuable content that can help you make the most of the application. Hit that subscribe button and never miss a beat!&lt;/p&gt;

&lt;p&gt;Your support and engagement mean a lot to me as an open-source developer. Thank you for being part of the Mixcloud Desktop App journey!  &lt;/p&gt;

&lt;p&gt;Remember, your support, likes, follows, and shares fuel my motivation and help this project grow. Thank you for being a part of the Mixcloud Desktop App community. Let's keep the music playing and the good vibes flowing! 🎵💻😄  &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations! You have successfully created a Mixcloud desktop app using Electron.js. You learned how to set up the project, install Electron, create the main window, run the application, and even package it for distribution.  &lt;/p&gt;

&lt;p&gt;Feel free to customize your Mixcloud desktop app further and add additional features to enhance the user experience. Happy coding!  &lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;Contributions to this project are welcome. Feel free to submit issues and pull requests.  &lt;/p&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project is licensed under the MIT License.  &lt;/p&gt;

</description>
      <category>node</category>
      <category>electronjs</category>
      <category>opensource</category>
      <category>github</category>
    </item>
  </channel>
</rss>
