<?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"><channel><title><![CDATA[VPSPioneer Guides]]></title><description><![CDATA[VPSPioneer Guides]]></description><link>https://vpspioneer.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ac52994badfb3154581037d/f98a665a-c1bf-42d1-869f-1446554e42d2.png</url><title>VPSPioneer Guides</title><link>https://vpspioneer.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 11:10:17 GMT</lastBuildDate><atom:link href="https://vpspioneer.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Add Swap Space to a VPS]]></title><description><![CDATA[A VPS without swap has a hard edge: when memory runs out, the kernel kills the biggest process — usually the database — and the site goes down. Swap gives the server somewhere to put rarely used memor]]></description><link>https://vpspioneer.hashnode.dev/how-to-add-swap-space-to-a-vps</link><guid isPermaLink="true">https://vpspioneer.hashnode.dev/how-to-add-swap-space-to-a-vps</guid><category><![CDATA[Linux]]></category><category><![CDATA[Devops]]></category><category><![CDATA[sysadmin]]></category><category><![CDATA[performance]]></category><dc:creator><![CDATA[VPSPioneer]]></dc:creator><pubDate>Thu, 08 Oct 2026 17:18:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac52994badfb3154581037d/32a73434-f998-4a0d-ac80-3d5cd1372c1e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A VPS without swap has a hard edge: when memory runs out, the kernel kills the biggest process — usually the database — and the site goes down. Swap gives the server somewhere to put rarely used memory pages instead, turning a crash into a slowdown. Most VPS images ship without it, and adding it takes two minutes.</p>
<h2>Check whether you have any</h2>
<pre><code class="language-bash">free -h
swapon --show
</code></pre>
<p>If <code>Swap:</code> shows <code>0B</code> and <code>swapon --show</code> prints nothing, there is none.</p>
<h2>Create a swap file</h2>
<p>Size guidance: equal to RAM for servers up to 4 GB; half of RAM above that; 2 GB is enough on most web servers regardless. Here, 2 GB:</p>
<pre><code class="language-bash">sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
</code></pre>
<p><code>chmod 600</code> matters: swap can contain fragments of anything that was in memory, including passwords. If <code>fallocate</code> is unavailable on your filesystem, <code>dd</code> does the same job more slowly:</p>
<pre><code class="language-bash">sudo dd if=/dev/zero of=/swapfile bs=1M count=2048 status=progress
</code></pre>
<p>Verify:</p>
<pre><code class="language-bash">free -h
</code></pre>
<h2>Make it permanent</h2>
<p>The swap file is active now but forgotten at reboot. Add it to <code>/etc/fstab</code>:</p>
<pre><code class="language-bash">echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
</code></pre>
<p>Test the line without rebooting: <code>sudo swapoff /swapfile &amp;&amp; sudo swapon -a &amp;&amp; free -h</code>.</p>
<h2>Set swappiness</h2>
<p>Swappiness (0–100) is how eagerly the kernel moves pages to swap. The default of 60 is tuned for desktops and makes a server swap out application memory while there is still RAM free, which is slow. For a web server, 10 is right: swap is used only under real pressure.</p>
<pre><code class="language-bash">sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee /etc/sysctl.d/99-swappiness.conf
</code></pre>
<p>A related knob, <code>vm.vfs_cache_pressure=50</code>, makes the kernel hold on to directory and file metadata longer — helpful for PHP applications that stat thousands of files per request.</p>
<h2>What swap is not</h2>
<p>It is not more RAM. Swap on NVMe is still a hundred times slower than memory; a server that is <em>constantly</em> swapping is a server that needs more RAM or a lighter workload. Check whether that is you:</p>
<pre><code class="language-bash">vmstat 1 5
</code></pre>
<p>Look at the <code>si</code> and <code>so</code> columns (swap in/out per second). Occasional small numbers are fine. Sustained hundreds or thousands mean memory is genuinely short. Find the hungry processes:</p>
<pre><code class="language-bash">ps aux --sort=-%mem | head -8
</code></pre>
<p>On a PHP server the fix is usually fewer PHP-FPM workers (<a href="https://vpspioneer.com/blog/servers/configure-php-fpm-pools-for-performance">tuning PHP-FPM pools</a>) or a smaller MySQL buffer pool; on a small VPS it is the next plan up.</p>
<h2>Removing or resizing</h2>
<pre><code class="language-bash">sudo swapoff /swapfile
sudo rm /swapfile
# then recreate at the new size, and update /etc/fstab if the path changed
</code></pre>
<h2>zram: the alternative on small VPSs</h2>
<p>On a 1 GB server, compressing memory in RAM (zram) can be better than swapping to disk. Ubuntu: <code>sudo apt install zram-tools</code>, then set <code>PERCENT=50</code> in <code>/etc/default/zramswap</code>. It gives roughly 1.5–2× effective memory for the pages that compress well, at some CPU cost.</p>
<p>VPSPioneer <a href="https://vpspioneer.com/vps">managed VPS</a> plans are provisioned with swap and swappiness set as above, and memory is one of the metrics we alert on — a server that starts swapping heavily gets a ticket from us suggesting what to change before it becomes an outage.</p>
<hr />
<p>Originally published at <a href="https://vpspioneer.com/blog/linux/add-swap-to-a-vps">vpspioneer.com</a>. More guides on hosting, Linux and servers: <a href="https://vpspioneer.com/blog">vpspioneer.com/blog</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to Add a Domain, Subdomain and Domain Pointer in DirectAdmin]]></title><description><![CDATA[A DirectAdmin account starts with one domain, and most accounts end up with more: a second site, a blog. or shop. subdomain, or an old domain that should simply show the same content. DirectAdmin has ]]></description><link>https://vpspioneer.hashnode.dev/how-to-add-a-domain-subdomain-and-domain-pointer-in-directadmin</link><guid isPermaLink="true">https://vpspioneer.hashnode.dev/how-to-add-a-domain-subdomain-and-domain-pointer-in-directadmin</guid><category><![CDATA[Web Hosting]]></category><category><![CDATA[dns]]></category><category><![CDATA[Linux]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[VPSPioneer]]></dc:creator><pubDate>Wed, 07 Oct 2026 22:42:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac52994badfb3154581037d/f5d8e1e1-9c29-4534-a49b-f8a2dbc928c1.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A DirectAdmin account starts with one domain, and most accounts end up with more: a second site, a <code>blog.</code> or <code>shop.</code> subdomain, or an old domain that should simply show the same content. DirectAdmin has a different page for each of those three cases, and each puts files in a different place. This guide covers all three, for a user with an account whose package allows them.</p>
<h2>Where domains live on disk</h2>
<p>Every domain in an account has its own directory tree under the account's home:</p>
<pre><code>/home/&lt;user&gt;/domains/example.com/
    public_html/      the web root, what visitors see
    private_html/     historically the HTTPS root
    logs/             Apache access and error logs
    stats/            web statistics
</code></pre>
<p><code>public_html</code> is where <code>index.php</code> goes. <code>private_html</code> is a leftover from the days when the HTTPS site could be different from the HTTP one; on any current install it is a symlink to <code>public_html</code>, so both protocols serve the same files. If you ever find a domain serving different content over HTTPS, check whether <code>private_html</code> has become a real directory, and use the <strong>Use a symbolic link from private_html to public_html</strong> setting on the domain in Domain Setup to put it back.</p>
<p>The Apache error log for a domain is also mirrored at <code>/var/log/httpd/domains/example.com.error.log</code> on AlmaLinux and Rocky, or under <code>/var/log/apache2/domains/</code> on Debian and Ubuntu, which is where the admin looks.</p>
<h2>Add a second domain</h2>
<p><strong>User Level → Account Manager → Domain Setup → Add New</strong>. Type the domain name, and set whether it may use its own share of the account's bandwidth and disk (the default is to share the account's limits), and whether SSL, CGI and PHP are on for it. Save, and DirectAdmin creates the directory tree above, a DNS zone in <code>/var/named/example.com.db</code>, the mail domain and the Apache virtual host. It is live once the task queue runs, usually within the minute.</p>
<p>Two things to check on the DNS side. If this server runs the domain's nameservers, the zone it just created is complete and you only need to point the domain at those nameservers at the registrar. If DNS is elsewhere, at Cloudflare or the registrar, add an A record there for <code>example.com</code> and <code>www</code> pointing at the account's IP, and the zone on this server is ignored.</p>
<p>A domain can only exist once on a server. If another account already has it, even as a pointer, the add fails with a message saying so, and the admin has to remove it from the other account first. Once the domain is added, the <a href="https://vpspioneer.com/blog/directadmin/free-lets-encrypt-ssl-in-directadmin">SSL page</a> issues its certificate.</p>
<h2>Add a subdomain</h2>
<p><strong>Account Manager → Subdomain Management</strong>, pick the parent domain, type the subdomain name and add. The document root defaults to a directory inside the parent's web root:</p>
<pre><code>/home/&lt;user&gt;/domains/example.com/public_html/blog/
</code></pre>
<p>That works, but it has a side effect: <code>example.com/blog/</code> and <code>blog.example.com</code> serve the same files, and if the parent site is WordPress its <code>.htaccess</code> rules can catch requests meant for the subdomain. Recent versions let you set a different document root when creating the subdomain; putting it outside the parent's <code>public_html</code> avoids the overlap.</p>
<p>DirectAdmin adds the subdomain's A record to the zone automatically. Subdomains do not get their own mail; <code>mail@blog.example.com</code> is not something the panel creates.</p>
<h2>Add a domain pointer</h2>
<p><strong>Account Manager → Domain Pointers</strong>. A pointer is a second name for an existing domain, and the form offers two kinds.</p>
<p>An <strong>alias</strong> pointer serves the same site under both names. <code>example.co.uk</code> shows exactly what <code>example.com</code> shows, with the address unchanged in the browser, and mail to <code>@example.co.uk</code> is delivered to the same mailboxes. Aliases are added to the domain's Let's Encrypt certificate automatically the next time it is issued, so both names work over HTTPS.</p>
<p>A <strong>redirect</strong> pointer sends a visitor to the main domain with a 301, so <code>example.co.uk</code> becomes <code>example.com</code> in the browser. This is the right choice for a domain you are retiring in favour of a new one, or when you want one canonical name for search engines and only bought the other domain to stop someone else using it.</p>
<h2>Domain, subdomain or pointer</h2>
<p>The rule we use: if the name gets its own site, its own files and probably its own mailboxes, it is a <strong>domain</strong>. If it is a section of an existing site with a name of its own, <code>shop.</code>, <code>app.</code>, <code>staging.</code>, it is a <strong>subdomain</strong>. If it should show a site that already exists, it is a <strong>pointer</strong>. Domains and pointers count against separate limits in the package, so a customer who adds every spare domain as a full domain may hit their domain limit while pointers go unused.</p>
<h2>Wildcards</h2>
<p>A wildcard, <code>*.example.com</code>, is not a checkbox on any of these pages. It starts in <strong>DNS Management</strong> with an A record for <code>*</code>, so every unknown subdomain resolves to the server. What then answers depends on Apache: DirectAdmin does not create a wildcard virtual host by itself, so the admin adds one for the domain under <strong>Admin Level → Server Manager → Custom HTTPD Configurations</strong>. The certificate side is simpler, since DirectAdmin can issue a wildcard Let's Encrypt certificate when it hosts the domain's DNS, and 1.709 made that check faster.</p>
<h2>Test before DNS moves</h2>
<p>When a domain is being moved from another host, add it in DirectAdmin first and test it before changing DNS by putting a line in your own computer's hosts file that maps <code>example.com</code> and <code>www.example.com</code> to the server's IP. When it looks right, change the nameservers or A records; when they have propagated, request the certificate. On VPSPioneer <a href="https://vpspioneer.com/free-migration">free migrations</a> this is exactly the order we work in.</p>
<hr />
<p>Originally published at <a href="https://vpspioneer.com/blog/directadmin/add-domain-subdomain-and-pointer-in-directadmin">vpspioneer.com</a>. More guides on hosting, Linux and servers: <a href="https://vpspioneer.com/blog">vpspioneer.com/blog</a>.</p>
]]></content:encoded></item><item><title><![CDATA[20 Linux Commands Every Server Admin Uses Daily]]></title><description><![CDATA[You do not need to know Linux to run a website. You need about twenty commands and the habit of reading what they print. These are the ones we type most on a normal day, grouped by what you are trying]]></description><link>https://vpspioneer.hashnode.dev/20-linux-commands-every-server-admin-uses-daily</link><guid isPermaLink="true">https://vpspioneer.hashnode.dev/20-linux-commands-every-server-admin-uses-daily</guid><category><![CDATA[Linux]]></category><category><![CDATA[linux-commands]]></category><category><![CDATA[Devops]]></category><category><![CDATA[sysadmin]]></category><dc:creator><![CDATA[VPSPioneer]]></dc:creator><pubDate>Tue, 06 Oct 2026 17:09:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ac52994badfb3154581037d/bd82a68d-2110-4bc0-92df-afbf43b6d8c7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You do not need to know Linux to run a website. You need about twenty commands and the habit of reading what they print. These are the ones we type most on a normal day, grouped by what you are trying to do.</p>
<h2>Finding your way around</h2>
<p><code>pwd</code>, <code>ls</code>, <code>cd</code> — where am I, what is here, go there.</p>
<pre><code class="language-bash">ls -lah            # long format, hidden files, human sizes
cd -               # back to the previous directory
</code></pre>
<p><code>find</code> — locate files by name, size, age or owner.</p>
<pre><code class="language-bash">find /var/www -name "*.log" -size +100M
find . -mtime -1                   # changed in the last 24 hours
find . -user root -type f          # files root created in the web tree
</code></pre>
<h2>Reading files and logs</h2>
<p><code>cat</code>, <code>less</code>, <code>tail</code>, <code>head</code> — show a file, page through it, show the end or the start.</p>
<pre><code class="language-bash">tail -f /var/log/nginx/error.log        # follow live
tail -n 200 /var/log/syslog | less      # last 200 lines, paged
</code></pre>
<p><code>grep</code> — search text. The single most useful command on the list.</p>
<pre><code class="language-bash">grep -i "error" /var/log/php-fpm.log
grep -rn "DB_PASSWORD" /var/www/         # recursive, with line numbers
grep -v "200 " access.log | tail         # everything that is not a 200
</code></pre>
<h2>Resources and what is running</h2>
<p><code>top</code> / <code>htop</code> — live view of CPU, memory and processes. Press <code>M</code> to sort by memory, <code>P</code> by CPU, <code>q</code> to quit.</p>
<p><code>free -m</code> — memory in megabytes. Look at <em>available</em>, not <em>free</em>; Linux uses spare RAM as cache and gives it back.</p>
<p><code>df -h</code> and <code>du -sh</code> — disk usage per filesystem, and size of a directory.</p>
<pre><code class="language-bash">df -h
du -sh /var/www/* | sort -h | tail       # biggest sites last
</code></pre>
<p><code>ps</code> — list processes.</p>
<pre><code class="language-bash">ps aux --sort=-%mem | head              # hungriest by memory
ps aux | grep php-fpm | wc -l           # how many PHP workers
</code></pre>
<p><code>ss</code> — what is listening on which port (replaces <code>netstat</code>).</p>
<pre><code class="language-bash">sudo ss -tulpn
</code></pre>
<h2>Services</h2>
<p><code>systemctl</code> — start, stop, restart, enable, and see status.</p>
<pre><code class="language-bash">sudo systemctl restart nginx
sudo systemctl status mariadb
sudo systemctl enable --now redis
</code></pre>
<p><code>journalctl</code> — logs for anything systemd runs.</p>
<pre><code class="language-bash">sudo journalctl -u nginx -n 100 --no-pager
sudo journalctl -p err -b                # all errors since boot
</code></pre>
<h2>Moving things</h2>
<p><code>cp</code>, <code>mv</code>, <code>rm</code>, <code>mkdir</code> — copy, move/rename, delete, create directory.</p>
<pre><code class="language-bash">cp -a site/ site-backup-$(date +%F)/    # -a keeps permissions and timestamps
rm -rf cache/*                          # careful: no undo
mkdir -p a/b/c                          # create the whole path
</code></pre>
<p><code>rsync</code> — copy that only transfers changes, local or over SSH.</p>
<pre><code class="language-bash">rsync -avz --delete /var/www/ user@backup:/srv/www/
</code></pre>
<p><code>scp</code> — copy a single file over SSH.</p>
<pre><code class="language-bash">scp backup.sql.gz user@203.0.113.10:/tmp/
</code></pre>
<p><code>tar</code> — archive and compress.</p>
<pre><code class="language-bash">tar -czf site-$(date +%F).tar.gz /var/www/example.com
tar -xzf site-2026-09-15.tar.gz
</code></pre>
<h2>Permissions and users</h2>
<p><code>chmod</code>, <code>chown</code> — mode and owner. Full guide: <a href="https://vpspioneer.com/blog/linux/linux-file-permissions-chmod-chown-explained">Linux file permissions explained</a>.</p>
<p><code>sudo</code> — run one command as root. <code>sudo -i</code> opens a root shell; <code>sudo -u www-data php artisan …</code> runs as another user.</p>
<h2>Network</h2>
<p><code>curl</code> — fetch a URL, see headers, test an API.</p>
<pre><code class="language-bash">curl -I https://example.com               # headers only
curl -s -o /dev/null -w "%{http_code} %{time_total}s\n" https://example.com
</code></pre>
<p><code>dig</code> — DNS lookups. <code>dig example.com A +short</code>, <code>dig example.com MX</code>.</p>
<p><code>ping</code> and <code>traceroute</code> / <code>mtr</code> — is it reachable, and where does the path slow down.</p>
<h2>Text editing</h2>
<p><code>nano</code> — the editor that does what you expect. <code>Ctrl+O</code> save, <code>Ctrl+X</code> exit. Use <code>vim</code> if you already know it; do not learn it on a production server at 2 a.m.</p>
<h2>The habits that matter more than the commands</h2>
<ul>
<li><p>Press <strong>Tab</strong> to complete file names; you will make fewer typos.</p>
</li>
<li><p><code>history | grep</code> finds the command you ran last month.</p>
</li>
<li><p>Before <code>rm -rf</code>, run <code>ls</code> on the same path first.</p>
</li>
<li><p>Read the whole error message. The answer is almost always in it.</p>
</li>
</ul>
<p>Every one of these works on any VPSPioneer <a href="https://vpspioneer.com/vps">managed VPS</a> and on shared plans with SSH enabled. If a command's output does not make sense, paste it into a ticket — that is the fastest way we can help.</p>
<hr />
<p><em>Originally published at</em> <a href="https://vpspioneer.com/blog/linux/20-linux-commands-every-server-admin-uses"><em>vpspioneer.com</em></a><em>. More guides on hosting, Linux and servers:</em> <a href="https://vpspioneer.com/blog"><em>vpspioneer.com/blog</em></a><em>.</em></p>
]]></content:encoded></item></channel></rss>