<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>LES Talk — LowEndSpirit</title>
        <link>https://lowendspirit.com/</link>
        <pubDate>Sat, 05 Sep 2026 14:12:28 +0000</pubDate>
        <language>en</language>
            <description>LES Talk — LowEndSpirit</description>
    <atom:link href="https://lowendspirit.com/categories/les-talk/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Up votes and Down votes - Poll to see what you want to see and be seen.</title>
        <link>https://lowendspirit.com/discussion/11311/up-votes-and-down-votes-poll-to-see-what-you-want-to-see-and-be-seen</link>
        <pubDate>Tue, 01 Sep 2026 11:37:47 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11311@/discussions</guid>
        <description><![CDATA[<p><strong>Please, of all the posts you interact with, take this one seriously and consider your answer</strong></p>

<p>Do you want to see who has downvoted you and who has upvoted you?</p>

<p>Or</p>

<p>Do you want downvotes to remain hidden?</p>

<p>To be clear, this is all or nothing; it includes historic votes as well, not just new ones.</p>

<p>This impacts:</p>

<ul>
<li>All Posts</li>
<li>New member applications</li>
<li>Hosting provider applications</li>
</ul>

<p>I understand why this has come up a few times; transparency is important.</p>

<p>The flip side is, and the reason they were hidden to begin with, if you don't like something, you should feel free to express that without being singled out.</p>

<p>While I dont like the idea that the odd strange person can just downvote shit to get a kick out of it, the individual was never the point of this.</p>

<p>The point was so the <strong>collective community</strong> could self-moderate a lot of things like who gets banned, who gets a tag, who is just not fitting in well, which posts should be sunk and which ones are more visible.</p>

<p>It was supposed to be a collective power; I worry that revealing on a post who downvoted could be a barrier to some taking any action and make things generally more combative, but I also understand why people want to be able to see this.</p>

<p>I will go with the majority because, really, my own opinion is probably the least important here. I am steering the ship, but I did not pick your chosen destination.</p>

<p>If we do go for a full reveal, there will be rules to go with it; any arguments this causes with tit-for-tat stupid up/down vote wars will be squashed quickly and will come under the mod/admin time vacuum rules.</p>

<p>I think because the implications of this are pretty significant, I would like to say that the winning answer needs at least 50 votes to pass and must be at least 60% of the total votes; there is no throwaway I don't care vote here, and there will be no modifications after.</p>
]]>
        </description>
    </item>
    <item>
        <title>The first blog post is live</title>
        <link>https://lowendspirit.com/discussion/11203/the-first-blog-post-is-live</link>
        <pubDate>Fri, 14 Aug 2026 14:55:21 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11203@/discussions</guid>
        <description><![CDATA[<p>The privacy mode or regular refreshers will have noticed that there is a blog link on the top menu now, It has its own unread post counter on it also.</p>

<p>I removed the support link as there have been no support tickets for 30+ days now that most things that caused support tickets are automated.</p>

<p>This is the first of many posts in the new LES Blog, its tied in to vanilla so you dont need separate accounts to comment etc.</p>

<p><a href="https://lowendspirit.com/profile/mikho" rel="nofollow">@mikho</a> kicking things off with a series on the history of LE*/LES and the aptly named "Deadpool Files"</p>

<p>Anyway, there will not be a forum post for every new blog article so as not to flood the forum; instead, just a little counter you should see for any new/unread blog posts.</p>
]]>
        </description>
    </item>
    <item>
        <title>LEStra - the vibe coded version of VestacP</title>
        <link>https://lowendspirit.com/discussion/11288/lestra-the-vibe-coded-version-of-vestacp</link>
        <pubDate>Sat, 29 Aug 2026 10:24:02 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>mikho</dc:creator>
        <guid isPermaLink="false">11288@/discussions</guid>
        <description><![CDATA[<p>It all started with a discussion about vibe coding, was it good or bad, ethical or unethical?</p>

<p>From that thread, a challenge was accepted in the cest-pit ... and a new thread were created about this project. <a href="https://lowendspirit.com/discussion/11268/vibe-coding-a-vestacp-alternative" rel="nofollow">https://lowendspirit.com/discussion/11268/vibe-coding-a-vestacp-alternative</a></p>

<p>That thread is the discussion thread about this project. This thread is only for the documentation and story abou the project. <br />
As one of the main things said in the beginning was to keep manual entries at a minimum, most of the underlaying sources are created by Claude Code.</p>

<p>After each Plan phase and each Code phase, updates are timestamped and posted in a <code>Decision.log.md</code> file. That is the main source.</p>

<p>At first the plan was also to release this as seperate blog posts, but already, a couple of days into the project, we already have 10 parts, each part is aprox. a 10 minute read.</p>

<p>So this thread was created (and closed), to have everything without comments cluttering up the thread.<br />
If you have a comment about it, use the thread mentioned above.</p>
]]>
        </description>
    </item>
    <item>
        <title>LES Karma (Thanks replacement) A reminder on how it works</title>
        <link>https://lowendspirit.com/discussion/11299/les-karma-thanks-replacement-a-reminder-on-how-it-works</link>
        <pubDate>Sun, 30 Aug 2026 13:28:50 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11299@/discussions</guid>
        <description><![CDATA[<p>You can:</p>

<p>Basics</p>

<ul>
<li>Upvote a thread or post</li>
<li>Downvote a thread or post</li>
</ul>

<p>The cost of a basic upvote/downvote to you is essentially 0; it's just expressing your opinion<br />
The cost to the OP or commenter is that they get +1 or lose -1</p>

<p>Good Karma can be used in multiple ways here and with more to come: revealing gated offers, the karma store and soon to buy promotion squares and to give to others that make some effort on any post or thread.</p>

<p>If a thread gets sufficient downvotes, it auto-sinks; if it continues to get downvotes, it gets hidden.</p>

<p>This essentially allows the community to self-moderate what they see; if you collectively don't like something, downvote it, please, as I have started doing on the obviously AI-generated posts.</p>

<p>User Impacts</p>

<ul>
<li>if a user is at 0 karma, they have a pleb badge and a grey avatar and name, a visual representation that they are not activley involved in much or new.</li>
<li>if a user gets to -10 they get auto wanred to improve</li>
<li>if a user gets to -25 they are automatically banned.</li>
</ul>

<p>The community essentially manages who is here and what they want to see.</p>

<p>Dynamics:</p>

<ul>
<li>Up/down vote of OP weight = 1</li>
<li>Up/down vote of comment on post weight = 0.25</li>
</ul>

<p>This, for those who have the full karma animations enabled, is what powers this and how bright things get and how the post is coloured and highlighted; it also impacts which threads show up in the right-hand menu.</p>

<p>Again, this is all part of self modderation, its much quicker to downvote shit than to report it, it makes life easier for everyone, and everything is based on group opinions, not single ones, both positive and negative.</p>

<p>It is the best tool to actively steer the collective community direction; the power is in your hands.</p>

<p>I hope that clarifies. I have been meaning to post this for a while, but after a number of PM's and reports recently it is apparent that a large number of people have missed or skipped the original explanation (in fairness, that thread was trashed with bug reports)</p>
]]>
        </description>
    </item>
    <item>
        <title>Follow up - Adverts on LES</title>
        <link>https://lowendspirit.com/discussion/11269/follow-up-adverts-on-les</link>
        <pubDate>Tue, 25 Aug 2026 16:07:57 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11269@/discussions</guid>
        <description><![CDATA[<p>Hi Folks,</p>

<p>Further to the previous discussion <a href="https://lowendspirit.com/discussion/11180/les-update-where-we-are-what-is-next-and-more-changes" rel="nofollow">https://lowendspirit.com/discussion/11180/les-update-where-we-are-what-is-next-and-more-changes</a> I am forking the advertising side of that discussion into this thread.</p>

<p>The support was good, and the overall feedback was positive, which, given that we are talking about the A word, is a bit of a surprise but shows good support for making this place grow.</p>

<h1>What I have done.</h1>

<p>I have plugged the karma system and FastSpring (card, PayPal, Venmo, Google Pay, Apple Pay, etc) into an advertising square system on LES.</p>

<p>It is a bit different to how it is done on LET who use BuySellAds, they only allow hosting related adverts and only allow adverts in general, they charge $125 per 125x125 square, LES who has probably only around 20% of the traffic is charging $7 per 150x150 square, which works out at about 2 - 3% of the cost per pixel for the same amount of traffic <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p>We are also allowing any members to take a square, and on top of that, you can use your good karma to pay for them instead of money. If you have been active here and contributed well, then you have probably built up a lot of good karma (thanks), and now you can spend it on this, the price is 70 karma per month per square.</p>

<p>It is also different as you can buy a 1x1 a 2x1 a 1x2 or a 2x2 square, or as many of any configuration as you want, if you have a 300x300 image to show or space to use, you can take a 2x2 and you can add or remove as many as you want at any time and your subscription will update accordingly.</p>

<h1>When is this happening</h1>

<p>I am just waiting for the final conversion to go live from the FastSpring rep, so I expect probably at the end of this week at the latest, its just the flip of a switch on the backend now, and it goes live, and the link shows up.</p>

<h1>What is allowed</h1>

<p>Well, its for anyone, so you can advertise your hosting or services, you can advertise your kite shop, your personal website, another hosting related forum, your reddit group, your facebook page, really I dont care, the only rule is that it must be suitable for all age groups: nothing offensive, political, or anything trying to skirt a grey line "an adgitation" so to speak.</p>

<p>If you abuse it, it's a direct ban: zero warning, zero appeal, just gone along with the advert and your account, if you are unsure if something is ok you can always ask; no excuses accepted.</p>

<h1>How it works.</h1>

<p>You have a few choices: first, you select your square size and how you want to pay (FastSpring or Karma)</p>

<p>Then you can either upload your image (max frames = 2 hard cap) or you can upload multiple images and set unique links for A/B testing <strong>OR</strong> you can simply set the square not to display i.e. remove that square from the site.</p>

<p>You will get stats on how many impressions you get and how many clicks etc, it will also be broken down into what we can pretty much guarantee are human impressions vs 'could be bots, could be some sort of privacy extension, unsure if human though' rather than pretend the numbers are sky high by counting LLM page crawlers like other places do to inflate value.</p>

<p>With karma, you can book the square for up to 3 months in advance; you need to manually renew within 14 days of expiry to keep it.</p>

<p>With direct payments, you set up a subscription which you can manage from here and cancel or increase at any time, that is taken monthly on the date you set it up recurring, when possible there will be a pro rated cost if you add a square on the 1st and then want another on the 10th for example, if the fee is lessthan $2 then that is charged as a minimum to cover fees and to allow all endpoints to accept the transaction.</p>

<p>Squares are shown on the side menu only on desktop, and on mobile a 2x2 block (can be made up of 4 1x1 or 2 2x1 or just a single 2x2, every 7 posts or at the end of a thread with &lt;7 posts per page.</p>

<h1>Tax and VAT invoices and Payments in general.</h1>

<p>FastSpring is a merchant of record; you are never a direct customer of lowendspirit, you are a customer of FastSpring, and FastSpring is our only customer, so we never need to store your personal information here at lowendspirit.</p>

<p>FastSpring will charge you any applicable VAT or local/state tax due at the point of transaction, and that tax will be paid directly to your EU member state or local state government office by FastSpring, all valid exemption numbers are accepted, if no tax ro VAT is due, none will be charged, if you use a VPN during payment, you will likley be either treated as a member of the origin state of your IP or rejected if you flag a risk factor for completing a purchae via a datacenter registered IP locatioed far away from your payment method.</p>

<p>Obviously no tax on karma. <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<h1>Can I block it?</h1>

<p>Probably and trivially, and I am genuinely not concerned if people do; it's just not worth worrying about. If you do not want to see adverts or content or links or pictures of pants or links to people's projects, no problem; that is your choice. I am not going to provide an on/off button, though.</p>

<h1>Screenshots so you know what to expect:</h1>

<p><img src="https://lowendspirit.com/uploads/editor/bx/mfpnzgxwmm9h.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/0p/cbjsqjrqzqjc.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/t9/hxuwgyk1u5gx.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/rl/tq9n8ltcha2x.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/vw/qvbnfrtgldzl.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/gl/hyix4xmzqrfg.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<h1>How will this benefit LES.</h1>

<ul>
<li>It will cover and recoup the costs mentioned in the previous thread</li>
<li>it will allow the LES infrastructure to expand and become more redundant with a better backup system</li>
<li>it will allow me to start hunting for VPS servers to review and bring new content into the community, not just from the regulars.</li>
<li>I will be able to start doing bulk deals with hosts to buy down offers, which will be exclusive to LES.</li>
<li>I will be able to do more work to try to advance some of the free service providers that post here to make life better for them and have them provide more resources to LES members.</li>
</ul>

<h1>Finally</h1>

<p>I understand not everyone will like this; sorry, it is going to happen anyway, as this is the best idea I have to advance the community as a whole. If you have better ones, you have also had a lot of opportunity to present them; for now, try to live with it. If you can't, I understand.</p>

<p>If this fails, no one is interested, or it just ends up being a giant long-term karma-based block to hide all squares, I also understand. I am not going to try to fight it; it is what it is. I will take that as a sign.</p>

<p>I am still open to any other feedback and ideas, as always. Angry throwaway comments that add nothing of substance are generally mentally filtered out now, though, so feel free to throw them at me too <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Change: Provider profiles now have links to discussions and comments.</title>
        <link>https://lowendspirit.com/discussion/11265/change-provider-profiles-now-have-links-to-discussions-and-comments</link>
        <pubDate>Tue, 25 Aug 2026 10:32:34 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11265@/discussions</guid>
        <description><![CDATA[<p>Provider profiles are updated to include the links to the discussions and comments by the owner of that profile, as a regular user profile has.</p>

<p>It's a low-hanging fruit kind of day.</p>
]]>
        </description>
    </item>
    <item>
        <title>Change: Role cleanup and merging</title>
        <link>https://lowendspirit.com/discussion/11272/change-role-cleanup-and-merging</link>
        <pubDate>Wed, 26 Aug 2026 17:04:27 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11272@/discussions</guid>
        <description><![CDATA[<p>Hosting Providers, Service Providers, and Freelancers are all now merged into "Providers"; basically, if you can sell or offer services here, even if free, you are simply a "Provider"</p>

<p>Old unused roles and vanity roles have been removed; some other vanity roles have been kept until I get time to convert them into 1 of 1 badges in the karma store instead of membership groups, which should tidy up the massive bars a bit and make life easier for future updates and security considerations.</p>
]]>
        </description>
    </item>
    <item>
        <title>Change: Quote is now available on Mobile</title>
        <link>https://lowendspirit.com/discussion/11244/change-quote-is-now-available-on-mobile</link>
        <pubDate>Thu, 20 Aug 2026 12:08:04 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11244@/discussions</guid>
        <description><![CDATA[<p>Little update.</p>

<p>You should now see a quote button on mobile; you might need a hard refresh.</p>

<p>Should make life easier, I know I have just not bothered sometimes because it is such a pain.</p>

<p>Untested on IOS, any feedback would be welcome.</p>
]]>
        </description>
    </item>
    <item>
        <title>Change: Side bar offers and items</title>
        <link>https://lowendspirit.com/discussion/11236/change-side-bar-offers-and-items</link>
        <pubDate>Wed, 19 Aug 2026 13:00:38 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11236@/discussions</guid>
        <description><![CDATA[<p><img src="https://lowendspirit.com/uploads/editor/km/istlvr63oceo.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p>The top hosts this month metric is not working as expected, this has been disabled now and will be worked in to what shows in the side bar in another way.</p>

<p>Host username removed and items set to scroll the title on mouseover instead of basic truncation.</p>
]]>
        </description>
    </item>
    <item>
        <title>New members system feedback</title>
        <link>https://lowendspirit.com/discussion/11187/new-members-system-feedback</link>
        <pubDate>Tue, 11 Aug 2026 11:13:28 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>System</dc:creator>
        <guid isPermaLink="false">11187@/discussions</guid>
        <description><![CDATA[This discussion was created from comments split from: <a rel="nofollow" href="/discussion/11129/welcome-new-members-mega-thread/">Welcome new Members - Mega Thread</a>.

Context: https://lowendspirit.com/discussion/comment/239296/#Comment_239296

<img src="https://lowendspirit.com/uploads/editor/u5/ca3p4sip7ho7.webp" alt="" />


---

RESULT OF THIS THREAD:

<div>ok settings updated.

Changes:

Auto Ban hammer at -7
Auto-promote to standard member at +7
3rd question added "Are you human" and the field name is 2+2, so if anyone answers with 4, they are a shit bot. 

People who are "New members" cannot see offers or domain sales until promoted, and cannot start new threads, only respond to existing ones.

upvotes for posts on other threads count, not just upvotes on the new member thread so the more they take part, the more chace they have of getting a quick promotion.</div>]]>
        </description>
    </item>
    <item>
        <title>LES update, where we are, what is next and more changes.</title>
        <link>https://lowendspirit.com/discussion/11180/les-update-where-we-are-what-is-next-and-more-changes</link>
        <pubDate>Sat, 08 Aug 2026 13:33:28 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11180@/discussions</guid>
        <description><![CDATA[<p>I guess this is going to cause a lot of division, but here goes.</p>

<p>This is a stream from my head, this post is overdue so I will write it raw as it comes to me and get the jumbled mess out of my head.</p>

<p>This topic is not going to get a consensus; I already know this and accept it, some people want everything to remain the same; some want only the changes they want; some want to donate in some way, some want to donate in other ways, some dont see why this place needs funding; some don't care about adverts; some want specific types of adverts; and insert 20 other versions of all of those opinions and then dome just dont care either way.</p>

<p>That makes it literally impossible to please everyone, so I am just accepting I cannot please everyone, but I am being as sensitive as possible to all of this while also acknowledging that some people are going to feel more strongly than others.</p>

<p>The original idea was to use google ads and allow people to opt in, and always show them to none logged in users.</p>

<p>The issue with that:</p>

<ul>
<li>People opted in and then complained anyway.</li>
<li>Google is a horrible system to use, has massive overreach and is overcomplicated for this platform in terms of compliance.</li>
<li>For the last X years, LES has had no statistics running at all, so I had no idea if it was going to yield $0.01 or $1000 per month so I found everything out at the same time.</li>
<li>Frankly, I don't like having Google integrated in anyway; I am really going off Google as a company in general. I don't think I am alone in this.</li>
</ul>

<p>The current situation:</p>

<ul>
<li>I have managed to reduce the "lights on" costs to around $10 per month for a 2GB OVH VPS on top of that there is domain and email costs so lets call it around $150 per year, not alot really in the scheme of things.</li>
<li>LES is now stable in terms of speed dips, backed up regularly (provider managed) , all possible caching is now activated at multiple levels and there is even a dedicated worker to catch all the AI scraper traffic so it never impacts the main forum speed priority.</li>
<li>Vanilla has been brought up to date for php 8.4 and is running on mariadb 11.x and on debian thanks.</li>
<li>I have done a few rounds of feedback before I touched anything, I appreciate sometimes people dont know what they want until they know what they dont want, and I did what I thought was a balanced mix of things to improve the flow of the forum, give the community more powers of self modderation and got you more involved in decision making while letting you have an active role in long term direction thought down voting, up voting that makes a difference, you can ignore pople, I have reduced friction on new members joining and hosts getting badges.</li>
<li>The price limits are still removed, and will be reviewed early 2027, I just feel that in 2026 its too arbitrary and to exclusionary to set $7 limits.</li>
<li>now I have had stats running on LES for a while via CloudFlare, the numbers are not great, from memory, around 7 years ago we were at around 300k - 500k page views per month. Today that's closer to 170k</li>
</ul>

<p>What it took to get here and what is next in the short term:</p>

<ul>
<li>I have probably spent about $500 of my own money and put in around 200 hours of my own time bringing things to where we are now.</li>
<li>The blog is coming back, some of you will remember the glory days of the LET front page, I have adapted vanilla to essentially allow WordPress-style blogposts while still using the vanilla engine, so <a href="https://lowendspirit.com/blog" rel="nofollow">https://lowendspirit.com/blog</a> will start getting updates soon. I will likley be taking full personal control over that and it will be fairly active.</li>
<li>I will be adding squares to the right-hand menu, there will never be agreement, adblockers exist, everyone can make their own choice. I will be doing it differently, everything will be managed in house and via the forum, similar to the karma store, you will be able to buy any amount of squares, you can use them for anything you want (anything appropriate)  for 70 karma or $7, month, and you can combine them into a maximum of 2x2, other options will be 1x1 2x1 1x2 and you can use karma or pay to have them blank. Squares are open to all members not just hosts, Karma points will be accepted as payment as that means you have been of value to the community and forum, static images, 2 frames maximum, no flashing.</li>
<li>Small Graphical signatures will be available (smaller than the current 3 lines of text) as alt images for mobile view.</li>
<li>I have a ton of low-hanging fruit in terms of optimisation to do both on the cloudflare side and the general backend side to increase pagespeed scores etc to make the entire forum more appealing to search engines etc so I will work on that often.</li>
<li>I need to continue to look for opportunities to evolve the offer here.</li>
<li>I will be starting to remove providers, so we have a more accurate picture. I will do a mass PM to all hosts, and give them 30 days to login and explain to new push/lease of life/situation, any that don't log in will become regular members again.</li>
<li>I am looking into adding more product/search capability for hosts for the providers section, something like serverhunter but not stepping on serverhunter's toes, although frankly I am not sure that is really much use these days it has been abused, and results are never accurate, frustratingly.</li>
</ul>

<p>Why do you need any money?:</p>

<ul>
<li>A lot of reasons, not limited to, redundancy, offsite backups, my time is not free to me, never mind in general, stability and being able to make a better offer to the users, paid content, opening up opportunities to evolve the LES offer.</li>
<li>More immediately, I want to start literally buying down offers for the community; I have already spoken to a few hosts about this, I want to be able to buy down hardware costs up front in various ways so that they can make better offers for you, ensuring LES users get 64GB ram instead of 32GB Ram or massive group buy discounts that are backed and guranteed.</li>
<li>I want to start a good host scheme, something other hosts and I have talked about for a very long time, so people have a trust mark of sorts that has some accountability attached to it; this won't be free or cheap to put in place.</li>
<li>I need to get more active members in here; frankly, the numbers are not on a healthy trend I see this as a last ditch effort.</li>
<li>I want to help fund some of the free offers that are already here and increase that e.g. paying some of <a href="https://lowendspirit.com/profile/Neoon" rel="nofollow">@Neoon</a> 's and <a href="https://lowendspirit.com/profile/msatt" rel="nofollow">@msatt</a> invoices for more exotic locations etc which then comes back to the community.</li>
<li>I dont need a lot, but a working budget would be good.</li>
</ul>

<p>What is the long term?</p>

<ul>
<li>That very much depends on how things go over the next year or so for LES, I promise I am going to continue to try as hard as I can to push this place, I appreciate some people just think it is fine how it is, but how it is, is going down in all metrics, so if you are one of those people perhaps you do not understand that what you are saying is essentially "It's fine, let it die slowly"</li>
<li>My health, I have an appointment in 5 days that will dictate how the rest of my year goes, I did say and take on board the suggestion I should not hold all the keys and agreed to keeping a adminsitrator in the loop here in case anything happens to me; it&#39;s well above a 0 chance for me at this stage that I dont get better. with that said (sorry he is genuinley not expecting this) I would like to ask <a href="https://lowendspirit.com/profile/mikho" rel="nofollow">@mikho</a> if he would consider being the saftey net and be an admin again, simply because he knows everything he needs to know, we have known each other well for 15+ years now and I would trust him with my private keys, if I vanish or just take a massive health dip I know he will do what is needed, if <a href="https://lowendspirit.com/profile/mikho" rel="nofollow">@mikho</a> is not interested I understand I will make the offer open to all current staff roles.</li>
<li>I do not plan to stick around as an administartor/owner long term, I will do what I need to do to get things turned around and step back, or reach a point where I accept I am not hitting the goals I need to hit and maybe I am not the right person, and I will step aside and let someone else try, likely from the existing Mod/Admin team.</li>
</ul>

<p>So that's everything I can think of right now. Feel free to ask any questions; please accept this in the good spirit it is intended; writing is not my strong point, apparently, nor is getting my intent across a lot of the time, so please don't read between lines; you won't find anything.</p>
]]>
        </description>
    </item>
    <item>
        <title>Feature Update: Karmagate</title>
        <link>https://lowendspirit.com/discussion/11173/feature-update-karmagate</link>
        <pubDate>Thu, 06 Aug 2026 11:20:43 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11173@/discussions</guid>
        <description><![CDATA[<p>Some of you may not have known we had this feature at anyway, but we can use a karmagate on all offers and domain sales posts.</p>

<p>This is what it looks like:</p>

<p><img src="https://lowendspirit.com/uploads/editor/jz/2n2nmtsxov39.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/yl/fdd8oa6gsie2.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p>Options once enabled:</p>

<p><img src="https://lowendspirit.com/uploads/editor/h5/1h0u97lo1ew2.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p>What the post looks like:</p>

<p><img src="https://lowendspirit.com/uploads/editor/38/lbfkqqfgpec3.webp" alt="LowEndSpirit - VPS Hosting and tech forum" title="" /></p>

<p>So you can use thresholds for members and be sure certain members only see your posts or sections of your post.</p>

<p>If anyone can think of a reason to have this option in other sections, please let me know.</p>
]]>
        </description>
    </item>
    <item>
        <title>New members - Change of process</title>
        <link>https://lowendspirit.com/discussion/11156/new-members-change-of-process</link>
        <pubDate>Tue, 04 Aug 2026 11:23:56 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11156@/discussions</guid>
        <description><![CDATA[<p>Following the feedback on the <a rel="nofollow" href="https://lowendspirit.com/discussion/11153/new-user-verification-system-feedback#latest" title="feedback thread">feedback thread</a>, changes have been made.</p>

<p>There will now be 1 <a rel="nofollow" href="https://lowendspirit.com/discussion/11129/welcome-new-members-mega-thread#latest" title="new members mega thread">new members mega thread </a> all new member posts will go in there not seperate posts.</p>

<p>New members (working on permissions) will have more rights to interact with existing threads outside of the "new members" member group, but will still not be able to see offers etc until on +5 karma</p>

<p>No one with less than 25 karma can give a new member an upvote and upvotes for new members can be given on any thread they interact with.</p>

<p>No one can gift karma to a new member; only up/down votes will work.</p>

<p>If users in the  'new members' group get -5 they are banned.</p>

<p>Participation from new members after registration is not mandatory but encouraged and rewarded; obvious spammers will be auto-removed quickly by the community downvotes.</p>

<p>Standard members are welcome to ignore the megathread if they have no interest; obviously, it helps LES in general to bring new members in.</p>

<p>I believe that solves all problems, or at least it's worth seeing how it goes before any further feedback is needed, but if you can spot an obvious problem that is not equivalent to "What if an asteroid strikes at 16:38 on a Tuesday"</p>

<p>If you want any other significant change related to this beyond tweaks, then please use the <a rel="nofollow" href="https://lowendspirit.com/discussion/11138/feature-requests-for-les#latest" title="feature requests thread">feature requests thread</a></p>

<p>Cheers.</p>

<p>Ant.</p>
]]>
        </description>
    </item>
    <item>
        <title>New user verification system - feedback</title>
        <link>https://lowendspirit.com/discussion/11153/new-user-verification-system-feedback</link>
        <pubDate>Mon, 03 Aug 2026 18:45:32 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11153@/discussions</guid>
        <description><![CDATA[<p>Let's have it then, based on my own observations the change required is obvious.</p>

<p>I am going to change it so that no one even sees the thread to vote on until they have made an actual post doing and introduction, I will make that a clear requirement.</p>

<p>If you are going to suggest changes or changes to numbers and requirements, please provide justification, like if not 5, why not 5. Nothing needs to be war and peace just give me a clue why you think what you think.</p>

<p>As a reminder the previous system was 1 question and 1 person deciding, it's just more visible now.</p>

<p>And the purpose was to reduce friction for new members to join and actually participate.</p>
]]>
        </description>
    </item>
    <item>
        <title>Image uploading is back at LES</title>
        <link>https://lowendspirit.com/discussion/11113/image-uploading-is-back-at-les</link>
        <pubDate>Mon, 27 Jul 2026 22:34:00 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11113@/discussions</guid>
        <description><![CDATA[<p>You can now upload images or GIFs directly to LES, they are optimised and converted to webp or motion webp.</p>

<p>You just need to have at least 10 karma and the source file can be upto 5mb</p>

<p>You can add alt tags too if you want some SEO juice on your post.</p>

<p>Either use the image upload button, copy and paste an image or just drag and drop it into the text input and the forum will grab it and convert it and optimise it and strip exit data etc.</p>

<p>Going to implement an Imgur proxy in the coming weeks too that grabs and converts the Imgur URLs.</p>
]]>
        </description>
    </item>
    <item>
        <title>LES Platform Updates - 28th June 2026</title>
        <link>https://lowendspirit.com/discussion/11004/les-platform-updates-28th-june-2026</link>
        <pubDate>Sun, 28 Jun 2026 18:26:41 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>AnthonySmith</dc:creator>
        <guid isPermaLink="false">11004@/discussions</guid>
        <description><![CDATA[<p>Bit of a fresh update.</p>

<p>All of this is in the dev version not here yet.</p>

<p>The support ticket system has been replaced, it is built into vanilla now.</p>

<p><img src="https://lowendspirit.com/uploads/editor/gi/cbedrpepsrkr.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/zb/guu8h6nja1p2.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/5e/asj3tk1zn3yg.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/69/98emzv4gz071.png" alt="" title="" /></p>

<p>When you open tickets, all mods/admins get a notification, you could get an answer from anyone.</p>

<p>Final tweaks done to the new themes, and now the framework for adding new themes is finished, which gives a lot more flexibility than the standard vanilla system, so I might do a phpBB-style view at some point, too.</p>

<p>Link sharing is almost done (Hacker News Style)</p>

<p>New user gate almost done, new users will have to do an intro post etc before they can see or access certain areas. I am making this deliciously tempting for spam bots. Negative karma in here from older accounts will auto-ban the users.</p>

<p>Cloudflare Turnstyle is replacing the user registration manual approval system.</p>

<p>I am targeting the end of next week to get V2 live.</p>
]]>
        </description>
    </item>
    <item>
        <title>My hosting, storage, and software stack (what’s worked for me so far)</title>
        <link>https://lowendspirit.com/discussion/10174/my-hosting-storage-and-software-stack-what-s-worked-for-me-so-far</link>
        <pubDate>Wed, 12 Nov 2025 05:15:55 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>bikegremlin</dc:creator>
        <guid isPermaLink="false">10174@/discussions</guid>
        <description><![CDATA[<p>It took some time and effort to put this all on paper. Sharing the info here in hope it will help more people, especially new members, to avoid some common pitfalls. Also posting it for selfish reasons: I suppose and hope the more experienced LESbians will correct any less-than-ideal choices with better ideas (I don't mind looking stupid in public if it lets me learn  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> ).</p>

<p>Turns out I've been working (for pay) with computers for over 30 years now, and I've tried and learned a lot during that time (still learning, it's a dynamic field). Here's a short-list of what's worked for me so far (in an infrastructure-related order so to speak):</p>

<p><em>For those who know my style - the series is mostly technical, brief, and to-the-point. That's what it is: basically a list with brief explanations why. Not my usual long-windedness.</em></p>

<p><a rel="nofollow" href="https://io.bikegremlin.com/38495/my-hosting-stack/" title="My Hosting stack">My Hosting stack</a><br />
Infrastructure - domain registration, DNS, website and email hosting.</p>

<p><a rel="nofollow" href="https://io.bikegremlin.com/38590/my-storage-stack/" title="My (backups) Storage stack">My (backups) Storage stack</a><br />
<em>Storage - physical and cloud.</em></p>

<p><a rel="nofollow" href="https://io.bikegremlin.com/38600/my-os-system-software-stack/" title="My OS &amp; System Software stack">My OS &amp; System Software stack</a><br />
<em>Computer-running - OS, drivers, security, diagnostics, and utilities.</em></p>

<p><a rel="nofollow" href="https://io.bikegremlin.com/38706/my-application-software-stack/" title="My Application Software stack">My Application Software stack</a><br />
<em>Computer-using - writing, editing, playing media, and troubleshooting.</em></p>

<p>Writing this series got me to revisit and rethink my stack (helping myself too), and took me on a few trips down memory lane (like first time seeing Total Commander on my late uncle's PC, while I was just learning and using DOS command prompt at the time and similar).</p>

<p>It was fun, and, as the modern managers and HR folks say: challenging.  LOL  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p>Relja</p>

<p>P.S.<br />
<em>I think this topic logically belongs in this section, but if it's a bad idea, moving is one-click away.</em></p>
]]>
        </description>
    </item>
    <item>
        <title>How do you set up your terminal?</title>
        <link>https://lowendspirit.com/discussion/10113/how-do-you-set-up-your-terminal</link>
        <pubDate>Mon, 27 Oct 2025 20:56:54 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">10113@/discussions</guid>
        <description><![CDATA[<p><img src="https://lowendspirit.com/uploads/editor/si/dt01i70sd9xj.png" alt="" title="" /></p>

<p>I think I want a really peaceful, retro green terminal like the above screenshot.</p>

<p>I recently installed and wrote about <a rel="nofollow" href="https://lowendspirit.com/discussion/9738/how-to-install-vscodium-with-code-server-on-a-debian-12-vps/p1">vscodium and code-server,</a> but vscodium, although super great, is not retro green.</p>

<p>In the retro green terminal, there is a peaceful, non-distracting, empty space into which I can load whatever I am working on at the moment. Any one of several editors plus a vast array of command line tools can be used instantly.</p>

<p>In addition to the command line tools, dot files and dot directories can be used keep everything arranged, close by, yet out of the way. Right now I use one dot file and two dot directories.</p>

<p>My dot file is .tlog, which is a simple text file with dates, log entries, comments, and terminal commands transcribed along with their output.</p>

<p>My two dot directories are .current and .attic. The first, .current, is where I keep individual files and project directories on which I currently am working, although not at the precise present moment. The second, .attic, is where I keep files and projects on which I am not currently working, but which I think I might need or want to see again before too long.</p>

<p>Once a new project hits .current or moves from .current to .attic, I still can go work on it there. Its not like I <em>have</em> to move the project back to my home directory in order to edit a file.</p>

<p>As a simple workflow example, here is me working on this post, comments added.</p>

<pre><code>root@tx:~# su - tom # Logging in as root saves me from typing sudo a million times as day. 
tom@tx:~$ date # I need to remind myself of the date in order to add the date to the log.
Mon Oct 27 05:16:31 PM UTC 2025
tom@tx:~$ vi .tlog # Starting todays log entries. 
tom@tx:~$ cp -p .tlog .tlog~ # Local quick backup, just in case.
tom@tx:~$ vi How-do-you-set-up-your-terminal # Write todays post.j 
tom@tx:~$ ls # Does the post exist in my home directory?
How-do-you-set-up-your-terminal # Yes!
tom@tx:~$ vi .tlog # Add log entry for this post.
tom@tx:~$ ls .current/ # Not much yet on the new Texas server.
tom@tx:~$ mv How-do-you-set-up-your-terminal .current/ # Move the draft to the .current directory.
tom@tx:~$ clear # Restore the peacefulness of the clean view of my home directory.
</code></pre>

<p>The green color I am using is #00ED00, which reminds me of the <a rel="nofollow" href="https://en.wikipedia.org/wiki/IBM_5151">IBM 5151</a> that I used to use.</p>

<p>For backup, I mirror my /home/tom directory on another server from a different provider. I can log in to either mirror and begin working right away. In addition to mirroring, I keep tar backups at a third provider and also on a local disk.</p>

<p>The biggest disadvantage of my retro green setup might be that it is stuck in time. I loved and lost the infinite scrollback from the slightly earlier days of paper terminals. Also, perhaps my love of retro green keeps me from embracing many advantages of newer terminal setups?</p>

<p>How do you set up your terminal? Can you convince me, almost 78 years old now, to move forward in time, to become young again?</p>
]]>
        </description>
    </item>
    <item>
        <title>How to install vscodium with code-server on a Debian 12 VPS</title>
        <link>https://lowendspirit.com/discussion/9738/how-to-install-vscodium-with-code-server-on-a-debian-12-vps</link>
        <pubDate>Thu, 03 Jul 2025 21:42:38 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">9738@/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="https://github.com/VSCodium/vscodium">vscodium</a> provides "binary releases of VS Code without MS branding/telemetry/licensing."</p>

<p><a rel="nofollow" href="https://github.com/coder/code-server">code-server</a> provides the ability to "[r]un VS Code on any machine anywhere and access it in the browser."</p>

<p>The vscodium <a rel="nofollow" href="https://github.com/VSCodium/vscodium?tab=readme-ov-file#install-with-package-manager">README</a> sends us to the <a href="https://lowendspirit.com/profile/paulcarroty" rel="nofollow">@paulcarroty</a> repo at Gitlab where there are specific <a rel="nofollow" href="https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo">Debian apt install instructions.</a></p>

<p><strong>Install vscodium and/or vscodium-insiders</strong></p>

<p>The specific install commands can be copied directly from the <a href="https://lowendspirit.com/profile/paulcarroty" rel="nofollow">@paulcarroty</a> repo. Basically there are only four simple steps:</p>

<ul>
<li><p>Install a gpg key;</p></li>
<li><p>add the repository to <code>/etc/apt/sources.list.d/</code>;</p></li>
<li><p>update, upgrade; and then</p></li>
<li><p>install codium and/or codium-insiders.</p></li>
</ul>

<p><strong>Install code-server</strong></p>

<p>Next is to install code-server. The code-server repo includes an <a rel="nofollow" href="https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo">install script</a>, as well as the <a rel="nofollow" href="https://github.com/coder/code-server?tab=readme-ov-file">curl commands to test and run the install script.</a></p>

<p><strong>Connecting</strong></p>

<p>To connect, set up an ssh tunnel to the VPS from the local machine. Then, on the VPS, start codium or codium-insiders followed by code-server. Finally, go to <code>http://localhost:8080</code> in the local machine's browser.</p>

<p>On the local machine:</p>

<ul>
<li><code>ssh tom@xxx.xxx.xxx.xxx -L 8080:localhost:8080</code></li>
</ul>

<p>On the VPS:</p>

<ul>
<li><p><code>$ cat /home/tom/.config/code-server/config.yaml</code> # Get the code-server password</p></li>
<li><p><code>$ codium</code> # Start vscodium.</p></li>
<li><p><code>$ code-server</code> # Start code-server.</p></li>
</ul>

<p>Back on the local machine:</p>

<ul>
<li>Go to <code>http://localhost:8080</code> in the browser.</li>
</ul>

<p><strong>Screenshots</strong></p>

<p><img src="https://lowendspirit.com/uploads/editor/7d/sho4lyou9n86.png" alt="" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/8h/jsrw2jm1iip3.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>FOSSBilling: A New, Free, and Open Source Billing Platform</title>
        <link>https://lowendspirit.com/discussion/6433/fossbilling-a-new-free-and-open-source-billing-platform</link>
        <pubDate>Thu, 07 Sep 2023 03:51:32 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">6433@/discussions</guid>
        <description><![CDATA[<h2><strong>Introduction</strong></h2>

<p>The new <a rel="nofollow" href="https://fossbilling.org">FOSSBilling</a> free and open source billing platform was <a rel="nofollow" href="https://lowendspirit.com/discussion/4999/fossbilling-first-release-since-rebranding-from-boxbilling/p1">discussed here at LES in December 2022.</a> The 2022 discussion included very helpful background posts from FOSSBilling developers <a href="https://lowendspirit.com/profile/jaapmarcus" rel="nofollow">@jaapmarcus</a> and <a href="https://lowendspirit.com/profile/evrifaessa" rel="nofollow">@evrifaessa</a>.</p>

<p>FOSSBilling has progressed a lot since the December 2022 LES discussion. Indeed,  shared hosting providers already have been using FOSSBilling in production.</p>

<p>Recently, I signed up as a customer at two shared hosting providers who use FOSSBilling. This post details the results of my testing FOSSBilling from the perspective of a shared hosting customer. Also presented after the test results are, courtesy of <a href="https://lowendspirit.com/profile/BelleNottelling" rel="nofollow">@BelleNottelling</a>, insights about the upcoming 0.6.0 FOSSBilling release along with tips for using FOSSBilling.</p>

<h2><strong>FOSSBilling Demo</strong></h2>

<p>The FOSSBilling website has a <a rel="nofollow" href="https://fossbilling.org/demo">great demo,</a> which enables everyone to see both the administrator panel interface and the client area interface.</p>

<h2><strong>FOSSBilling vs. Blesta</strong></h2>

<p>When <a rel="nofollow" href="https://freevps.org">FreeVPS.org</a> was started, the FreeVPS Team went with <a rel="nofollow" href="https://www.blesta.com/">Blesta</a> instead of FOSSBilling because the FreeVPS Team had experience with Blesta. However, unless, like FreeVPS, you have a generous donor of a Blesta license (Thanks <a href="https://lowendspirit.com/profile/Cloudie" rel="nofollow">@Cloudie</a>!), using Blesta normally requires <a rel="nofollow" href="https://www.blesta.com/pricing/">monthly payments or more expensive lifetime licenses.</a> Also, Blesta is <a rel="nofollow" href="https://www.blesta.com/#:~:text=Open%20Codebase,code%20at%20your%20finger%20tips.">not 100% open source.</a></p>

<h2><strong>FOSSBilling Tested At HostByBelle And At YetiNode</strong></h2>

<p>Shared hosting providers already using FOSSBilling in production include <a rel="nofollow" href="https://hostbybelle.com">HostByBelle</a> and <a rel="nofollow" href="https://yetinode.com">YetiNode.</a> Belle is one of the FOSSBilling developers. She is <a href="https://lowendspirit.com/profile/BelleNottelling" rel="nofollow">@BelleNottelling</a> here on LES. YetiNode is run by our very own indomitable Yeti, <a href="https://lowendspirit.com/profile/AuroraZero" rel="nofollow">@AuroraZero</a>.</p>

<p>My overall experience testing FOSSBilling as a customer was excellent at both HostByBelle and at YetiNode. I had no trouble launching a test html page on each provider's shared hosting service. Here are links to the two test pages: <a rel="nofollow" href="https://hbb.metalvps.com">HostByBelle</a> and <a rel="nofollow" href="https://ytn.metalvps.com">YetiNode.</a></p>

<p>Both providers use <a rel="nofollow" href="https://hestiacp.com/">HestiaCP</a> to provision shared hosting. Billing with FOSSBilling and provisioning with HestiaCP were very similar at HostByBelle and at YetiNode. I tried FOSSBilling&#39;s Support Ticket interface at HostByBelle. <a href="https://lowendspirit.com/profile/AuroraZero" rel="nofollow">@AuroraZero</a> talked with me by PM here at LES.</p>

<h2><strong>Screenshots Of FOSSBilling At HostByBelle</strong></h2>

<p>The gorgeous dark theme <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> shown in these screenshots comes from the reverse colors engineered by Chrome Browser's High Contrast Accessibility Extension. These screenshots are what I actually saw during sign-up at HostByBelle. If you also wish to see the normal, non-reversed color mode, please look at the above linked FOSSBilling demo.</p>

<ul>
<li><strong>Sign-Up</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/fw/hgest41xrlvj.jpeg" alt="" title="FOSSBilling sign-up dialogue at HostByBelle" /></p>

<ul>
<li><strong>Dashboard</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/iw/dmxxe62njip5.jpeg" alt="" title="FOSSBilling dashboard at HostByBelle" /></p>

<ul>
<li><strong>Ordering</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/7s/puc5lel0kfw8.jpeg" alt="" title="Order Dialog at HostByBelle" /></p>

<ul>
<li><strong>Payment</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/72/newk6qhhpio7.jpeg" alt="" title="Payment Dialog at HostByBelle" /></p>

<ul>
<li><strong>Hestia Control Panel</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/ss/k3koms65ctoe.jpeg" alt="" title="Hestia Conttrol Panel at HostByBelle" /></p>

<ul>
<li><strong>Invoices</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/04/10gz57up70i5.jpeg" alt="" title="Invoice at HostByBelle" /></p>

<ul>
<li><strong>Support Tickets</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/uq/zgfzqanagxl5.jpeg" alt="" title="Support Ticket at HostByBelle" /></p>

<ul>
<li><strong>Quick Ticket Reply</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/4p/8gpnfr0t5dwl.jpeg" alt="" title="Support Ticket Reply at HostByBelle" /></p>

<h2><strong>Additional FOSSBilling Discussion</strong></h2>

<ul>
<li><strong>Emails</strong></li>
</ul>

<p>FOSSBilling sent transactional emails every step of the way, including sign-up, payment, and support tickets. The email setups at HostByBelle and at YetiNode differ slightly. HostByBelle uses a transactional email provider, and YetiNode self-hosts its email MTA.</p>

<ul>
<li><strong>Payment Providers</strong></li>
</ul>

<p>FOSSBilling at HostByBelle offered Paypal and payment from account credit. Payment wasn't involved with YetiNode, because I tested their free tier instead of their paid tier. Paypal payment worked fine at HostByBelle.</p>

<ul>
<li><strong>Provisioning Shared Hosting and VPSes</strong></li>
</ul>

<p>Like most billing panels, FOSSBilling requires the use of another additional software package to provision  hosting services. Sometimes, modules can be added to billing panels to send instructions to the additional provisioning software's API.</p>

<p>As shown at both HostByBelle and at YetiNode, FOSSBilling works well with HestiaCP for shared hosting. FOSSBilling's five (including Hestia) already-working provisioning integrations are <a rel="nofollow" href="https://fossbilling.org/docs/product-types/hosting#working-control-panel-integrations">listed in the FOSSBilling Documentation.</a> Integration of Proxmox also has been <a rel="nofollow" href="https://forum.fossbilling.org/d/42-proxmox-and-fossbilling/7">discussed on the FOSSBilling Forum</a> and, more recently (8/21/2023), <a rel="nofollow" href="https://discord.com/channels/747432407757488179/1083093073233444954/1143157411398565888">on the FOSSBilling Discord.</a></p>

<ul>
<li><strong>FOSSBilling Forum</strong></li>
</ul>

<p>If you have additional questions about FOSSBilling, you might want to check out the <a rel="nofollow" href="https://forum.fossbilling.org/">FOSSBilling Forum.</a></p>

<h2><strong>HestiaCP</strong></h2>

<ul>
<li><strong>App Installation</strong></li>
</ul>

<p>As noted above, both HostByBelle and YetiNode use <a rel="nofollow" href="https://hestiacp.com/">Hestia Control Panel</a> for shared hosting installs. Here is HestiaCP's One Click App Installation Panel as seen at YetiNode.com. As expected, the HestiaCP app installation is similar at HostByBelle.</p>

<p><img src="https://lowendspirit.com/uploads/editor/vo/8za00nyvufop.jpeg" alt="" title="HestiaCP One Click App Installer At YetiNode" /></p>

<ul>
<li><strong>Let's Encrypt Certificates</strong></li>
</ul>

<p>SSL certificates from Let's Encrypt were provisioned with one click at both HostByBelle and YetiNode.</p>

<h2><strong>FOSSBilling Updates</strong></h2>

<p>Both FOSSBilling's client theme and its multiple administrative user permissions hopefully will be updated in the next 0.6.0 release or soon thereafter. Belle posted <a rel="nofollow" href="https://discord.com/channels/747432407757488179/1052282259182460990/1134178573805174846">screenshots of the updated client theme</a> on FOSSBilling's Discord.</p>

<h2><strong>Hints From Belle</strong></h2>

<p>Belle said to me, about FOSSBilling, "If someone is going to use it, they should be technical and ideally be able to handle some PHP development."</p>

<p>Speaking of updates and changes, Belle advises FOSSBilling users to review the <a rel="nofollow" href="https://fossbilling.org/docs/changelog">FOSSBilling changelog</a> before updating. Changes occasionally affect people with customized installations, but people "using FOSSBilling as-is out of the box shouldn't really have such issues."</p>

<p>Last, but not least, Belle also advises reading the <a rel="nofollow" href="https://fossbilling.org/docs/faq">FOSSBilling FAQ.</a></p>

<h2><strong>Conclusion</strong></h2>

<p>FOSSBilling quickly and efficiently handled sign up, ordering, invoicing, and passing me to HestiaCP for provisioning. Support tickets and transactional emails from HostByBelle all worked as expected. FOSSBilling successfully kept track of payment and support transactions and also showed the history of each in clear interfaces. With HestiaCP, I quickly installed my above linked html test pages at HostByBelle and at YetiNode. Security certificates, like everything else, were easy.</p>

<p>Belle was super friendly and helpful via the HostByBelle FOSSBilling Support Tickets. <a href="https://lowendspirit.com/profile/AuroraZero" rel="nofollow">@AuroraZero</a> was, as always, wonderful, both via LES PMs and via email. Both <a rel="nofollow" href="https://hostbybelle.com">HostByBelle</a> and <a rel="nofollow" href="https://yetinode.com">YetiNode</a> are recommended for shared hosting.</p>

<p>FOSSBilling worked excellently from the perspective of a tester of shared hosting. The new era of a working, free, and open source billing platform has begun!</p>
]]>
        </description>
    </item>
    <item>
        <title>Hard Disks 101 - explained</title>
        <link>https://lowendspirit.com/discussion/6368/hard-disks-101-explained</link>
        <pubDate>Fri, 25 Aug 2023 23:30:11 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>bikegremlin</dc:creator>
        <guid isPermaLink="false">6368@/discussions</guid>
        <description><![CDATA[<p>In this article, I’ll explain most of the stuff related to hard disks, also known as HDD (Hard Disk Drive). If you are considering buying one or just wishing to learn about them, this should help.<br />
In a separate article, I've explained <strong><a rel="nofollow" href="https://io.bikegremlin.com/13914/disk-data-refresh/" title="how to refresh data on a hard disk">how to refresh data on a hard disk</a></strong> (BikeGremlin site link).</p>

<p><em>"Exited and prout to be posing my fist ever particle on LES."</em><br />
<img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /><br />
<a href="https://lowendspirit.com/profile/AlwaysSkint" rel="nofollow">@AlwaysSkint</a></p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/hard-disk-101.jpg" alt="" title="" /></p>

<p><a name="toc"></a></p>

<p><strong>Table Of Contents (T.O.C.):</strong></p>

<ol>
<li><a rel="nofollow" href="#1">Introduction and a bit of history</a></li>
<li><a rel="nofollow" href="#2">Hard Disk working principle</a><br />
2.1. <a rel="nofollow" href="#2.1">CMR vs SMR recording technology</a></li>
<li><a rel="nofollow" href="#3">The physical size</a></li>
<li><a rel="nofollow" href="#4">Connection interface standards</a><br />
4.1. <a rel="nofollow" href="#4.1">ATA</a><br />
4.2. <a rel="nofollow" href="#4.2">SCSI and SAS</a><br />
4.3. <a rel="nofollow" href="#4.3">SATA</a><br />
4.4. <a rel="nofollow" href="#4.4">NVMe</a><br />
4.5. <a rel="nofollow" href="#4.5">External drive connection standards</a></li>
<li><a rel="nofollow" href="#5">Hard disk performance basics</a></li>
<li><a rel="nofollow" href="#6">Hard disk technical specs</a><br />
6.1. <a rel="nofollow" href="#6.1">Cache memory size</a><br />
6.2. <a rel="nofollow" href="#6.2">Platter rotation speed</a><br />
6.3. <a rel="nofollow" href="#6.3">Seek time and latency</a><br />
6.4. <a rel="nofollow" href="#6.4">Sequential and random data transfer speed</a><br />
6.5. <a rel="nofollow" href="#6.5">Durability stats</a><br />
6.6. <a rel="nofollow" href="#6.6">Physical characteristics</a><br />
6.7. <a rel="nofollow" href="#6.7">Capacity</a><br />
6.8. <a rel="nofollow" href="#6.8">Air vs Helium</a></li>
<li><a rel="nofollow" href="#7">Hard disk buying recommendations</a></li>
<li><a rel="nofollow" href="#8">Conclusion</a></li>
</ol>

<p><a name="1"></a></p>

<h1>1. Introduction and a bit of history</h1>

<blockquote><div>
  <p>The 10-second attention span people who like to "just skim" articles might want to skip straight to the <a rel="nofollow" href="#2">chapter 2</a>.</p>
  
  <p>Relja BrevityIsNotMyVirtue Novović</p>
</div></blockquote>

<p>There was a time when people used tapes to store large amounts of data. The main downside of using a tape for storage is the difficulty of finding a certain file, without reading the entire tape - (re)winding only gets you so far. It was much like playing a music cassette tape or a gramophone record.</p>

<p>In 1957, IBM built the first commercially available hard disks. HDDs allowed people to read, edit, delete, or add data to any file stored on the drive "right away." This is called "<strong>random access</strong>" and we take it for granted nowadays, but it was a major breakthrough in storage technology.</p>

<p>Over the following two decades, tape storage fought hard, but eventually lost in the vast majority of categories. There still are use cases where tape storage is the optimal choice, but that is a topic for a separate article.</p>

<p>Of course, the first hard disks were behemoths, used in enterprise server rooms and resembling modern day washing machines more than anything else. Their 24 inch large media was spun using powerful motors. Fun fact: my father and I put one such hard disk motor on our lawn mower, back in the 90s when there was a fuel shortage in my country. That thing is still running nicely at the time of writing, using three-phase 50 Hz 220V power.</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/old-hard-disk-motor-still-working-2.jpg" alt="" title="" /><br />
An old hard disk motor - 1 horsepower, 3-phase power supply.<br />
...For the life of me, I can’t remember if it was from a Sperry-Univac, or a decade younger Honeywell-Bull system...<br />
Picture 1</p>

<p>Compare that to today’s 3.5" hard drives (and their smaller 2.5" laptop-friendly cousins). We’ve certainly come a long way. Nowadays, Solid State Drives (SSD) have replaced the traditional hard drive as the norm for most desktop computers and laptops. However, for storing large amounts of data, the good old <strong>hard disks are pretty much alive and kicking</strong> - with some more tech. improvements over the past few years. They are the stars of this article.  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="2"></a></p>

<h1>2. Hard Disk working principle</h1>

<blockquote><div>
  <p>I’ve seen programmers who don’t understand these concepts make an application that saves thousands of several-byte-small log files (i.e. very small files), and then get surprised to see the application take a huge amount of storage space. So, despite countless super-fast online programming courses, <strong>it helps to put some effort into understanding the hardware your stuff will be running on</strong>.</p>
  
  <p>Relja Novović - shower thoughts</p>
</div></blockquote>

<p>Let me briefly touch upon how these things work. A minute spent on the following text and pics  should help you more easily understand hard disk technical specs. Ready?</p>

<p>Hard disks, as their name says, have discs covered in magnetic material which can be magnetised to north (N) or south (S) polarity. These discs are also called <strong>platters</strong>. There can be two or more platters in a hard disk drive (modern 3.5" drives can have up to five platters).</p>

<p>Similarly to a gramophone, the platters spin, and there are heads that can move across their surface to perform reading or writing.<br />
Thanks to the damn hipsters, I hope that even the younger readers know what a gramophone is…</p>

<p><a name="p2"></a></p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/hard-disk-parts-sketch.png" alt="" title="" /><br />
Hard disk drive's basic parts drawing<br />
Picture 2</p>

<p>In the picture above, the DISK spins at over 5,000 rpm, while the R/W HEAD moves left-right, floating just about 10nm above its surface (and reading or writing data to it by using electromagnetic induction). When a hard disk drive is turned off, its heads are locked in place so they don’t hit the platters if the drive is transported. This is called <strong>parking</strong> the heads.</p>

<p>This part serves to introduce you to the technical terms you may hear: <strong>cylinders, tracks, and sectors</strong>. Alas, when you <strong>format</strong> a hard disk drive, you are logically dividing each platter into concentric <strong>tracks</strong> (imagine race tracks at the Olympics), and dividing each track into <strong>sectors</strong> (smaller sections along the track).</p>

<p>Every sector contains a set number of bytes (groups of eight digits that can only be a logical one or a logical zero). It’s usually 512 bytes on most file systems. Several sectors are grouped into a <strong>cluster</strong>, <strong>the smallest amount of disk’s storage space that can be taken by one file</strong>. If your cluster is, say 4096 bytes size, and you save a file that is only 1024 bytes large, it will still take up the entire cluster. However, if a file is 8192 bytes large, it will span across two 4094-byte clusters.</p>

<p>Before I totally confuse you by explaining what a cylinder is, a picture will explain it better:  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/hard-disk-tracks-sectors-and-cylinders-sketch.png" alt="" title="" /><br />
Hard disk's logical division: cylinders, tracks and sectors<br />
Image source: Wikipedia<br />
Picture 3</p>

<p>So, now you clearly understand what a cylinder is: a set of tracks on the same distance from the platter’s centre, across all the platters in the drive. <strong>Cylinders are no longer used for addressing hard disk storage</strong> - they have been replaced with logical block addressing (LBA), but that's a topic for a separate article.</p>

<p>Here's what that looks like in real life:</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/hard-disk-internals-shown.jpg" alt="" title="" /><br />
Hard disk internals photo<br />
Picture 4</p>

<p>Well, I hope you are now smarter than you were this morning. <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> Let us move on to the more “flashy” stuff.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="2.1"></a></p>

<h2>2.1. CMR vs SMR recording technology</h2>

<p>This one is rather important, especially if you value performance and reliability.</p>

<p>Remember what we’ve just said about tracks and how those are created in concentric circles on the platters when you format a hard drive? Each track contains sectors where bits are written and read from. That’s the old style, called <strong>CMR</strong> (Conventional Magnetic Recording).</p>

<p>Fact: you need more room (more track width) to write a bit to a track (i.e. polarize its magnetisation) than you need to read from it. That is why some genius thought it was a jolly good idea to have the tracks overlap! That is how <strong>SMR</strong> (Shingled Magnetic Recording) drives were born.</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/cmr-vs-smr-hard-disk-drives.png" alt="" title="" /><br />
CMR vs SMR system of writing and reading data from a hard disk's platter<br />
Picture 5</p>

<p>SMR lets you write about 25% more data on a given platter size, which lets you build larger capacity drives at a lower cost. <strong>What could possibly go wrong?</strong></p>

<p>Well, SMR relies on the fact that the head for reading can work with a narrower track. But when you need to write to a track, you will also rewrite the adjacent tracks. So, if you write data on an SMR drive track, and its adjacent tracks have some data, you would need to first read and rewrite that data too, in order to prevent data corruption. This makes <strong>SMR drives perform awfully poorly when writing if they are loaded with data</strong>.</p>

<p>Some manufacturers don't disclose when their drives are built using the SMR system. Make sure to double check and avoid buying such drives - at least that's what I do and recommend.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="3"></a></p>

<h1>3. The physical size</h1>

<blockquote><div>
  <p>3.5 inches is quite large.</p>
  
  <p>Japanese proverb</p>
</div></blockquote>

<p>Today, hard disks come in two formats: 2.5" and 3.5".</p>

<p>2.5" are the smaller ones with platters that spin slower, make less noise, heat and use less power. They are designed for use in laptops and portable (external) hard drive cases, and a part of this design is a more rugged mechanism of parking drive heads to avoid any damage in case of bumps or similar. Thanks to their lower power consumption, they can use a USB cable for power supply (handy for portable drives). An <strong>exception</strong> are server-grade 2.5" drives built to be compact, but work 24/7 in servers. Either option is more expensive per TB of storage space compared to 3.5" drives.</p>

<p>3.5" is the usual size for drives designed to be placed in desktop computers and many servers and NAS drives. These are generally faster, louder, require more power, but offer higher storage capacities for the price.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4"></a></p>

<h1>4. Connection interface standards</h1>

<blockquote><div>
  <p>The nicest thing about standards is that there are so many of them to choose from.</p>
  
  <p>Ken Olsen</p>
</div></blockquote>

<p>Gotta plug it in somehow, right? Let us go over some of the most widely used standards, starting with a couple of obsolete ones. Note that the given data transfer speed info is related to the connection's capacity, it doesn't mean every (or any compatible) drive can reach that speed.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4.1"></a></p>

<h2>4.1. ATA</h2>

<p>An obsolete standard. ATA (Advanced Technology Attachment) is the standardized name for what was also called PATA (Parallel ATA) and IDE (Integrated Drive Electronics). It uses a parallel connection, meaning several bits are transferred all at once. That is why ATA cables are flat and very wide.</p>

<p>ATA data transfer speeds go up to <strong>133 MB/s</strong>.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4.2"></a></p>

<h2>4.2. SCSI and SAS</h2>

<p>SCSI (pronounced as “scuzzy”) stands for “Small Computer System Interface.” The standard started gaining popularity during the ‘80s (20th century) as a fast, high-quality standard for enterprise storage, because it allowed a connection of a relatively large number of drives, often placed in RAID (Redundant Array of Inexpensive Disks).</p>

<p>It started as a high-speed parallel connection, but got updated over the years. Its latest version uses a serial connection. It’s called “Modern Serial Attached SCSI” (SAS) and the latest models reach data transfer speeds of up to <strong>1,875 MB/s</strong>. This stuff is (and always has been) expensive, and can be found in servers.</p>

<p>SAS interface can also accept SATA drives (though SATA interface won’t accept any SAS drives).</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4.3"></a></p>

<h2>4.3. SATA</h2>

<p>SATA (Serial Advanced Technology Attachment). This is the de facto current desktop and laptop storage connection standard. It uses a serial connection at a high frequency (and speed), and allows for thin and long (up to one metre) cables.</p>

<p>SATA data transfer speeds go up to <strong>600 MB/s</strong> (the latest, SATA III standard).</p>

<p>This interface is fast enough for most consumer-grade hard drives. If you are buying a HDD today, and reading this, you are most likely looking for a SATA HDD.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4.4"></a></p>

<h2>4.4. NVMe</h2>

<p>NVMe (Non-volatile Memory Express) was originally designed to work with SSDs (Solid State Drives). Unlike other storage media interfaces, NVMe lets you connect your drives directly to the CPU, using the PCIe interface. This allows for very low latencies and huge data transfer speeds of over <strong>10,000 MB/s</strong> over PCIe 5.0.</p>

<p>At the time of writing, it is mostly used for SSDs (using M.2 connection format), though some companies, like Seagate, are working on building a <a rel="nofollow" href="https://blog.seagate.com/enterprises/seagate-unveils-worlds-first-native-nvme-hdd-demo-at-ocp/" title="HDD that natively connects via NVMe">HDD that natively connects via NVMe</a>.</p>

<p>If you’d like to know more, Western Digital’s blog has a <a rel="nofollow" href="https://blog.westerndigital.com/nvme-important-data-driven-businesses/" title="great article on NVMe">great article on NVMe</a>.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="4.5"></a></p>

<h2>4.5. External drive connection standards</h2>

<p>Let’s do a quick overview of the connection standards for external drives (portable drives, NAS expansion units, and similar).</p>

<p><strong>FireWire</strong><br />
A standard launched by Apple, which has now become obsolete for reasons beyond the scope of this article. FireWire 800 standard could reach data transfer speeds of up to <strong>100 MB/s</strong>.</p>

<p><strong>USB</strong><br />
Current standard for connecting many external 2.5” drives is USB 3.1 with data transfer speeds of up to <strong>1,250 MB/s</strong>, while the newer USB 3.2 can go up to <strong>2,500 MB/s</strong> (older USB 1.0 and 2.0 standards are now practically obsolete).</p>

<p>Even newer USB4 standard comes in 20 Gbps (that is giga<strong>-bits</strong>, not giga-bytes per second) and 40 Gbps (<strong>5,000 MB/s</strong> - that is mega<strong>-bytes</strong> per second) variants (the 40 Gbps version requires the more expensive 40 Gbps cables).</p>

<p>There should also be a USB4 v 2.0 standard with speeds of 80 Gbps (<strong>10,000 MB/s</strong>), but I have never seen any appliances or even cables for that one.</p>

<p>Note, there is a USB C connector (physical connector) standard that often gets confused with the transfer speed standards of USB 3.1, 3.2, USB4 etc, but you technically could have the older, slower USB 3.1 working over a USB C physical connector.</p>

<p>USB is capable of supplying power over the same cable. USB A connector cables can supply up to 7.5W, while USB C connector cables can supply up to 100W or even 240W with the latest USB-C PD connector standard.</p>

<p><strong>Thunderbolt</strong><br />
This standard requires that your motherboard supports it (which is not as commonly the case as it is with USB 3.2 nowadays). It offers speeds of up to 40 Gbit/s (<strong>5,000 MB/s</strong>).</p>

<p>It connects by combining the PCIe and DP (DisplayPort) signals into two serial signals, and also provides the needed power supply of up to 100W - all using the same cable.</p>

<p>In practice, Thunderbolt connectors and equipment are not very widely used, at least in my experience.</p>

<p><strong>eSATA</strong><br />
Another standard that is getting obsolete (though <a rel="nofollow" href="https://www.synology.com/en-global" title="Synology">Synology</a> uses it for connecting some of their NAS expansion units). It doesn’t supply any power (so you need a separate power supply for the eSATA drives), though there is the eSATAp standard which does.</p>

<p>In its latest &amp; greatest version, eSATA standard provides data transfer speeds of up to <strong>600 MB/s</strong>.</p>

<p>I think this covers the standards you are most likely to encounter. Let us move on.</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/connection-standards-overview.png" alt="" title="" /><br />
Connector types overview<br />
Picture 6</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="5"></a></p>

<h1>5. Hard disk performance basics</h1>

<blockquote><div>
  <p>A child of five would understand this. Send someone to fetch a child of five.</p>
  
  <p>Groucho Marx</p>
</div></blockquote>

<p>Hard disks use spinning platters to store data. A read/write head moves up-down over the platter surface (see <a rel="nofollow" href="#p2">picture 2</a> for details). That is why they can read or write a lot faster if they are doing it all in one go. That is called <strong>sequential access</strong> reading/writing. If, on the other hand, they need to read a file (or files) dispersed over several non-adjacent sectors, that kind of reading/writing, called <strong>random access, is much slower</strong>.</p>

<p>Likewise, because reading only requires to, well, read the magnetic polarity of bits, while writing requires actual magnetisation of each bit, <strong>hard disk read speeds are a lot faster than their write speeds</strong>.</p>

<p>So, even if you buy the latest, greatest and fastest hard disk drive in the world, you should expect its random access speeds to be lower than its sequential access speeds, and its writing speeds to be lower than its reading speeds.</p>

<p>Manufacturers often state the most “optimistic” scenarios in their selling brochures, so it’s good to keep this in mind and double-check.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6"></a></p>

<h1>6. Hard disk technical specs</h1>

<blockquote><div>
  <p>There is no amount of memory that human stupidity can’t fill up.</p>
  
  <p>Živojin Novović, when we discussed our home PC’s hard disk upgrade</p>
</div></blockquote>

<p>In this “chapter,” I will cover the basic hard disk drive technical specifications, explain what each one means, how it affects the overall performance, and what its ballpark values are. I’ll use SATA drives as examples, since those are the most popular consumer and “prosumer” drives at the time of writing.</p>

<p>For brevity, I will not discuss every existing aspect of hard drives, but concentrate on the stuff you can quickly check and compare when deciding which drive to purchase.</p>

<p><a name="6.1"></a></p>

<h2>6.1. Cache memory size</h2>

<p>I have already explained <a rel="nofollow" href="https://io.bikegremlin.com/5621/optimization-03-caching/#1" title="what caching is">what caching is</a> (the context of that article was about website page caching, but the principle is the same). It boils down to using fast storage, such as RAM (Random Access Memory), to quickly store and retrieve data.</p>

<p>For a hard disk, this means: when you want to save a file, you just send it to the drive’s cache and call it a day, letting the drive worry about writing it to its platters for a permanent storage.</p>

<p>A similar thing happens when you are reading data from the drive. Say you open the document “pigeon-deliveries-june.doc”. Drives have smart controllers that can predict the likelihood of you requesting a file such as "pigeon-deliveries-july.doc" next, letting them take the time to read that file and load it into the drives cache, so you can retrieve it quickly if you decide to.</p>

<p>Caching, especially for reading files, is a hit-and-miss, but it can often help provide a faster perceived performance - i.e. despite the drive having the same read speed, you will effectively read and write your files faster, thanks to the use of cache.</p>

<p>Of course, cache memory is a lot more expensive than platter storage space, so even 1,048,576MB (about 1TB) large drives often come with only 64 MB of cache. That is why <strong>cache can’t help when reading or writing large amounts of data</strong>. Having said that, since hard disks are the slowest when writing, and most users write (save) a lot of smaller files at irregular intervals, cache helps a lot in practice.</p>

<p>Cache size usually depends on the drive's total storage capacity (larger drives have more cache memory). <strong>Typical cache size ranges from 32MB for lower end 1TB drives, to 256MB for larger capacity or high-end drives</strong>. More cache costs more, but manufacturers usually provide the optimal ratio based on drive’s capacity and intended use.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.2"></a></p>

<h2>6.2. Platter rotation speed</h2>

<p>The faster drive’s platters spin, the faster you can read/write data (sequential read/write), and the less time it takes for the sector with the needed data to reach the reading/writing head (for random access). However, higher rotation speed also requires more power, and creates more heat and noise.</p>

<p><strong>Typical speeds are 5,400 and 7,200 RPM, though some enterprise (SAS) drives spin up to 15,000 RPM</strong>.</p>

<p>Because of the extra noise, <strong>faster needn’t always be better</strong>, it depends on your use case.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.3"></a></p>

<h2>6.3. Seek time and latency</h2>

<p>We know that read/write heads move across the platters. This takes time. Moving from one track to the next is a lot faster than moving from the outermost all the way to the innermost track. So, we have:</p>

<ul>
<li><strong>Track-to-track seek time</strong>: often below <strong>2ms</strong>.</li>
<li><strong>Average seek time</strong>: often about <strong>5ms</strong>.</li>
</ul>

<p>For some reason, seek time specs are next to impossible to get for most modern drives.</p>

<p>Now, since the platters are spinning, it might take some time for the sector you need to come under the reading head. Average time taken for this to happen is called the <strong>average rotational latency</strong>. For a drive that spins at 5,400 RPM, that is 60 (seconds) divided by 5,400, divided by 2 (to get the average). So, about 5.55ms. This goes down to <strong>4.16ms</strong> for 7,200 RPM drives, and as low as 2ms for the 15,000 RPM drives.</p>

<p>Do not mix this rotational latency with the <strong>average read/write latency</strong>, which is:</p>

<ul>
<li>how long it takes for the drive's controller to figure out where the required block of data is on the platters,</li>
<li>move the read/write head to it,</li>
<li>and start data read/write process (transfer).</li>
</ul>

<p>Average read latencies often go to about <strong>30ms</strong> (and max. latencies can be as high as up to one second), while average write latencies can be ten times longer, so about <strong>300ms</strong>.</p>

<p>These stats affect random read/write performance, but don’t affect sequential read/write performance.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.4"></a></p>

<h2>6.4. Sequential and random data transfer speed</h2>

<p><strong>Data transfer speed</strong> provided by manufacturers is basically average sequential read/write speed. It is often around <strong>200 MB/s</strong> for modern drives. Drives that spin faster usually have a bit higher "data transfer speed" (i.e. average sequential read/write data transfer rate).</p>

<p><strong>Random read/write performance</strong> gives data transfer speeds that are about <strong>1%</strong> (one percent) of the sequential read/write speeds (so about 2 MB/s). These are often expressed in IOPS (Inputs and Outputs Per Second). In another article I've <a rel="nofollow" href="https://io.bikegremlin.com/7725/hosting-catches/#1.4" title="explained IOPS">explained IOPS</a> in more detail.</p>

<p>IOPS results differ based on the size of data blocks being read or written, but let's say that ballpark values are in hundreds of IOPS, and that with modern drives, write performance gives more IOPS thanks to the good use of caching. When a disk reads, it needs to read the given files wherever they are, often doing a lot of back-and-forth. When it writes, the data is stored in cache and then written in a more optimized way (less "random" write head movement).</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.5"></a></p>

<h2>6.5. Durability stats</h2>

<p>These are the stats related to durability. Note that these stats have more to do with the drive’s intended use than its actual quality (I’ll go to recommend models later on).</p>

<p><strong>Power on hours per year</strong><br />
8,760 is for drives designed to work 24/7 (NAS and enterprise/server drives).<br />
2,400 is for drives intended for personal or business computers (about 8 hours of daily use).</p>

<p><strong>Unrecoverable read errors per bits read (URE)</strong><br />
This is basically the probability of a drive not being able to read a piece of written data (even with error correction attempted). 1 bit errror in 10^14 bits read is the usual number for consumer grade drives, while 1 in 10^15 or 10^16 is more common for NAS and enterprise/server grade drives.</p>

<p>In theory, 1 in 10^14 means there will be an error for every ~ 12 TB of data written, but as I said at the start of this “chapter,” this info has more to do with a drive’s intended use and manufacturer’s warranty, than it does with the actual durability and reliability of the drive.</p>

<p><strong>Workload Rate Limit (WRL)</strong><br />
How many terabytes (TB) per year you can read or write to the drive. Consumer grade stuff is good for about <strong>50TB</strong>, while the enterprise stuff is rated at <strong>150TB</strong> per year or more.</p>

<p><strong>Mean Time Between Failures (MTBF)</strong><br />
The arithmetic mean (average) of time between failures. Usually expressed in hours, and ranges around one million. Based on my knowledge and experience, this metric can be disregarded.</p>

<p>A stat that is actually useful (but it is not provided by drive manufacturers) is the <strong>Average Failure Rate (AFR)</strong>. Unfortunately, to get this data, you would need a ton of input from service centres around the world. Or rely on Backblaze quarterly stats (<a rel="nofollow" href="https://www.backblaze.com/blog/backblaze-drive-stats-for-q2-2023/" title="Backblaze 2023 Q2 stats link">Backblaze 2023 Q2 stats link</a>) if they have used a drive that you are looking to buy.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.6"></a></p>

<h2>6.6. Physical characteristics</h2>

<p>Apart from the size (form factor) explained in <a rel="nofollow" href="#3">chapter 3</a>, these are some other important disk drive physical characteristics.</p>

<p><strong>Power consumption</strong><br />
How many watts the drive consumes when working on <strong>average</strong> (from about <strong>5W to 10W</strong> or more for the larger enterprise grade drives). Faster spinning drives consume more power. Air filled drives (as opposed to helium filled ones) consume more power, since air creates more drag.</p>

<p><strong>Noise (Acoustics)</strong><br />
Drives make noise when they are spinning, and even more noise when they are reading or writing. This noise level is expressed in A-weighted decibels (dBA). dB scale is logarithmic, meaning a 10 dB increase means 10 times louder, while a 20 dB increase means 100 times louder (10 times 10).</p>

<p>For example, 20 dBA is whisper, 60 dBA is normal conversation, and 100 dBA is a loud motorcycle.</p>

<p>Most drives are below 30 dBA when idling, and above 30 dBA when reading. But even a couple of dBA difference is noticeable, as explained in the previous paragraph. 20 dBA idle and 25 dBA when reading/writing is considered to be very quiet for hard drives.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.7"></a></p>

<h2>6.7. Capacity</h2>

<p>Modern hard disk storage capacity is expressed in terabytes (TB). TB is a thousand megabytes (MB). Some smaller models have sizes of 500 MB or similar, but those are getting obsolete. Modern drives range from one to a dozen or more TB.</p>

<p>Larger capacity drives often have more platters, consume more power and cost more.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="6.8"></a></p>

<h2>6.8. Air vs Helium</h2>

<p>For decades, hard disks had a small hole (with a dust filter) to let the air move in and out (as the inside air temperature changes). Read/write heads float at about a dozen nanometres above the platters. If the air becomes too thin (at high altitudes), air-filled drives will not work properly, their heads will drop and scratch the platters.</p>

<p>Helium, unlike air, is more stable and provides a lot less drag as the drive platters spin (and its read/write head moves).</p>

<p>The problem with helium is that its molecules are so tiny, that it is very difficult to keep it from seeping out of the hard drive’s case. Some extraordinary high tech. advancements over the past decade have allowed manufacturers to seal their hard disk drive units well enough for the damn gas to stay inside. And voila, today we have helium filled drives.</p>

<p>Helium filled drives make less noise, use less power (all thanks to the lower drag), and, because they are completely sealed, can operate safely in low pressure environments. Making the tight seal costs more, so at the time of writing, only high-capacity drives (10TB or more) come helium filled.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="7"></a></p>

<h1>7. Hard disk buying recommendations</h1>

<blockquote><div>
  <p>I am not rich enough to buy cheap stuff.</p>
  
  <p>English proverb ( <em>if this one doesn't get me banned, nothing will!</em>  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" />  )</p>
</div></blockquote>

<p>In this article I'll say what I would buy (or have bought). I am not in a position to test dozens of models, but I work with computers for a living, and I like listening to people: service technicians, system administrators (and the good folks of the LowEndSpirit forum <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> ).</p>

<p><strong>How big?</strong><br />
If at all possible, for sizes of 2TB or smaller, do not buy a hard disk drive, get an NVMe or at least a SATA SSD. Today, hard disks make sense for <strong>4TB or larger sizes</strong>.</p>

<blockquote><div>
  <p>For a NVMe SSD, I use and recommend <a rel="nofollow" href="https://www.amazon.com/Samsung-970-EVO-Plus-MZ-V7S2T0B/dp/B07MFZXR1B?content-id=amzn1.sym.7d2e00dd-9358-4f89-aca0-04685eb73811%3Aamzn1.sym.7d2e00dd-9358-4f89-aca0-04685eb73811&amp;crid=11BKNETITYL8V&amp;cv_ct_cx=samsung%2Bevo%2B970&amp;keywords=samsung%2Bevo%2B970&amp;pd_rd_i=B07MFZXR1B&amp;pd_rd_r=a3d5dec9-f62d-4220-9e67-129adab39f11&amp;pd_rd_w=gpL58&amp;pd_rd_wg=4P27z&amp;pf_rd_p=7d2e00dd-9358-4f89-aca0-04685eb73811&amp;pf_rd_r=SKETS09ZGCHKDH9PWAZ1&amp;qid=1692769610&amp;sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&amp;sprefix=samsung%2Bevo%2B970%2Caps%2C244&amp;sr=1-1-5f457e4f-4cf5-45bd-948b-58563dcb013a&amp;ufe=app_do%3Aamzn1.fos.006c50ae-5d4c-4777-9bc0-4513d670b6bc&amp;th=1&amp;linkCode=ll1&amp;tag=ciklogremlin-20&amp;linkId=0b3e30ccce7b8761402e2f29cf284e81&amp;language=en_US&amp;ref_=as_li_ss_tl" title="Samsung EVO 970 Plus">Samsung EVO 970 Plus</a> (Amazon affiliate link). It costs well under $100 for the 2TB version, it is super-reliable and far from slow, even under high loads. Note that it supports PCIe 3 speeds only, but for most use cases that means less heat, and performance that is more than good enough.</p>
  
  <p>PCIe 4 gives a sequential read/write speed boost due to a higher bandwidth, but for general use (i.e. many random read/write operations) it gives next to no benefits (also, PCIe 3 NVMe drives are also pretty fast even for sequential read/write).</p>
  
  <p><em>My opinion:<br />
  At the time of writing I can not recommend a PCIe 4 (or PCIe 5) NVMe drives in good faith. Many models of many manufacturers have problems with heating and reliability - and as the heat rises, you throttle back to PCIe 3 speeds or lower. Samsung has a price premium which is more than worth it for the above-recommended EVO 970 Plus model, but their PCIe4 drives had problems and I'm still not sure how reliable they are despite the firmware updates published after a public outrage.</em><br />
  <strong>UPDATE, December 2023:</strong><br />
  <a rel="nofollow" href="https://www.amazon.com/gp/product/B0CHHFR1LG?th=1&amp;linkCode=ll1&amp;tag=ciklogremlin-20&amp;linkId=b02b3f0ccec87c40b050eec12787e7e8&amp;language=en_US&amp;ref_=as_li_ss_tl" title="Samsung 990 PRO Heatsink">Samsung 990 PRO Heatsink</a> (Amazon affiliate link) looks promising (I’m yet to test it personally). Hardware-supported encryption, and, as far as I know, no firmware-related problems that plagued some Samsung NVMe models. It comes in a 4TB version (along with the 1TB and 2TB alternatives), and a <strong>built-in heatsink</strong> (good cooling is important for PCIe Gen4 speeds). <strong>If I were buying a new system drive today, I’d go with the 4TB version of this one</strong>.</p>
</div></blockquote>

<p><strong>Which brand (manufacturer)?</strong><br />
I'll start with <strong>Toshiba</strong>. Their drives are on the noisier side, but I've had great results with them in terms of reliability and durability. Batches that are sold in my country (and Hungary for that matter) seem to have the lowest percentage of "lemons."</p>

<p>Seagate is another decent manufacturer I've had good results with.</p>

<p>Western Digital (WD) is a highly renowned manufacturer, but I have not had very good results with them.</p>

<p>The thing is: I am only one person. Sure, decades of experience, but that still doesn't make for a statistically useful data. Also, many manufacturers make a blunder every now and then. So I would argue that the <strong>manufacturer is not nearly as important as the particular model</strong>. At the time of buying, see which models perform well and are reliable. If you can normally go and talk to people who deal with warranties of large hardware stores, they will probably be able to tell you which models get the lowest number of returns (though, keep in mind that expensive models get sold a lot less, so them having fewer returns doesn't always mean they are more reliable).</p>

<p><strong>Concrete model recommendations</strong><br />
See the paragraph above to understand the limitations of recommendations like this. With that out of the way, you should also know that most manufacturers have turned to <a rel="nofollow" href="#2.1">SMR recording technology</a> for their consumer-grade drives. I would recommend you <strong>avoid SMR drives</strong>. They are not worth the savings.</p>

<p><em>My opinion:<br />
That makes perfect sense in capitalism: making the low and mid-priced stuff be less durable and less reliable, and practically "forcing" people to buy the more expensive stuff.</em></p>

<p>For larger storage capacities, I would recommend <a rel="nofollow" href="https://www.amazon.com/Seagate-IronWolf-7200RPM-Internal-3-5-Inch/dp/B07H241VJY?crid=GI5MWRK3JNBV&amp;keywords=seagate%2Bironwolf%2B12%2BTB&amp;qid=1692998571&amp;s=electronics&amp;sbo=RZvfv%2F%2FHxDF%2BO5021pAnSA%3D%3D&amp;sprefix=seagate%2Bironwolf%2B12%2Btb%2Celectronics%2C180&amp;sr=1-4&amp;th=1&amp;linkCode=ll1&amp;tag=ciklogremlin-20&amp;linkId=c77a3f5c63b4b6a3e2f16d4bb861f967&amp;language=en_US&amp;ref_=as_li_ss_tl" title="Seagate IronWolf 12TB NAS">Seagate IronWolf 12TB NAS</a> (Amazon affiliate link - 'cause yachts won't pay for themselves! - though <strong>for the US folks, I would recommend buying directly from the manufacturer to get a better and longer warranty protection</strong>) or higher capacity IronWolf models if you need more storage.</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/seagate-ironwolf-12tb-nas-drive.jpg" alt="" title="" /></p>

<p>If you wish to save some money or don't need that much storage space, you could go with a smaller, <a rel="nofollow" href="https://www.amazon.com/Seagate-IronWolf-7200RPM-128MB-3-5-Inch/dp/B07H2FPFW5?crid=3MFAAGM234D2Z&amp;keywords=seagate+ironwolf+4tb&amp;qid=1692998344&amp;s=electronics&amp;sprefix=seagate+ironwolf+4tb%2Celectronics%2C191&amp;sr=1-4&amp;ufe=app_do%3Aamzn1.fos.f5122f16-c3e8-4386-bf32-63e904010ad0&amp;linkCode=ll1&amp;tag=ciklogremlin-20&amp;linkId=497766b59566446d5cefe092a4036515&amp;language=en_US&amp;ref_=as_li_ss_tl" title="Seagate IronWolf 4TB NAS">Seagate IronWolf 4TB NAS</a> drive (Amazon affiliate link).</p>

<p>Alternatively, if you don't mind a bit more noise, you can't go wrong with Toshiba N-series drives, like <a rel="nofollow" href="https://www.amazon.com/Toshiba-N300-3-5-Inch-Internal-Drive/dp/B099PB3F5J?crid=19K0J9G138WKX&amp;keywords=toshiba%2BN300%2B4tb&amp;qid=1692999921&amp;s=electronics&amp;sprefix=toshiba%2Bn300%2B4tb%2Celectronics%2C181&amp;sr=1-2&amp;th=1&amp;linkCode=ll1&amp;tag=ciklogremlin-20&amp;linkId=8b159490ce130dfdf8700d83eb6f93b7&amp;language=en_US&amp;ref_=as_li_ss_tl" title="Toshiba N300 4TB NAS">Toshiba N300 4TB NAS</a> (Amazon affiliate link).</p>

<p><img src="https://io.bikegremlin.com/wp-content/uploads/2023/08/toshiba-n300-4tb-nas-hard-disk.jpg" alt="" title="" /></p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p><a name="8"></a></p>

<h1>8. Conclusion</h1>

<p>As with many of my other articles, this one too serves primarily as my own reminder and reference. I will try to keep it up-to-date and correct any errors - my articles aren't written by AI or "content writers," and English is not my native as you have probably figured out by now.  <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p>If you have questions, additions and, especially, corrections - please post a comment.</p>

<p><a rel="nofollow" href="#toc">- T.O.C. -</a></p>

<p>Relja Novović - about the author:<br />
<a href="https://www.bikegremlin.com/about/" rel="nofollow">https://www.bikegremlin.com/about/</a></p>
]]>
        </description>
    </item>
    <item>
        <title>How to Install and Modify Plan 9 from Bell Labs inside Qemu to see the leftovers from old Unix!</title>
        <link>https://lowendspirit.com/discussion/9171/how-to-install-and-modify-plan-9-from-bell-labs-inside-qemu-to-see-the-leftovers-from-old-unix</link>
        <pubDate>Sat, 01 Mar 2025 01:08:10 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">9171@/discussions</guid>
        <description><![CDATA[<p><img src="https://lowendspirit.com/uploads/editor/61/q6yaym054n48.png" alt="" title="" /></p>

<p><strong>What?</strong></p>

<p><a rel="nofollow" href="https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs">Plan 9 from Bell Labs</a> is an operating system from the creators of the <a rel="nofollow" href="https://en.wikipedia.org/wiki/C_(programming_language)">C Programming Language</a> and the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Unix">Unix operating system.</a></p>

<p>Although Plan 9 revolutionized many aspects of Unix, it nevertheless still remains possible in 2025 for Unix fans to access aspects of old Unix by installing Plan 9 inside <a rel="nofollow" href="https://www.qemu.org/">Qemu</a> and changing the Plan 9 boot procedure so that Plan 9 stays in the terminal rather than starting a graphical monitor.</p>

<p><strong>Why?</strong></p>

<ul>
<li><p>This method provides a text-only terminal with "infinite" scrollback. Infinite scrollback is how <a rel="nofollow" href="https://en.wikipedia.org/wiki/Teletype_Model_33">paper terminals</a> used to work before the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Curses_(programming_library)">curses interface</a> and the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Graphical_user_interface">Graphical User Interface ("GUI")</a> were invented.</p></li>
<li><p>Plan 9 runs on the i386 processor architecture in addition to many other architectures.</p></li>
<li><p>Plan 9 has very few system calls compared to other operating systems.</p></li>
<li><p>Plan 9 comes with full source code and build tools.</p></li>
<li><p>The code for Unix userland utilities which remain in Plan 9 is shorter than later versions.</p></li>
<li><p>Plan 9 is fast!</p></li>
</ul>

<p><strong>Why not?</strong></p>

<ul>
<li>This method, which perhaps involves the conflation of text and terminal, is arguably a complete misunderstanding of everything that's truly the greatest about Plan 9. See <a rel="nofollow" href="https://news.ycombinator.com/item?id=11883092">this excellent discussion</a> (but be a little careful when reading, because possibly not everything that's said is 100% correct).</li>
</ul>

<p><strong>How?</strong></p>

<p>Download Plan 9. Options include the classic Plan 9 from Bell Labs (used here, see links just below), as well as, probably, <a rel="nofollow" href="http://9legacy.org/download.html">9legacy</a> and <a rel="nofollow" href="https://9front.org/iso/">9front</a>, neither of which were tested for this post.</p>

<pre><code>wget http://9p.io/plan9checksums.txt 
wget http://9p.io/plan9/download/plan9.iso.bz2

# md5 sum for the bz2 file used here:
# 5183b2d0f11fded871461416f8c78cfb  plan9.iso.bz2
</code></pre>

<p>Make a qemu disk image for our Plan 9 install.</p>

<pre><code># qemu-img create -f qcow2 plan9-console.qcow2 10G
</code></pre>

<p>Use your favorite VNC app set to localhost:5900. Relaunch the app if it crashes when Plan 9 switches from terminal to grraphics.</p>

<pre><code># ssh tom@toto -L 5900:localhost:5900 # VNC via ssh tunnel to your server from your local machine.
</code></pre>

<p>Install Plan 9. Usually it's easy, just boot the ISO and accept the defaults. There are lots of tutorials and videos about the installing Plan 9. Here below is a qemu command to start the install. This command doesn't use KVM. Not using KVM makes slower output, which is easier to read, but you might need to wait a minute for longer operations. If you wish, add KVM with <code>-enable-kvm</code>.</p>

<pre><code>qemu-system-i386 \ 
  -vnc 127.0.0.1:0 \ 
  -hda plan9-console.qcow2 \
  -cdrom plan9.iso \
  -boot d
</code></pre>

<p>After Plan 9 is installed, you see the graphical Plan 9 (screenshot above). Edit plan9.ini with the <a rel="nofollow" href="https://9p.io/magic/man2html/1/vt">Plan 9 VT-100 emulator</a> and the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Ed_(software)">ed editor.</a></p>

<pre><code># In the Plan 9 rio terminal, type vt
# In the vt terminal, type '9fat:' (Don't forget the colon!)
# ed /n/9fat/plan9.ini : 
#   - remove last two lines (monitor, and size)
#   - add a line which says console=0
</code></pre>

<p>After you change plan9.ini, you don't need VNC, just ssh into your server and run Qemu.</p>

<pre><code>qemu-system-i386 \ # Not using KVM makes slower output, which is easier to read.
  -nographic \
  -hda plan9-console.qcow2 \
  -boot c
</code></pre>

<p>Here below is the output of the above. We can launch the Plan 9 versions of old Unix commands like <code>awk</code> and <code>ed</code>. We can get infinite scrollback, almost like a paper terminal.</p>

<pre><code>tom@toto:~/plan9$ cat 20250228a-boot-messages
# 20250228 Boot Plan9 in Qemu with plan9.ini changed to remain in host node shell

tom@toto:~/plan9$ ./start-plan9-console

SeaBIOS (version 1.16.3-debian-1.16.3-2)


iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+06FC6F60+06F06F60 CA00



Booting from Hard Disk...
MBR...PBS1...
Plan 9 from Bell Labpcirouting: BIOS workaround: PCI.0.1.3 at pin 1 link 96 irq 10 -&gt; 9
 disk loader

cpu0:  3091MHz GenuineIntel Celeron (cpuid: AX 0x0663 DX 0x781ABFD)
ELCR: 0C00
497M memory: 497M kernel data, 0M user, 18M swap
found partition #S/sdC0/data 0 20,971,520
disks: sdC0 sdD0
trying sdC0....found 9pcf
.1121326.....................................................................................................0
entry: 0xf0100020

Plan 9
E820: 00000000 0009fc00 memory
E820: 0009fc00 000a0000 reserved
E820: 000f0000 00100000 reserved
E820: 00100000 07fe0000 memory
E820: 07fe0000 08000000 reserved
E820: fffc0000 100000000 reserved
cpu0:  3096MHz GenuineIntel Celeron (cpuid: AX 0x0663 DX 0x781ABFD)
ELCR: 0C00
igbe: p-&gt;cls 0x0, setting to 0x10
#l0: i82543: 1Gbps port 0xFEB00000 irq 11: 525400123456
128M memory: 54M kernel data, 74M user, 297M swap
usbinit...usbd.../boot/usbd: /dev/usb: no hubs
no /srv/usb...no usb disk...pickmethod...read #e/nobootprompt...read #e/bootargs...outin...root is from (tcp,[ . . . copy paste error] 
pickmethod done
bind #æ...bind #S...partinit...auth...user[none]: glenda
usbinit...usbd.../boot/usbd: /dev/usb: no hubs
no /srv/usb...no usb disk...mount usbd...boot: can't open /srv/usb: '/srv/usb' file does not exist
time...
fossil(#S/sdC0/fossil)...version...can't stat /srv/partfs.sdXX: '/srv/partfs.sdXX' file does not exist

init: starting /bin/rc
rio: can't open display: initdisplay: /dev/draw/new: no frame buffer
init: rc exit status: rio 30: display open

init: starting /bin/rc
term% who am i
glenda
term% awk 
Usage: awk [-F fieldsep] [-mf n] [-mr n] [-v var=value] [-f programfile | 'program'] [file ...]
term% ed
a
hello
.
w hello
6
Q
term% ls -l hello
--rw-rw-r-- M 8 glenda glenda 6 Feb 28 21:07 hello
term% fshalt
syncing.../srv/fscons...prompt: 
halting.../srv/fscons...
prompt: 
done halting
Ctrl-a x # Quit qemu
tom@toto:~/plan9$ 
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>Quick Recipe For Self-Compiled NetBSD-current On A Linveo VPS</title>
        <link>https://lowendspirit.com/discussion/8525/quick-recipe-for-self-compiled-netbsd-current-on-a-linveo-vps</link>
        <pubDate>Wed, 06 Nov 2024 00:56:33 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">8525@/discussions</guid>
        <description><![CDATA[<h2>Quick Recipe For Self-Compiled NetBSD-current On A Linveo VPS</h2>

<p><img src="https://lowendspirit.com/uploads/editor/hy/50xjrfom6n2s.png" alt="" title="" /></p>

<p><a rel="nofollow" href="https://linveo.com">Linveo</a> kindly provided several free VPSes to guys actively posting in the <a rel="nofollow" href="https://lowendspirit.com/discussion/8278/les-bsd-thread/p1">LES BSD Thread.</a> Linveo also kindly added <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a>'s NetBSD 10 Minimum image. As shown above, NetBSD 10 Minimum now easily can be installed at Linveo directly from "Other BSD" category on the Rebuild page of vmcontrol.linveo.com.</p>

<p>After installing <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a>'s NetBSD 10 Minimum image, with help from the NetBSD Guide references linked below, I followed the steps listed below to upgrade from NetBSD 10 to self-compiled NetBSD-current.</p>

<p>Getting to self-compiled NetBSD-current requires us to add to the NetBSD 10 Minimum VPS a NetBSD 10 compiler, other build tools, and the source code for both the NetBSD-current kernel and the NetBSD-current userland. Then a NetBSD-current compiler and other build tools are compiled by the NetBSD 10 compiler. Next, the newly compiled NetBSD-current build tools are used to build the NetBSD-current kernel and the NetBSD-current userland. The end result is a NetBSD-current VPS running its own code as compiled on itself by its own compiler.</p>

<p>My Linveo VPS seems to reboot and to run normally following the upgrade to NetBSD-current. There seems to be plenty of space remaining available, though the X sources and pkgsrc haven't yet been added:</p>

<pre><code>linveo# df -h .
Filesystem     Size   Used  Avail %Cap Mounted on
/dev/dk2        48G    10G    35G  22% /
linveo# 
</code></pre>

<div>  <p>Installing <code>pkgsrc</code> added 1 G to the usage:</p>

<pre><code>linveo$ CVS_RSH=ssh cvs -danoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc
  [ . . . ]
linveo$ df -h .
Filesystem     Size   Used  Avail %Cap Mounted on
/dev/dk2        48G    11G    35G  24% /
linveo$ 
</code></pre></div>

<ul>
<li>Issue</li>
</ul>

<p>The biggest issue that I know about with respect to the NetBSD-current upgrade proposed here relates to the <code>etcupdate</code> command, which is the last command in the sequence below.</p>

<p><code>etcupdate</code> is an <code>sh</code> shell script. There also is a man page, which mentions that the idea for <code>etcupdate</code> came from FreeBSD's <code>mergemster</code>.</p>

<p>I need to figure out how to set options making <code>etcupdate</code> faster and easier to run within the limited scope of this single CPU architecture NetBSD-current upgrade. The VPS is not attempting to build the full multi-architecture NetBSD panopoly. Perhaps limiting the <code>etcupdate</code> source directory to my VM's amd64 architecture might help. Perhaps -- as recommended in the man page -- running <code>etcupdate</code> on a <code>tar</code> file instead of directly on the sources also might help.</p>

<ul>
<li>NetBSD 10 Image</li>
</ul>

<p>Here are links to <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a>'s NetBSD 10 image and to a discussion of how the image was made:</p>

<p><a href="https://lowendspirit.com/discussion/comment/187386/#Comment_187386" rel="nofollow">https://lowendspirit.com/discussion/comment/187386/#Comment_187386</a><br />
<a href="https://lowendspirit.com/discussion/comment/187452/#Comment_187452" rel="nofollow">https://lowendspirit.com/discussion/comment/187452/#Comment_187452</a></p>

<ul>
<li>NetBSD Guide Reference Links</li>
</ul>

<p>Here are reference links to the very helpful NetBSD Guide:</p>

<p><a href="https://www.netbsd.org/docs/guide/en/chap-fetch.html#chap-fetch-cvs-netbsd-release" rel="nofollow">https://www.netbsd.org/docs/guide/en/chap-fetch.html#chap-fetch-cvs-netbsd-release</a><br />
<a href="https://www.netbsd.org/docs/guide/en/chap-updating.html" rel="nofollow">https://www.netbsd.org/docs/guide/en/chap-updating.html</a></p>

<ul>
<li>Adding Compilers To The NetBSD 10 Image</li>
</ul>

<p>Here is the LES comment where <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a> showed us the one line command used below to add NetBSD 10 compilers to the NetBSD 10 base image:</p>

<p><a href="https://lowendspirit.com/discussion/comment/186774/#Comment_186774" rel="nofollow">https://lowendspirit.com/discussion/comment/186774/#Comment_186774</a></p>

<ul>
<li>Recipe</li>
</ul>

<p>Here are the steps I followed to convert a clean, new Linveo VPS install of <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a>'s NetBSD 10 image to what seems to be self-compiled NetBSD-current:</p>

<ul>
<li>Run as root to install a compiler, create needed directories, and an unprivileged user</li>
</ul>

<pre><code>ftp -o - https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/amd64/binary/sets/comp.tar.xz | progress -z tar xpf - -C /
cd /usr
mkdir obj src tools
mkdir /home
useradd -m -G wheel tom
passwd tom
chown tom obj src tools
su tom 
</code></pre>

<ul>
<li>Run as the unprivileged user which owns the <code>obj</code>, <code>src</code>, and <code>tools</code> subdirectories</li>
</ul>

<pre><code>export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot"
export CVS_RSH="ssh"
cvs checkout -A -P src
cd src
less UPDATING
./build.sh -j 2 -O ../obj -T ../tools -U distribution
./build.sh -j 2 -O ../obj -T ../tools -U kernel=GENERIC
</code></pre>

<ul>
<li>Back to root to install and reboot to use our newly compiled NetBSD-current kernel</li>
</ul>

<pre><code>mv /netbsd /netbsd.old
mv /usr/obj/sys/arch/amd64/compile/GENERIC/netbsd /
shutdown -r now
</code></pre>

<ul>
<li>As root, install and reboot to run the newly compiled NetBSD-current userland</li>
</ul>

<pre><code>cd /usr/src
./build.sh -j 2 -O ../obj -T ../tools -U install=/
shutdown -r now
</code></pre>

<ul>
<li>As root, <code>postinstall</code></li>
</ul>

<pre><code>/usr/sbin/postinstall -s /usr/src check
/usr/sbin/postinstall -s /usr/src fix
</code></pre>

<ul>
<li>As root, <code>etcupdate</code></li>
</ul>

<pre><code>/usr/sbin/etcupdate -s /usr/src
</code></pre>

<p>Please point out any mistakes.</p>

<p>Any questions, please ask.</p>

<p>Thanks <a href="https://lowendspirit.com/profile/linveo" rel="nofollow">@linveo</a> for the nice VPS! Thanks <a href="https://lowendspirit.com/profile/cmeerw" rel="nofollow">@cmeerw</a> for the NetBSD 10 Minimum image! Thanks to the <a rel="nofollow" href="https://NetBSD.org">NetBSD project!</a> And thanks to LES!</p>
]]>
        </description>
    </item>
    <item>
        <title>How-to virtualize opnsense on proxmox</title>
        <link>https://lowendspirit.com/discussion/6682/how-to-virtualize-opnsense-on-proxmox</link>
        <pubDate>Sat, 28 Oct 2023 19:22:43 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>havoc</dc:creator>
        <guid isPermaLink="false">6682@/discussions</guid>
        <description><![CDATA[<p>Busy re-doing my firewall setup &amp; taking notes. Thought I'd turn that into a mini-tutorial, noting that pieces may be a little <a rel="nofollow" href="https://www.reddit.com/r/funny/comments/eccj2/how_to_draw_an_owl/">rest of the fkin owl</a>. If you spot a gap...ask and I'll fill it in.</p>

<p><strong>Why</strong></p>

<p>The gear I've got for firewall is stupidly overkill (optane drive &amp; 16GB RAM) for something that is 99% idle so I want to stick a couple other things on the same hardware via proxmox.</p>

<p><strong>Assumed knowledge and requirements</strong></p>

<p>Proxmox, linux cli, basic networking, (very basic) firewall knowledge. Nothing here is super hardcore technically as such...just unforgiving in sequence &amp; details if unfamiliar hence notes. i.e. when it doesn't work it's not obvious where you fkd up.</p>

<p>Bring backups &amp; loads of time. Frankly...assume that you'll fu.ck this up if you haven't done this before. So this is a Saturday morning project not a Sunday night one.</p>

<p>Before you start set up a ventoy USB stick adding both proxmox and opnsense ISO on there (plus perhaps a PDF copy of this post). You may not have internet access while doing this so come prepared...</p>

<p>I'm using my own IP ranges etc in post - adjust as needed. Key pieces you need to know to follow my descriptions:</p>

<p>vmbr0 is LAN side<br />
vmbr1 is WAN (internet) side. (Proxmox sticks VMs on 0 by default so you want LAN side being 0)<br />
10.32.0.1 is the opnsense VM [LAN side], 10.31.0.5 is WAN side but that doesn't really matter key part is <em>31</em> makes it separate from our main <em>32</em> LAN<br />
10.32.0.2 is the LAN side IP of proxmox<br />
My device has 5 ports with enp2s0 being internet facing [aka vmbr1], rest of the NICs are bridge to vmbr0<br />
The key networking file on proxmox is at /etc/network/interfaces</p>

<p>Assumes upstream ISP is Eth based and just DHCPs whatever is connected. If you've got something else on ISP side you're on your own (sorry)</p>

<p><strong>Virtualized FW</strong></p>

<p>There are two basic ways to do this. Either pass through the NICs to the FW VM, or do two sets of bridges with one being WAN (internet) side and one LAN side. Passthrough is tricky to get working on a basic linux/bios/hardware level but solves some security issues. I'm doing the bridge approach because my gear (oddly) doesn't seem to support pass through. This guide is bridge only...so abandon ship now if you're going passthrough.</p>

<p>Bridge has one significant security implication. Proxmox gets the external traffic and bridges it to the firewall VM. Grand. Except Proxmox is fond of serving the proxmox management interface on ALL interfaces. So it's serving the damn management GUI before anything gets to our FW. Meaning it is potentially exposed BEFORE our fancy opnsense security gets to it. That's a problem we're trying to get around with below section on messing with the Proxmox firewall...despite setting up a opnsense firewall. [In reality the WAN side has a pvt non-routable IP so should be fine even without rules but I don't 100% trust that]</p>

<p>Keep this in mind when doing say incoming wireguard...you're effectively double-firewalled...and would need to pass through wireguard on both.</p>

<p><strong>Security</strong></p>

<p>The bulk of this guide happens BEFORE anything is connected to the internet, mostly because above "I don't trust this" issue. Just the FW device and a laptop directly connected to it.</p>

<p><strong>GO</strong></p>

<p><strong>Step 1</strong>: Install proxmox &amp; ensure you can access the GUI</p>

<p>On the network section do:<br />
IP 10.32.0.2<br />
Gateway 10.32.0.1<br />
Set DNS to 1.1.1.1<br />
Select a NIC that is LAN side (enp7s0 for me) - this should be whatever your laptop is plug in to</p>

<p>The proxmox interface is on <a href="https://10.32.0.2:8006" rel="nofollow">https://10.32.0.2:8006</a></p>

<p><strong>Step 2</strong>: Set up a second bridge in /etc/network/interfaces with WAN</p>

<pre><code>auto vmbr1
iface vmbr1 inet static
        address 10.31.0.5/24
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0

iface enp2s0 inet manual
</code></pre>

<p>Note how it is set to a static unroutable IP despite us aiming for DHCP upstream ISP side. That's because we want the firewall VM to grab the DHCP from ISP, not the proxmox level interface.</p>

<p>Restart to make the 2nd bridge show in GUI.</p>

<p><strong>Step 3</strong>: Set up a opnsense VM</p>

<p>Copy over ISO off USB stick like so:</p>

<pre><code>mkdir /media/usbstick
fdisk -l  [[[to get the /dev/ location for the stick]]]
mount /dev/sda1 /media/usbstick
cp /media/usbstick/OPNSense.sio /var/lib/vz/template/iso/
</code></pre>

<p>If the iso is in that location then proxmox GUI should pick it up.</p>

<p>Set up a VM that has 12GB, 5120mb RAM and 3 cores. Going lower on space &amp; ram works but has consequences downstream on how zfs plays out so if you can do 12 &amp; 5 or more.</p>

<p>Before starting VM add the second bridge (vmbr1). Ideally add the LAN side during VM creation so that the naming 0 &amp; 1 line up consistently. Memorize the MACs on both (sorta...just which is which).</p>

<p><strong>Step 4</strong>: Install opnsense</p>

<p>Where it asks you for a login, use installer as user and opnsense as password</p>

<p>Key point here is you need to line up what opnsense thinks is LAN side and WAN side...with the right MAC per above...which in turn maps to the right bridge...which in turn maps to a physical port.</p>

<p>Finish install, change root pass &amp; unmount the ISO. Reboot.</p>

<p><strong>Step 5</strong>: Initial config of opnsense</p>

<p>Log into console of opnsense (the proxmox built in one). Option 2 - set interface IP. Configure LAN side. This part is a little confusing. We DONT want it to use DHCP as in where it gets it's IP, but we want it to SERVE DHCP...so that other LAN devices can get an IP from it. So in this menu the first time it asks you about DHCP the answer is no, the second time the answer is yes. Set IP to 10.32.0.1 and 24 as subnet bit count. Enable DHCP server. Start clients at 10.32.0.51 and end at 10.32.0.254. That way we've got ~50 IPs for statics. Change GUI to http. Reset to defaults - yes.</p>

<p>...now try to access GUI on <a href="http://10.32.0.1" rel="nofollow">http://10.32.0.1</a></p>

<p>On the GUI you should have an initial setup. Set hostname, domain, and DNS. Go with a public one for now e.g. 1.1.1.1 Leave the WAN side as DHCP - no need to change anything here.</p>

<p><strong>Step 6</strong>: Firewall</p>

<p>Go back to proxmox &amp; navigate to datacenter on left then to firewall. This stuff cascades so the rules you set on datacenter level apply to the device and to VMs below.</p>

<p>The firewall rules use first match principle, starting with zero i.e. top of list. So in general we want a pattern like so</p>

<p>[0] - Allow SSH on LAN side<br />
[1] - Disallow SSH on everything</p>

<p>So lan side incoming SSH hits rule 0 matches that and gets approved, while everything else fails rule 0 then goes to rule 1 and gets dropped.</p>

<pre><code>Direction: In
Action: Accept
Interface: vmbr0 [[[[this is LAN side]]]]
Protocol: TCP
Dest Port: 8006
Enable: Tick

Direction: In
Action: Drop
Interface: [[[[leave empty]]]]
Protocol: TCP
Dest Port: 8006
Enable: Tick
</code></pre>

<p>Do same for 22 TCP and ICMP (protocol, no port). I'd suggest messing with ICMP to experiment and get a better grasp of what blocks when.</p>

<p>Triple check that you've got this right. Next step is enable firewall...and if you fkd this (8006 specifically) up then you're locked out and will need a physically screen &amp; keyboard to sort it out.</p>

<p>You should also block these ports on vmbr1 (internet/wan) for good measure:<br />
TCP 111, UDP 111, UDP 323, TCP 25, TCP 3128. No idea what they all do...but proxmox is listening on them &amp; I don't want them open internet facing. I used command  "lsof -i -P -n" to work out what ports are being listened to.</p>

<p><strong>Step 7</strong>:  Connect device to internet</p>

<p>If all went well then a device plugged into LAN side can now access the internet. First thing you want to do is head over to</p>

<p><a href="https://www.yougetsignal.com/tools/open-ports/" rel="nofollow">https://www.yougetsignal.com/tools/open-ports/</a></p>

<p>And confirm they can't see your port 8006</p>

<p><strong>Trouble shooting</strong></p>

<p>1) You'll need to set a static IP in the right range on your laptop when connecting directly to a device. So when you can't reach the interfaces (proxmox or opnsense) checking that you're on the right net is helpful. Also windows is really shtty on this so sometimes you need to disable and reenable the network adapter to make it pick up things right. Try that before assuming something else is broken. You may also need to restart the laptop entirely...windows tends to get confused easily when rapidly switching networks.</p>

<p>2) Very likely that you'll f up DNS somewhere along the way...so when trying to work out whether a path through the firewall works try to use IPs like 1.1.1.1 with ping rather than google.com.</p>

<p>3) If genuinely stuck do ping device by device. i.e. my laptop is connected to a proxmox device...can i ping that by IP. Yes, ok can I ping opnsense by IP. Yes, can I ping 1.1.1.1. Yes. Can I ping google.com.</p>

<p><strong>Devices</strong></p>

<p>You should point all devices at the opnsense instance for both gateway and DNS [10.32.0.1 for me]. Never point a device at the pihole IP directly...that would work yes but it'll get you into trouble later in unexpected &amp; hard to troubleshoot ways. You want the devices asking opnsense for DNS and opnsense in turn asking the pihole/adguardhome, and that asking 1.1.1.1 in turn. It's under Unbound in opnsense...section called Override...that's where the pihole goes. Also I suggest using Adguard home...it's superior to pihole.</p>

<p><strong>YAY &amp; Thoughts</strong></p>

<p>Once it all sorta works, export the config in opnsense and save a copy of the proxmox /etc/network/interfaces - opnsense has a really nice "one config backup file everything is in it" config thing going...use it.</p>

<p>If anyone finds holes in this post please do tell...I'm running this live so if I'm wrong about something I'd like to find out from you rather than an evil hacker</p>

<p>Full /etc/network/interfaces for completeness</p>

<pre><code>root@firewall:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp2s0 inet manual

iface enp3s0 inet manual
iface enp4s0 inet manual
iface enp5s0 inet manual
iface enp6s0 inet manual
iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 10.32.0.2/24
        gateway 10.32.0.1
        bridge-ports enp7s0 enp6s0 enp5s0 enp4s0 enp3s0
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet static
        address 10.31.0.5/24
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0
</code></pre>

<p>And firewall view:</p>

<p><img src="https://i.imgur.com/NDmFLAc.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>How To Install KVM VPSes From The Command Line Using `libvirt` and `virsh`</title>
        <link>https://lowendspirit.com/discussion/6778/how-to-install-kvm-vpses-from-the-command-line-using-libvirt-and-virsh</link>
        <pubDate>Sun, 19 Nov 2023 20:35:23 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">6778@/discussions</guid>
        <description><![CDATA[<h2>Notes From Following The Footsteps Of The 大唐 (Great Tang)</h2>

<h2>Introduction</h2>

<p>Back on May 19, 2023, the 大 (big, great) <a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a> wrote an awesome LES tutorial called <a rel="nofollow" href="https://lowendspirit.com/discussion/5939/how-to-become-an-one-man-nat-vps-provider">How to Become an One-Man NAT VPS Provider?</a></p>

<p><a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a>'s tutorial covers setting up NAT VPSes using the <a rel="nofollow" href="https://linux.die.net/man/1/virt-install#:~:text=virt%2Dinstall%20is%20a%20command,document%20to%20quickly%20get%20started.">virt-install</a> <a rel="nofollow" href="https://en.wikipedia.org/wiki/Command-line_interface">command line</a> utility from <a rel="nofollow" href="https://libvirt.org/">libvirt.</a></p>

<h2>Trying On A Debian 12.2 Node</h2>

<p>I decided to try following <a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a>'s tutorial. The Node which <a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a>'s tutorial had used was running Debian 11. I tried with a Debian 12.2 Node. On Debian 12.2, I ran into two issues:</p>

<ul>
<li><p><a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a>'s example code did not include a possibly newly required line <code>--osinfo detect=on,name=OSNAME</code>. Adding the <code>osinfo detect=on,name=debian12</code> line resulted in a fatal error.  So, yes, Debian is great, but Debian 12.2's <code>virt-install</code> did not include "debian12" among the list of supported releases shown by <code>virt-install --osinfo list</code>! I bypassed the error with <code>--osinfo detect=on,require=off</code>, but I am unclear on what, if any problems turning off <code>osinfo require</code> might have caused.</p></li>
<li><p>After completing <a href="https://lowendspirit.com/profile/tang_cn" rel="nofollow">@tang_cn</a>'s install steps, my Debian guest VM worked fine over remote VNC via ssh tunnel into the VM's console. The VM could ping and could be pinged from the WAN over IPv6, but not over IPv4. I didn't solve the NAT IPv4 networking issue, whatever it was.</p></li>
</ul>

<h2>Trying On A Fedora Rawhide Node</h2>

<p>I tried again on a Node runniing Fedora Rawhide. I did find that the more current but much less tested code in Rawhide enabled <code>virt-install</code> to support Debian 12 VMs.</p>

<ul>
<li><strong>The Rawhide Node</strong></li>
</ul>

<p>The Rawhide Node is an Intel E-2276G rented from the <a rel="nofollow" href="https://hetzner.com/sb">Hetzner server auction</a> for €33.70 monthly. This price is at least a couple of Euros above the minimum auction price for this server. Nevertheless, this server is worth keeping long term since it has two new NVMe disks. Not all auction servers have new disks.</p>

<p><img src="https://lowendspirit.com/uploads/editor/0j/nc3wmu0q8qbw.png" alt="" title="" /></p>

<ul>
<li><strong>References</strong></li>
</ul>

<p>Fedora has an introductory <a rel="nofollow" href="https://docs.fedoraproject.org/en-US/quick-docs/virtualization-getting-started/">Virtualization – Getting Started</a> tutorial. The Fedora tutorial links to <code>libvirt's</code> wiki article on <a rel="nofollow" href="https://wiki.libvirt.org/Networking.html">common <code>libvirt</code> networking configurations.</a></p>

<p>Let's start by following the command line versions of the steps in the Fedora tutorial.</p>

<ul>
<li><strong>Step 1: System Requirements</strong></li>
</ul>

<p>Virtualization requires certain minimum RAM amounts and also CPU virtualization extensions, either Intel VT or AMD-V. The minimum RAM amounts are satisfied here since the Node has 64 GB DDR4 ECC RAM. The CPU passes the wiki article's <code>egrep '^flags.*(vmx|svm)' /proc/cpuinfo</code> check.</p>

<ul>
<li><strong>Step 2: Install Virtualization Software</strong></li>
</ul>

<p>The Fedora <code>dnf</code> package manager's virtualization group on our Rawhide server still seems the same as that shown in the Fedora wiki.</p>

<pre><code>[root@polonium ~]# dnf groupinfo virtualization
Last metadata expiration check: 3:24:19 ago on Sun 19 Nov 2023 03:19:10 PM UTC.
Group: Virtualization
 Description: These packages provide a graphical virtualization environment.
 Mandatory Packages:
   virt-install
 Default Packages:
   libvirt-daemon-config-network
   libvirt-daemon-kvm
   qemu-kvm
   virt-manager
   virt-viewer
 Optional Packages:
   guestfs-tools
   python3-libguestfs
   virt-top
[root@polonium ~]# 
</code></pre>

<p>Let's try installing with the optional packages.</p>

<pre><code>dnf group install --with-optional virtualization
</code></pre>

<p>Whew! That was 481 packages, but the install took only about one minute. The entire 2,130 lines of terminal output was saved, so, if you want to see it, please ask.</p>

<p>Let's use <code>systemctl</code> to start and then to enable the <code>libvirt</code> daemon. Enabling the daemon makes it restart automatically when the Node reboots.</p>

<pre><code>[root@polonium ~]# date -u; systemctl start libvirtd
Sun Nov 19 10:49:12 PM UTC 2023
[root@polonium ~]# date -u; systemctl enable libvirtd
Sun Nov 19 10:49:30 PM UTC 2023
Created symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service → /usr/lib/systemd/system/libvirtd.service.
Created symlink /etc/systemd/system/sockets.target.wants/libvirtd.socket → /usr/lib/systemd/system/libvirtd.socket.
Created symlink /etc/systemd/system/sockets.target.wants/libvirtd-ro.socket → /usr/lib/systemd/system/libvirtd-ro.socket.
Created symlink /etc/systemd/system/sockets.target.wants/libvirtd-admin.socket → /usr/lib/systemd/system/libvirtd-admin.socket.
[root@polonium ~]# 
</code></pre>

<p>Verify that KVM is properly loaded.</p>

<pre><code>[root@polonium ~]# lsmod | grep kvm
kvm_intel             425984  0
kvm                  1376256  1 kvm_intel
irqbypass              12288  1 kvm
[root@polonium ~]# 
</code></pre>

<ul>
<li><strong>Step 3: Default Networking Support</strong></li>
</ul>

<p>The Fedora tutorial tells us to expect a 192.168.x.x subnet to be set up by default on the Node. The VM guests should be able to connect out to the WAN by using the Node's main IPv4 as a gateway. Connections from the WAN into the guests require firewall DNAT rules on the Node or a bridged environment.</p>

<p>Let's use the iproute2 suite to see what happened to the default network when we installed the <code>dnf</code> virtualization group.</p>

<pre><code>[root@polonium ~]# ip link show
  [ . . . ]
3: virbr0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
[root@polonium ~]# 
</code></pre>

<p>It's apparent that installing the virtualization group added a bridge called <code>virbr0</code>. The bridge is down now, but will be put up when we install and start a VM.</p>

<ul>
<li><strong>Step 4: Create A Guest With <code>virt-install</code></strong></li>
</ul>

<p>Let's install a Debian guest VM. Even though we are following a Fedora tutorial. 🙈🙉🙊</p>

<p>First we get the guest's iso image, SHA512 sum, and signature. The Fedora tutorial put the iso images in <code>/var/lib/libvirt/images/</code>. I began by creating the <code>images</code> directory and then a separate <code>iso</code> directory inside <code>/var/lib/libvirt/images</code>. Libvirt seems flexible about the iso location. Because I use the iso images for additional purposes beyond <code>libvirt</code>, if I were doing this again, I might create the <code>iso</code> directory in <code>/var/lib</code>, independent of and on the same level as the <code>libvirt</code> directory.</p>

<p>Reference: <a href="https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/" rel="nofollow">https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/</a></p>

<pre><code>cd /var/lib/libvirt/images/iso
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA512SUMS
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA512SUMS.sign
</code></pre>

<p>Next, let's check the SHA512 sum and the signature.</p>

<p>Reference: <a href="https://www.debian.org/CD/verify" rel="nofollow">https://www.debian.org/CD/verify</a></p>

<pre><code>sha512sum -c SHA512SUMS --ignore-missing
gpg --keyserver keyring.debian.org --recv DF9B9C49EAA9298432589D76DA87E80D6294BE9B
gpg --verify SHA512SUMS.sign SHA512SUMS
</code></pre>

<p>Now we get to use <code>virt-install</code> to create our Debian 12 guest. Here is the install command directly from the Fedora tutorial.</p>

<pre><code>virt-install --name Fedora39 \
--description 'Fedora 39 Workstation' \
--ram 4096 \
--vcpus 2 \
--disk path=/var/lib/libvirt/images/Fedora-Workstation-39/Fedora-Workstation-39-20180518.0.x86_64.qcow2,size=20 \
--os-type linux \
--os-variant fedora39 \
--network bridge=virbr0 \
--graphics vnc,listen=127.0.0.1,port=5901 \
--cdrom /var/lib/libvirt/images/Fedora-Workstation-39/Fedora-Workstation-Live-x86-64-39-1.1.iso \
--noautoconsole
</code></pre>

<p>Here is the <code>virt-install</code> command which was used for this test. Note that <code>--os-type</code> has been deprecated, and that the version of <code>virt-install</code>, still numbered 4.1.0 in Rawhide, supports Debian 12.</p>

<pre><code>[root@polonium ~]# cat -n /root/Install-Debian-KVM-Guest.sh
     1  virt-install --name Debian-12-Guest-1 \
     2  --description 'Debian 12 from netinst.iso' \
     3  --ram 4096 \
     4  --vcpus 2 \
     5  --disk path=/var/lib/libvirt/images/Debian-12-20231119.1.x86_64.qcow2,size=20 \
     6  --os-variant debian12 \
     7  --network bridge=virbr0 \
     8  --graphics vnc,listen=127.0.0.1,port=5901 \
     9  --cdrom /var/lib/libvirt/images/iso/debian-12.2.0-amd64-netinst.iso \
    10  --noautoconsole
[root@polonium ~]# /root/Install-Debian-KVM-Guest.sh

Starting install...
Allocating 'Debian-12-20231119.1.x86_64.qcow2'                    |    0 B  00:00:00 ... 
Creating domain...                                                |    0 B  00:00:00     

Domain is still running. Installation may be in progress.
You can reconnect to the console to complete the installation process.
[root@polonium ~]# 
</code></pre>

<p><code>virt-install</code> leaves us with a guest which is running. The guest has a disk image qcow2 file and also is connected to the net-install iso. <code>virt-install</code> boots the guest from the iso. Thus, at this point, we have installed the guest on the Node, but we still need to install the guest OS inside the guest's disk image.</p>

<ul>
<li><strong>Step 5: Install The Guest OS Inside The Guest</strong></li>
</ul>

<p><img src="https://lowendspirit.com/uploads/editor/bh/pg8ioavipe6j.png" alt="" title="" /></p>

<p>We connect to and install the guest in the usual way appropriate to the distribution that the guest is using. Inside the guest, the guest's IPv4 network is automatically configured by DHCP using the subnet IP assigned to the guest and using the IP of the Node as the gateway.</p>

<p>To connect to the guest from our local address, we set up an ssh tunnel from our local machine to the Node.</p>

<pre><code>ssh root@$NODE_IP -L 5901:localhost:5901 
</code></pre>

<p>Then we connect via VNC. In our local VNC client, we enter the localhost IP address followed by the port number which was used in the <code>virt-install</code> <code>--graphics vnc,listen=127.0.0.1,port=5901 \</code> flag. So, here, we would connect to <code>127.0.0.1:5901</code>.</p>

<p>When we are finished installing the guest OS on the guest qcow2 image, we normally remove the iso and click reboot in the installer so that the guest reboots from the qcow2 image rather than from the netinst iso. However, here, with <code>libvirt</code>, the guest shuts down and does not reboot. Instead, we now need to start the guest with <code>virsh</code>.</p>

<ul>
<li><strong>Step 6: Manage The Guest With <code>virsh</code></strong></li>
</ul>

<p><code>virt-install</code> leaves an XML file for each guest in /etc/libvirt/qemu.</p>

<p>To start a virtual machine, use <code>virsh create</code> with the full filename of the guest's XML file.</p>

<pre><code>[root@polonium ~]# cd /etc/libvirt/qemu
[root@polonium qemu]# ls -l
total 16
drwx------. 2 root root 4096 Nov  6 00:00 autostart
-rw-------. 1 root root 7235 Nov 20 03:58 Debian-12-Guest-1.xml
drwx------. 3 root root 4096 Nov 19 22:49 networks
[root@polonium qemu]# virsh create Debian-12-Guest-1.xml
Domain 'Debian-12-Guest-1' created from Debian-12-Guest-1.xml

[root@polonium qemu]# virsh list
 Id   Name                State
-----------------------------------
 1    Debian-12-Guest-1   running

[root@polonium qemu]# 
</code></pre>

<p>To gracefully stop a guest:</p>

<pre><code># virsh shutdown &lt;virtual machine (name | id | uuid)&gt;
</code></pre>

<p>To destroy a guest which already has been stopped. The guest's qcow2 image needs to be removed manually.</p>

<pre><code># virsh undefine &lt;virtual machine (name | id | uuid)&gt;
</code></pre>

<h2>Success!</h2>

<p>Logging into the fully installed and rebooted guest via VNC showed IPv4 WAN connectivity from inside the guest.</p>

<p><img src="https://lowendspirit.com/uploads/editor/iq/6csx1u3mt6qs.png" alt="" title="" /></p>

<p>Also, we can use <code>ssh</code> to log in to the guest from the Node.</p>

<pre><code>[root@polonium ~]# ssh tom@192.168.xxx.xxx
The authenticity of host '192.168.xxx.xxx (192.168.xxx.xxx)' can't be established.
ED25519 key fingerprint is SHA256:0NfbDJkPk5Lt+dsFOlt/tWOq2+Edf/UPn136Yis9Kvo.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.xxx.xxx' (ED25519) to the list of known hosts.
tom@192.168.xxx.xxx's password: 
Linux debian 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Nov 19 22:44:07 2023
tom@debian:~$ 
</code></pre>

<h2>Note: QEMU/KVM Without <code>libvirt</code></h2>

<p>We could have used qemu without libvirt. But that might not be so easy. <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> Let's see the <code>qemu</code> command that <code>libvirt</code> used.</p>

<pre><code>[root@polonium ~]# ps aux | grep libvirt | grep -v grep
  [ . . . ]
qemu       25641  0.9  0.9 5580140 646992 ?      Sl   04:45   0:27 /usr/bin/qemu-system-x86_64 -name guest=Debian-12-Guest-1,debug-threads=on -S -object {"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-1-Debian-12-Guest-1/master-key.aes"} -machine pc-q35-8.1,usb=off,dump-guest-core=off,memory-backend=pc.ram,hpet=off,acpi=on -accel kvm -cpu host,migratable=on -m size=4194304k -object {"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296} -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 2d88e4ec-782f-4da6-961e-0266d08f845a -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=32,server=on,wait=off -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device {"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"} -device {"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"} -device {"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"} -device {"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"} -device {"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"} -device {"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"} -device {"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"} -device {"driver":"pcie-root-port","port":23,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x7"} -device {"driver":"pcie-root-port","port":24,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x3"} -device {"driver":"pcie-root-port","port":25,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x3.0x1"} -device {"driver":"pcie-root-port","port":26,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x2"} -device {"driver":"pcie-root-port","port":27,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x3"} -device {"driver":"pcie-root-port","port":28,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x4"} -device {"driver":"pcie-root-port","port":29,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x5"} -device {"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"} -device {"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"} -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/Debian-12-20231119.1.x86_64.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":false,"discard":"unmap","driver":"qcow2","file":"libvirt-2-storage","backing":null} -device {"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":1} -device {"driver":"ide-cd","bus":"ide.0","id":"sata0-0-0"} -netdev {"type":"tap","fd":"34","vhost":true,"vhostfd":"36","id":"hostnet0"} -device {"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:ec:db:35","bus":"pci.1","addr":"0x0"} -chardev pty,id=charserial0 -device {"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0} -chardev socket,id=charchannel0,fd=31,server=on,wait=off -device {"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"} -device {"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"} -audiodev {"id":"audio1","driver":"none"} -vnc 127.0.0.1:1,audiodev=audio1 -device {"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"} -global ICH9-LPC.noreboot=off -watchdog-action reset -device {"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"} -object {"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"} -device {"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"} -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
[root@polonium ~]# 
</code></pre>

<h2>Note: Command Summary</h2>

<p>For cut and paste fiends, here's a list of all the commands run in this post.</p>

<pre><code># egrep '^flags.*(vmx|svm)' /proc/cpuinfo
dnf group install --with-optional virtualization
systemctl start libvirtd
systemctl enable libvirtd
# lsmod | grep kvm
# ip link show
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA512SUMS
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA512SUMS.sign
sha512sum -c SHA512SUMS --ignore-missing
gpg --keyserver keyring.debian.org --recv DF9B9C49EAA9298432589D76DA87E80D6294BE9B
gpg --verify SHA512SUMS.sign SHA512SUMS

virt-install --name Debian-12-Guest-1 \
--description 'Debian 12 from netinst.iso' \
--ram 4096 \
--vcpus 2 \
--disk path=/var/lib/libvirt/images/Debian-12-20231119.1.x86_64.qcow2,size=20 \
--os-variant debian12 \
--network bridge=virbr0 \
--graphics vnc,listen=127.0.0.1,port=5901 \
--cdrom /var/lib/libvirt/images/iso/debian-12.2.0-amd64-netinst.iso \
--noautoconsole

virsh create Debian-12-Guest-1.xml
# virsh shutdown &lt;virtual machine (name | id | uuid)&gt;
#ps aux | grep qemu | grep -v grep
</code></pre>

<h2>Future Steps</h2>

<ul>
<li>Set up IPv4 NAT and IPv6/48 on the Node.</li>
<li>Add IPv6/64 inside the guest.</li>
<li>Set up <a rel="nofollow" href="https://spice-space.org">Spice.</a></li>
<li>Try other Linux and BSD guests.</li>
</ul>
]]>
        </description>
    </item>
    <item>
        <title>Adventures Installing Python And Django Directly From Source Code!</title>
        <link>https://lowendspirit.com/discussion/6487/adventures-installing-python-and-django-directly-from-source-code</link>
        <pubDate>Mon, 18 Sep 2023 03:35:27 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">6487@/discussions</guid>
        <description><![CDATA[<p><img src="https://lowendspirit.com/uploads/editor/bn/45dt1qefw96t.png" alt="" title="" /></p>

<h2><strong>Introduction</strong></h2>

<p>This article presents background information plus a quick and easy to follow recipe for installing, directly from <a rel="nofollow" href="https://github.com">Github</a> source code repositories, the <a rel="nofollow" href="https://www.python.org">Python programming language</a> and the <a rel="nofollow" href="https://www.djangoproject.com/">Django web framework.</a> The operating system used here is <a rel="nofollow" href="https://docs.fedoraproject.org/en-US/releases/rawhide/">Fedora Rawhide.</a>  Also included is a note about using the install steps presented here on <a rel="nofollow" href="https://www.debian.org/News/2023/20230610">Debian 12</a>.</p>

<p>As shown by the above screenshot, the quick, easy to follow, source-based Django install recipe given here actually works on Fedora Rawhide. Of course, the "without optimization" approach taken here is not intended for production. Instead, what we have here is a very fun introduction to building Python and Django from source code.</p>

<h2><strong>What Is Django?</strong></h2>

<p><a rel="nofollow" href="https://www.djangoproject.com/">Django</a> is a <a rel="nofollow" href="https://en.wikipedia.org/wiki/Web_framework">web framework</a> written in <a rel="nofollow" href="https://www.python.org/">Python.</a> The <a rel="nofollow" href="https://www.djangoproject.com/">Django Project's landing page</a> describes Django as "a high-level Python web framework that encourages rapid development and clean, pragmatic design."</p>

<h2><strong>Why Is Django Interesting?</strong></h2>

<p>A while back, I watched one of the <a rel="nofollow" href="https://www.youtube.com/watch?v=w8q0C-C1js4">CS50 lecture videos about Django.</a> The <a rel="nofollow" href="https://pll.harvard.edu/course/cs50-introduction-computer-science">CS50</a> video shows how simple and fast the Django web development process looks and how much Django must do in the background (for example, handling both database and web server functions). Web development using Django code seems cool -- very few lines of Django code are required to make <a rel="nofollow" href="https://en.wikipedia.org/wiki/Dynamic_web_page">dynamic web pages</a> work!</p>

<h2><strong>Django Install Methods</strong></h2>

<p>At first sight, especially for someone coming without a Python background, installing Django seems really complicated! The Django Project's <a rel="nofollow" href="https://docs.djangoproject.com/en/4.2/intro/install/">Quick install guide</a> describes:</p>

<ul>
<li>installing Python,</li>
<li>Optionally setting up a database,</li>
<li>Three Django install methods

<ul>
<li>from an official Django release (recommended),</li>
<li>from your operating system's distribution,</li>
<li>from the latest development code, and</li>
</ul></li>
<li>Verifying the install.</li>
</ul>

<p>The Quick install guide states that the first of the three install methods, installing from an official Django release, is "the best approach for most users."</p>

<p>However, for each of the three install methods, including for the recommended install method, the Django Quick install guide sends its readers to different sections of a significantly more detailed <a rel="nofollow" href="https://docs.djangoproject.com/en/4.2/topics/install/">How to install Django</a> page.</p>

<p>The more detailed How to install Django page explains that the recommended install from an official Django release involves both <a rel="nofollow" href="https://pypi.org/project/pip/"><code>pip</code>, the Package Installer for Python,</a> and <a rel="nofollow" href="https://docs.python.org/3/library/venv.html"><code>venv</code>, the Python Virtual Environment Module.</a></p>

<p>Of course, for a Django install, <a rel="nofollow" href="https://wiki.python.org/moin/BeginnersGuide/Download">Python</a> itself, along with <a rel="nofollow" href="https://pip.pypa.io/en/latest/installation/">pip</a> and <a rel="nofollow" href="https://docs.python.org/3/installing/index.html#installing-index">venv</a> might <a rel="nofollow" href="https://docs.djangoproject.com/en/4.2/topics/install/#installing-an-official-release-with-pip">need to be installed</a> if all three of these are not already present.</p>

<p>People use <a rel="nofollow" href="https://docs.djangoproject.com/en/4.2/topics/install/#get-your-database-running">Django with a database.</a> The database frequently is <a rel="nofollow" href="https://www.sqlite.org">SQLite</a> or <a rel="nofollow" href="https://www.postgresql.org/">PostgreSQL.</a> Precompiled SQLite is installed during the preliminary Fedora development tools install discussed below. Although there is an <a rel="nofollow" href="https://github.com/sqlite/sqlite">official Github SQLite source mirror,</a> SQLite uses <a rel="nofollow" href="https://fossil-scm.org">fossil</a> for source code management. Fossil seems so interesting and fun that it would make a great subject for another article. Thus, and even though PostgreSQL also is enticing, for the time being, on Fedora Rawhide, we can proceed with the distribution-installed SQLite.</p>

<p>Besides a database, Django also needs a web server. The official Django How to install tutorial <a rel="nofollow" href="https://docs.djangoproject.com/en/4.2/topics/install/#install-apache-and-mod-wsgi">recommends Apache web server with mod_wsgi.</a> The web server install also might be another great subject for yet another LES Talk article. Meanwhile, as shown below, we can use Django's built-in Python web server. It is the built-in Python web server which served the page of which the above screenshot was taken.</p>

<p>Reading the Django Quick install guide was super helpful for important context, and reading the more detailed Django How to install guide was even more helpful for learning additional install details. But, the crux is, even after reading both guides, no specific install recipe was provided. Instead, readers of these well meant and helpful guides are in the end left facing a complex puzzle about how to choose among various install methods and sub-methods. Ironically, each of the install methods very kindly is intended to make installing Django easy!</p>

<h2><strong>Simplifying The Django Install</strong></h2>

<p>Having tried all three of the install methods listed in the official Django Quick install guide, and having tried several variations mentioned in the more detailed, official Django How to install guide, I wondered whether the Django install somehow could be easier. I wanted a quick Django install recipe!</p>

<p>Many source repositories have easy to find, basic configuration and compilation instructions. For example, Python's simple, standard build instructions are <a rel="nofollow" href="https://github.com/python/cpython#build-instructions">here.</a> Often the simple, standard, "configure, make, make test, make install" series just works. Trying a source-based install seemed faster and easier, closer to upstream, and more fun than figuring out a specific install recipe based on one among the multiple, non-source-based install methods discussed in the official guides.</p>

<p>Source-based installs require a <a rel="nofollow" href="https://en.wikipedia.org/wiki/Compiler">compiler</a> and other development tools. In an ideal world, both the compiler and the development tools also themselves would be compiled from source by the end user. However, as shown here below, the Fedora distribution's package system can be used to quickly and easily install a compiler and other development tools.</p>

<p>Therefore, because of the simplicity of the standard build instructions and the ease of installing a compiler, I attempted, on Fedora Rawhide, a quick, source-based Django install. It seemed a good idea also to compile Python from C and to add <code>pip</code> and <code>venv</code> from their current development Python sources. That way, we get Django's friends built from their current sources to accompany our current, source-built Django. Of course, <a rel="nofollow" href="https://lowendspirit.com/discussion/6380/in-only-three-days-new-linux-kernel-source-commits-run-live-on-fedora-rawhide/p1">Fedora Rawhide runs on current Linux development kernels,</a> so Rawhide might be an especially fun and good fit for current, source-built userland programs.</p>

<p>Clone, compile, test, and install times mentioned below are from an Intel E3-1275 v5 with 64 GB DDR4 ECC RAM and 2 x 512 GB NVMe disks rented from <a rel="nofollow" href="https://hetzner.com">Hetzner</a> for €26.70 per month (approximately US$28.34). Newer and faster processors with faster memory and faster disks will have shorter times.</p>

<h2><strong>Quick Source-Based Django Install Recipe</strong></h2>

<h2><strong>Part I: Install Development Tools On Fedora Rawhide</strong></h2>

<pre><code>[not_oles@radium ~]$ sudo dnf groupinstall --with-optional "C Development Tools and Libraries"
[not_oles@radium ~]$ sudo dnf groupinstall --with-optional "Development Tools"
[not_oles@radium ~]$ sudo dnf groupinstall --with-optional "Development Libraries"
</code></pre>

<p>That's all, only these three commands. Probably they could be combined into a long, one line command, but I wanted to pause long enough between commands to read the individual output of each.</p>

<p>These three commands do not install Django, but they do install, respectively, 250, 585, and 186 development related software packages. That's 1,021 packages! Most of the newly installed packages are unneeded for our present purpose, but it was quick and easy to install everything. The entire one thousand plus package install took only about 8 minutes!</p>

<p>At least some Python must have been present in Fedora prior to the development tools install because <a rel="nofollow" href="https://docs.fedoraproject.org/en-US/quick-docs/dnf/"><code>dnf</code>, the Fedora install tool,</a> is itself Python based. Therefore, we need a trick to separate <code>dnf</code> installed programs from our own source-built programs. The <a rel="nofollow" href="https://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a> can help keep the <code>dnf</code> and source-built programs separated.</p>

<h2><strong>Part II: Check PATH And Enable Revert</strong></h2>

<ul>
<li><strong>PATH</strong></li>
</ul>

<p>We need to check that both our root and our user PATH environment variables are set for our shell to find our newly installed /usr/local/bin binaries ahead of previously installed package system binaries. Fedora's PATH was okay because <code>/usr/local/bin</code> comes ahead of <code>/usr/bin</code>. Our install won't put anything in <code>/usr/local/sbin</code>, but for additional local installs from source, it's good for <code>usr/local/sbin</code> to come ahead of <code>/usr/sbin</code>.</p>

<pre><code>[root@radium ~]# echo $PATH
/root/.local/bin:/root/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
[root@radium ~]# 
</code></pre>

<pre><code>[not_oles@radium ~]$ echo $PATH
/home/not_oles/.local/bin:/home/not_oles/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
[not_oles@radium ~]$
</code></pre>

<ul>
<li><strong>Revert</strong></li>
</ul>

<p>Let's set up the ability to revert. We're going to be installing into /usr/local. So, in case we want to revert, we can use <code>tar</code> to back up <code>/usr/local</code> as it is prior to our install.</p>

<p>If we have enough disk space, there's no need for compressing our tar archive. Compression can take significant extra time.</p>

<p><code>tar</code> is an old program! Old enough not to need the "-" before the flags!</p>

<pre><code>[not_oles@radium ~]$ cd /usr
[not_oles@radium usr]$ sudo tar cvf local-revert.tar local
</code></pre>

<h2><strong>Part III: Install Python From Source</strong></h2>

<pre><code>[not_oles@radium ~]$ cd /usr/local/src
[not_oles@radium src]$ time sudo git clone https://github.com/python/cpython.git
[not_oles@radium src]$ sudo mkdir cpython-obj
[not_oles@radium src]$ cd cpython-obj/
[not_oles@radium cpython-obj]$ time sudo ../cpython/configure --prefix="/usr/local" 
[not_oles@radium cpython-obj]$ time sudo make -j `nproc`
[not_oles@radium cpython-obj]$ time sudo make -j `nproc` test
[not_oles@radium cpython-obj]$ time sudo make -j `nproc` install
</code></pre>

<p>The above <code>configure</code>, <code>make</code>, <code>make test</code>, and <code>make install</code> procedure installs <code>pip</code>, as seen in the following snippet from the <code>make install</code> output.</p>

<pre><code>Successfully installed pip-23.2.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour 
with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
</code></pre>

<p>The newly compiled and installed items are:</p>

<pre><code>[not_oles@radium ~]$ ls -l /usr/local/bin
total 28408
lrwxrwxrwx. 1 root root        8 Oct 15 22:09 idle3 -&gt; idle3.13
-rwxr-xr-x. 1 root root      100 Oct 15 22:08 idle3.13
-rwxr-xr-x. 1 root root      230 Oct 15 17:40 pip3
-rwxr-xr-x. 1 root root      230 Oct 15 17:40 pip3.13
lrwxrwxrwx. 1 root root        9 Oct 15 22:09 pydoc3 -&gt; pydoc3.13
-rwxr-xr-x. 1 root root       85 Oct 15 22:08 pydoc3.13
lrwxrwxrwx. 1 root root       10 Oct 15 22:09 python3 -&gt; python3.13
-rwxr-xr-x. 1 root root 29065592 Oct 15 22:08 python3.13
-rwxr-xr-x. 1 root root     3026 Oct 15 22:08 python3.13-config
lrwxrwxrwx. 1 root root       17 Oct 15 22:09 python3-config -&gt; python3.13-config
[not_oles@radium ~]$ 
</code></pre>

<p>Note that the <code>pip</code> described in the warning as successfully installed was installed as <code>pip3</code> and as <code>pip3.13</code>, but not as plain <code>pip</code>. For Python itself, similar to <code>pip</code>, <code>pip3</code>, and <code>pip3.13</code>, the above <code>configure</code>, <code>make</code>, <code>make test</code>, and <code>make install</code> procedure installed <code>python3.13</code> and <code>python3</code> as a <a rel="nofollow" href="https://en.wikipedia.org/wiki/Symbolic_link">symbolic link</a> to <code>python3.13</code>, but not <code>python</code>. <code>sqlite3</code> also is not installed.</p>

<p>On Fedora Rawhide, the complete <code>clone</code>, <code>configure</code>, <code>make</code>, <code>make test</code>, and <code>make install</code> Python procedure took 9 minutes and 51 seconds.</p>

<h2><strong>Part IV: Install <code>nox</code> From Source</strong></h2>

<p><code>nox</code> is a requirement for installing <code>pip</code> from source. The <code>pip</code> development <a rel="nofollow" href="https://pip.pypa.io/en/latest/development/getting-started/">Getting Started page</a> says to install <code>nox</code> inside a virtual environment. However, the <a rel="nofollow" href="https://github.com/wntrblm/nox"><code>nox</code> Github readme.md</a> says, "Nox is designed to be installed globally (not in a project virtual environment)." On Fedora Rawhide, both types of installs seem initially to work. Here is the global <code>nox</code> install.</p>

<pre><code>[not_oles@radium ~]$ cd /usr/local/src
[not_oles@radium src]$ time sudo git clone https://github.com/wntrblm/nox.git
[not_oles@radium src]$ time sudo cd nox
[not_oles@radium nox]$ time sudo python3 -m pip install -e . # Note final posix dot.
</code></pre>

<h2><strong>Part V: Create, Activate, And Enter A Python Virtual Environment</strong></h2>

<pre><code>[not_oles@radium ~]$ time python3 -m venv .venv
[not_oles@radium ~]$ source .venv/bin/activate
(.venv) [not_oles@radium ~]$ cd .venv
(.venv) [not_oles@radium .venv]$
</code></pre>

<h2><strong>Part VI: Install <code>pip</code> From Source In The Virtual Environment</strong></h2>

<pre><code># Reference:  https://pip.pypa.io/en/latest/development/getting-started/
(.venv) [not_oles@radium .venv]$ time git clone https://github.com/pypa/pip
(.venv) [not_oles@radium .venv]$ cd pip
(.venv) [not_oles@radium pip]$ time python3 -m pip install -e . # Note final posix dot.
</code></pre>

<h2><strong>Part VII: Install Django From Source In The Virtual Environment</strong></h2>

<pre><code># Reference: https://docs.djangoproject.com/en/4.2/topics/install/#installing-development-version
(.venv) [not_oles@radium .venv]$ time git clone https://github.com/django/django.git
(.venv) [not_oles@radium .venv]$ cd django/
(.venv) [not_oles@radium django]$ time python3 -m pip install -e .
</code></pre>

<h2><strong>Part VIII: How To Exit The Virtual Environment</strong></h2>

<pre><code>(.venv) [not_oles@radium django]$ deactivate
[not_oles@radium django]$ cd
[not_oles@radium ~]$ 
</code></pre>

<h2><strong>Part IX: Test</strong></h2>

<ul>
<li><strong>Normal Environment</strong></li>
</ul>

<pre><code>[not_oles@radium ~]$ which python
/usr/bin/python
[not_oles@radium ~]$ /usr/bin/python -V
Python 3.12.0
[not_oles@radium ~]$ which python3
/usr/local/bin/python3
[not_oles@radium ~]$ /usr/local/bin/python3 -V
Python 3.13.0a1+
[not_oles@radium ~]$ which nox
/usr/local/bin/nox
[not_oles@radium ~]$ /usr/local/bin/nox --version
2023.4.22
[not_oles@radium ~]$ which pip
/usr/bin/pip
[not_oles@radium ~]$ /usr/bin/pip -V
pip 23.2.1 from /usr/lib/python3.12/site-packages/pip (python 3.12)
[not_oles@radium ~]$ which pip3
/usr/local/bin/pip3
[not_oles@radium ~]$ /usr/local/bin/pip3 -V
pip 23.2.1 from /usr/local/lib/python3.13/site-packages/pip (python 3.13
[not_oles@radium ~]$ which django-admin # PATH in global environment
/usr/bin/which: no django-admin in (/home/not_oles/.local/bin:/home/not_oles/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
[not_oles@radium ~]$ which sqlite
/usr/bin/which: no sqlite in (/home/not_oles/.local/bin:/home/not_oles/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
[not_oles@radium ~]$ which sqlite3
/usr/bin/sqlite3
[not_oles@radium ~]$ sqlite3 -version
3.43.1 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9balt1 (64-bit)
[not_oles@radium ~]$ uname -r
6.6.0-0.rc5.20231013git10a6e5feccb8.44.fc40.x86_64
[not_oles@radium ~]$ cat /etc/fedora-release 
Fedora release 40 (Rawhide)
[not_oles@radium ~]$ 
</code></pre>

<ul>
<li><strong>Virtual Environment</strong></li>
</ul>

<pre><code>(.venv) [not_oles@radium .venv]$ which python
~/.venv/bin/python
(.venv) [not_oles@radium .venv]$ python -V
Python 3.13.0a1+
(.venv) [not_oles@radium .venv]$ which python3
~/.venv/bin/python3
(.venv) [not_oles@radium .venv]$ python3 -V
Python 3.13.0a1+
(.venv) [not_oles@radium .venv]$ which nox
/usr/local/bin/nox
(.venv) [not_oles@radium .venv]$ nox --version
2023.4.22
(.venv) [not_oles@radium .venv]$ which pip
~/.venv/bin/pip
(.venv) [not_oles@radium .venv]$ pip --version
pip 24.0.dev0 from /home/not_oles/.venv/pip/src/pip (python 3.13)
(.venv) [not_oles@radium .venv]$ which pip3
~/.venv/bin/pip3
(.venv) [not_oles@radium .venv]$ pip3 --version
pip 24.0.dev0 from /home/not_oles/.venv/pip/src/pip (python 3.13)
(.venv) [not_oles@radium .venv]$ which django-admin
~/.venv/bin/django-admin
(.venv) [not_oles@radium .venv]$ django-admin --version
5.1.dev20231015082711
(.venv) [not_oles@radium .venv]$ which sqlite # Get PATH inside virtual environment :)
/usr/bin/which: no sqlite in (/home/not_oles/.venv/bin:/home/not_oles/.local/bin:/home/not_oles/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
(.venv) [not_oles@radium .venv]$ which sqlite3
/usr/bin/sqlite3
(.venv) [not_oles@radium .venv]$ sqlite3 -version
3.43.1 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9balt1 (64-bit)
(.venv) [not_oles@radium .venv]$ uname -r
6.6.0-0.rc5.20231013git10a6e5feccb8.44.fc40.x86_64
(.venv) [not_oles@radium .venv]$ cat /etc/fedora-release 
Fedora release 40 (Rawhide)
(.venv) [not_oles@radium .venv]$ 
</code></pre>

<ul>
<li><strong>Web Server</strong></li>
</ul>

<p>We can launch a web server, and then our browser can see the Django default html index page shown in the screenshot above!</p>

<pre><code>[not_oles@radium ~]$ cd .venv
[not_oles@radium .venv]$ source bin/activate
(.venv) [not_oles@radium .venv]$ time django-admin startproject mysite
(.venv) [not_oles@radium .venv]$ cd mysite/
(.venv) [not_oles@radium mysite]$ python3 manage.py runserver 127.0.0.1:42365
</code></pre>

<h2> <strong>Time Summary</strong></h2>

<table>
<thead>
<tr>
  <th align="left">Item</th>
  <th align="right">Time (minutes)</th>
</tr>
</thead>
<tbody>
<tr>
  <td align="left">Install development tools</td>
  <td align="right">8</td>
</tr>
<tr>
  <td align="left">Clone, compile, test, and install CPython</td>
  <td align="right">10</td>
</tr>
<tr>
  <td align="left">Clone and install <code>nox</code></td>
  <td align="right">0.2</td>
</tr>
<tr>
  <td align="left">Create virtual environment</td>
  <td align="right">0.1</td>
</tr>
<tr>
  <td align="left">Clone and install pip</td>
  <td align="right">0.2</td>
</tr>
<tr>
  <td align="left">Clone and install Django</td>
  <td align="right">0.5</td>
</tr>
<tr>
  <td align="left"></td>
  <td align="right">--------</td>
</tr>
<tr>
  <td align="left">Total</td>
  <td align="right">19.0</td>
</tr>
</tbody>
</table>

<h2><strong>Debian 12</strong></h2>

<p>Newly installed out of its netinstall.iso box, Debian 12 Linux seems to use <code>/usr/local/lib</code> for <code>apt</code> Python installations. In other words, <code>/usr/local/lib</code> comes with subdirectories <code>/python3.11</code> and <code>/python3.11/dist-packages</code> preinstalled.</p>

<p>Moreover, Debian valiantly guards <code>/usr/local</code>. The above CPython "configure, compile, test, install" command sequence does not install any <code>pip</code>. Also, on Debian 12, the above <code>nox</code> install command failed. There was a helpful error message, which explained, "This environment" [that is, I guess, global <code>/usr/local</code>] "is externally managed. . . ."</p>

<h2><strong>Discussion</strong></h2>

<ul>
<li>What are the advantages and disadvantages of installing <code>nox</code> globally versus installing <code>nox</code> inside a virtual environment?</li>
<li>Is using <code>python</code> for the packaged install and <code>python3</code> for the compiled install a good idea?</li>
<li>Should we do something like <code>sudo ln -s /usr/local/bin/python3.13 /usr/local/bin/python</code>?</li>
<li>CPython has a helpful <a rel="nofollow" href="https://devguide.python.org/getting-started/setup-building/">Setup and Building Guide.</a> In addition to configuring and compiling, <code>git</code>, dependencies, several operating systems, and troubleshooting also are discussed.  The Guide says, "There is normally no need to install your built copy of Python! The interpreter will realize where it is being run from and thus use the files found in the working copy."</li>
<li>I need to study up on the cpython configure options, including <code>--with-pydebug</code> and <code>--enable-optimizations</code>.</li>
<li>The Cpython <code>test_dtrace</code> formerly succeeded on Rawhide, but it has failed since about the time earlier this month when Python 3.12 was released. There is an old <a rel="nofollow" href="https://bugs.python.org/issue36702">bug report from 2019</a> which has similar log messages. Configuring Cpython with <code>--with-dtrace</code> did not help.</li>
</ul>
]]>
        </description>
    </item>
    <item>
        <title>Install Llama on a GPU server</title>
        <link>https://lowendspirit.com/discussion/6399/install-llama-on-a-gpu-server</link>
        <pubDate>Thu, 31 Aug 2023 21:04:44 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>havoc</dc:creator>
        <guid isPermaLink="false">6399@/discussions</guid>
        <description><![CDATA[<p>Busy testing the GPU servers per <a href="https://lowendspirit.com/profile/crunchbits" rel="nofollow">@crunchbits</a>  thread, jotted down some notes on how to get a fresh ubuntu server to talking llama model. Note this is on a 16gb GPU - if you're on a smaller one you'll need to change the q8_0 part to q4_0 or even q3_k</p>

<p>Also note that here I'm downloading a fp16 model and converting it to q8 GGUF. In practice you can skip over those steps and just download ready made quantized GGUF models from <a rel="nofollow" href="https://huggingface.co/TheBloke">TheBloke's huggingface repo.</a>. i.e. You'd modify the download model step to point to a quantized GGUF model and skip the generate and quantize step after that.</p>

<p>This assumes Ubuntu 22.04 - you may need to do stuff like install python3 if you're on a different distro</p>

<h1>Check that we have a GPU</h1>

<p>apt update &amp;&amp; apt upgrade<br />
apt install hwinfo -y<br />
hwinfo --gfxcard --short</p>

<h1>Set up nvidia driver and SDK</h1>

<p>apt install nvidia-driver-535-server nvidia-dkms-535-server nvidia-cuda-toolkit -y<br />
reboot<br />
nvidia-smi<br />
nvcc --version</p>

<h1>Grab llama.cpp and build it</h1>

<p>git clone <a href="https://github.com/ggerganov/llama.cpp" rel="nofollow">https://github.com/ggerganov/llama.cpp</a><br />
apt install cmake -y<br />
cd llama.cpp<br />
mkdir build<br />
cd build<br />
cmake .. -DLLAMA_CUBLAS=ON<br />
cmake --build . --config Release<br />
cd ..</p>

<h1>Download a model</h1>

<p>mkdir -p /root/llama.cpp/models/llama2-fp16<br />
python3 -m pip install huggingface_hub<br />
python3<br />
from huggingface_hub import snapshot_download<br />
snapshot_download(repo_id="TheBloke/Llama-2-13B-Chat-fp16", revision="main",local_dir="/root/llama.cpp/models/llama2-fp16/")<br />
quit()</p>

<h1>Generate GGUF file</h1>

<p>python3 -m pip install gguf sentencepiece<br />
python3 convert.py ./models/llama2-fp16/</p>

<h1>Quantize it</h1>

<p>cd ./build/bin<br />
./quantize ../../models/llama2-fp16/ggml-model-f16.gguf ../../models/llama2-q8.gguf q8_0</p>

<h1>Run it</h1>

<p>./main -m ../../models/llama2-q8.gguf -ngl 99 --color -p "Tell me a story about a unicorn!"</p>

<blockquote><div>
  <p><strong>Tell me a story about a unicorn!</strong></p>
  
  <p>Once upon a time, in a far-off land of rolling hills and sparkling streams, there lived a beautiful unicorn named Luna. She had a shimmering coat of silver and white, and her horn was as bright as the stars in the night sky.</p>
  
  <p>Luna lived a peaceful life, roaming the forests and meadows, and making friends with all the creatures she met. She loved to play with the butterflies and dance with the flowers, and she could make the most beautiful music with her horn.</p>
  
  <p>One day, a wicked witch cast a spell on the land, causing all the plants and animals to become sick and tired. The unicorns were especially affected, and their beautiful coats became dull and lifeless.</p>
  
  <p>Luna knew that she had to do something to save her friends and the land they lived in. She set out on a journey to find the witch and break her spell.</p>
  
  <p>As she traveled through the forest, Luna met many creatures who were suffering from the witch's spell. She used her horn to heal them and bring them back to life. She also met a brave knight who had been searching for the witch for many years. Together, they journeyed on, determined to defeat the wicked witch and bring peace back to the land.</p>
  
  <p>Finally, after many days of traveling, they came to the witch's castle. It was a dark and gloomy place, surrounded by a moat of swirling black water. But Luna was not afraid. She knew that her horn could break any spell, no matter how powerful.</p>
  
  <p>She and the knight entered the castle, ready to face whatever dangers lay inside. As they made their way deeper into the castle, they came across the witch herself. She was a terrifying sight, with warts and a crooked nose, and a cackle that sent chills down your spine.</p>
  
  <p>But Luna was not afraid. She raised her horn and pointed it at the witch, ready to break the spell. The witch laughed and tried to stop her, but Luna's horn was too powerful. With one blast of magic, the spell was broken, and the land was once again filled with light and life.</p>
  
  <p>The creatures who had been turned to stone were returned to their true forms, and they cheered and celebrated as Luna and the knight emerged from the castle. The witch was banished from the land forever, and peace was restored.</p>
  
  <p>And Luna, the little unicorn with the powerful horn, lived happily ever after, knowing that she had saved her homeland from the evil witch's spell. The end.</p>
</div></blockquote>
]]>
        </description>
    </item>
    <item>
        <title>Whoa! What Happened To All The Disk Space On My Google Cloud Platform Free Tier Debian VPS?</title>
        <link>https://lowendspirit.com/discussion/6473/whoa-what-happened-to-all-the-disk-space-on-my-google-cloud-platform-free-tier-debian-vps</link>
        <pubDate>Thu, 14 Sep 2023 04:37:03 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">6473@/discussions</guid>
        <description><![CDATA[<h2>Introduction</h2>

<p>For over four years now I have been enjoying a <a rel="nofollow" href="https://cloud.google.com/free">Google Cloud Platform (GCP) Free Tier Debian VPS.</a> During this time, Debian's package system cache has grown to use more than half of the VPS's 10 GB of file storage space to cache .deb package files. This post explains the history and the use of this wonderful, free VPS (Thanks, Google!); shows the size of the package cache; and explains how to reclaim the large amount of disk space used for the cache.</p>

<h2>VPS Creation in 2019</h2>

<p>According to the <a rel="nofollow" href="https://cloud.google.com/cloud-console">Google Cloud Console,</a> my e2-micro instance was created on January 27, 2019. That was more than four and a half years ago!</p>

<p><img src="https://lowendspirit.com/uploads/editor/vc/0ji1h0vtk7mp.jpeg" alt="" title="" /></p>

<h2>Larger File System Size Possible Within Current GCP Free Tier Limits</h2>

<p>Looking at the current <a rel="nofollow" href="https://cloud.google.com/free/docs/free-cloud-features#free-tier-usage-limits">GCP Free Tier Resource Limits</a> suggests that the Compute Engine limit is "30 GB-months standard persistent disk." My VPS is only 10 GB, so maybe, when I need it, I could increase the file system size to add an additional 20 GB.</p>

<h2>VPS Use</h2>

<p>This GCP VPS has been in modest, but continuous, steady use throughout more than four years. It serves my tiny personal website, holds a few small backup files, and runs <a rel="nofollow" href="http://tinyproxy.github.io/">TinyProxy.</a> Tinyproxy works great for accessing certain websites in the US when I am in Mexico.</p>

<p>I log in to the VPS frequently. I wouldn't say every week for sure, but, if I am working on something, I log in many times in one week. Of course, to update the VPS's Debian operating system, I regularly run <code>apt-get update</code> and then <code>apt-get upgrade</code>.</p>

<h2>Running EOL Debian 10 Buster</h2>

<p>My GCP VPS is still running Debian 10 Buster <a rel="nofollow" href="https://endoflife.date/debian">(End of Life (EOL) a year ago, September 10, 2022),</a> which might be okay, because the <code>check-support-status</code> utility <a rel="nofollow" href="https://wiki.debian.org/LTS/Using#Check_for_unsupported_packages">doesn't list any installed packages</a> without Long Term Support (LTS).</p>

<pre><code>root@gc:~# man check-support-status
root@gc:~# check-support-status
root@gc:~# echo $?
0
root@gc:~# 
</code></pre>

<h2>Great VPS Uptime!</h2>

<p>Usually I run the <code>w</code> command when I log in. Here's what I saw today. 590 days of uptime isn't bad!</p>

<pre><code>root@gc:~# w
 20:43:01 up 590 days, 16:55,  1 user,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
tom      pts/0    187.189.238.2    19:30    0.00s  0.08s  0.01s sshd: tom [priv]    
root@gc:~# 
</code></pre>

<h2>Low Free Disk Space</h2>

<p>One thing I have noticed is that free disk space on the VPS has been decreasing. Here is what free disk space looked like earlier today.</p>

<pre><code>root@gc:~# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.8G  8.7G  673M  93% /
root@gc:~# 
</code></pre>

<p>The VPS image was set up without a swap partition. Since I might want to add more website or backup files, install additional utilities, or even add a swap file, I thought the remaining 673 MB might be a little small. I decided to take a look around and see if I could find a place or a few places where I could remove a big file that no longer was needed.</p>

<pre><code>root@gc:/# du -sh /home/tom /var/www
77M     /home/tom
67M     /var/www
root@gc:/# 
</code></pre>

<p>Hmm! It didn't look like my home directory or even my website files were too piggy! Looking some more, I was surprised to find that <code>/var</code> was using a lot of space!</p>

<pre><code>root@gc:/# du -sh /var
5.9G    /var
root@gc:/# 
</code></pre>

<p>Wow! "Lots of logs?" I wondered.</p>

<pre><code>root@gc:/# du -sh /var/*
1.2M    /var/backups
5.7G    /var/cache
156M    /var/lib
4.0K    /var/local
0       /var/lock
13M     /var/log
3.3M    /var/mail
4.0K    /var/opt
0       /var/run
8.7M    /var/spool
12K     /var/tmp
67M     /var/www
root@gc:/# 
</code></pre>

<p>What's using all that space in <code>/var/cache</code>?</p>

<pre><code>root@gc:/# du -sh /var/cache/*
108K    /var/cache/apparmor
5.7G    /var/cache/apt
3.8M    /var/cache/debconf
20K     /var/cache/ldconfig
2.5M    /var/cache/man
4.0K    /var/cache/private
root@gc:/# 
</code></pre>

<p>Oh! It's the package system! Four years of .deb files live there! 5.7 GB! Looking at the full output of the below command without the pipe to <code>wc</code>, it was instantly clear that all except the first five of the 346 output lines were .deb files. That's 341 .deb files! Together, the 341 cached .deb files used more than half of my VPS's disk space!</p>

<pre><code>root@gc:/# ls -l /var/cache/apt/* | wc
    346    3090   28173
root@gc:/# 
</code></pre>

<h2>About .deb Files</h2>

<p>Binary .deb files are packages containing binaries which are <a rel="nofollow" href="https://www.debian.org/doc/manuals/debian-handbook/packaging-system.da.html">"directly useable by <code>dpkg</code>."</a> Source .deb files <a rel="nofollow" href="https://www.debian.org/doc/manuals/debian-handbook/packaging-system.da.html">contain source code.</a></p>

<p>Luckily for small VPSes, after the system has been updated, the <a rel="nofollow" href="https://www.debian.org/doc/manuals/debian-faq/uptodate.en.html">.deb files may be removed.</a></p>

<h2>How To Reclaim Disk Space</h2>

<p>From <code>man apt-get</code>:</p>

<pre><code>       clean
           clean clears out the local repository of retrieved package files. It removes
           everything but the lock file from /var/cache/apt/archives/ and
           /var/cache/apt/archives/partial/.
</code></pre>

<p>After running <code>apt-get clean</code> the VPS got its empty disk space back! 6.4 GB available instead of 673 MB!</p>

<pre><code>root@gc:~# apt-get clean
root@gc:~# ls -l /var/cache/apt/*
total 4
-rw-r----- 1 root root    0 Jan 24  2019 lock
drwx------ 2 _apt root 4096 Sep 13 21:22 partial
root@gc:~# du -sh /var/cache/apt
64K     /var/cache/apt
root@gc:~# df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.8G  3.0G  6.4G  32% /
root@gc:~# 
</code></pre>

<h2>Disabling The Cache</h2>

<p>One possible way to prevent running out of disk space might be to disable the caching of .deb files. From <a rel="nofollow" href="https://manpages.debian.org/stretch/apt/apt.conf.5.en.html"><code>man 5 apt-conf</code>:</a></p>

<pre><code>DIRECTORIES

       [ . . . ]

       Dir::Cache contains locations pertaining to local cache information, such as the two
       package caches srcpkgcache and pkgcache as well as the location to place downloaded
       archives, Dir::Cache::archives. Generation of caches can be turned off by setting
       pkgcache or srcpkgcache to "".
</code></pre>

<p>Please see also this <a rel="nofollow" href="https://lists.debian.org/deity/2014/07/msg00000.html">old Bug #753531 from 2014,</a> which was very fun to read because it <em>almost</em> said <code>rm -rf /*</code>!</p>

<p>It seems possibly safer and generally less work all around to leave the .deb caching defaults as they are. It's easy to empty the cache once in awhile with <code>apt-get clean</code>.</p>

<h2>Conclusion</h2>

<p>For small Debian VPSes which have been in use a  long time, you might want to run <code>apt-get clean</code> to reclaim the large amount of disk space used by the apt cache.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to Become an One-Man NAT VPS Provider?</title>
        <link>https://lowendspirit.com/discussion/5939/how-to-become-an-one-man-nat-vps-provider</link>
        <pubDate>Sat, 20 May 2023 06:31:42 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>tang_cn</dc:creator>
        <guid isPermaLink="false">5939@/discussions</guid>
        <description><![CDATA[<p>Assume you have a dedicated server with /64 IPv6, and your goal is to create some IPv6 NAT VMs. How do you do it? Below is a tutorial about how to install QEMU/KVM and create VMs on Debian via the command line.</p>

<hr />

<h1>0. Advance Notice</h1>

<ul>
<li>Special thanks to <a href="https://lowendspirit.com/profile/Not_Oles" rel="nofollow">@Not_Oles</a> !</li>
<li>This tutorial has been verified to work with Debian 11 on Hetzner's dedicated server.</li>
<li>All commands are executed as root.</li>
<li><p>In this tutorial the host's network configuration is:<br />
<code>Network Interface: eno1</code><br />
<code>IPv4 Address: 192.0.2.2/26</code><br />
<code>IPv4 Gateway: 192.0.2.1</code><br />
<code>IPv6 Address: 2001:db8:ace:babe::1/64</code><br />
<code>IPv6 Gateway: fe80::1</code></p></li>
<li><p>We want to create a private network <code>192.168.0.0/24</code> for VMs; we want to use <code>192.168.0.1</code> as the IPv4 gateway and <code>2001:db8:ace:babe::1</code> as the IPv6 gateway for VMs.</p></li>
<li>We want to create a VM whose IPv4 address is <code>192.168.0.2</code> and IPv6 address is <code>2001:db8:ace:babe:cafe::1/80</code>.</li>
</ul>

<h1>1. Enable IP Forwarding</h1>

<p>Open <code>/etc/sysctl.conf</code>. Find <code>net.ipv4.ip_forward</code>; uncomment this line and set the value to <code>1</code>. Do the same for <code>net.ipv6.conf.all.forwarding</code>.</p>

<p>Save the file; then run <code>sysctl -p</code> to apply changes.</p>

<h1>2. Install Required Packages</h1>

<p><code>apt install qemu-system qemu-utils libvirt-clients libvirt-daemon-system virtinst bridge-utils</code></p>

<h1>3. Modify the Network Configuration</h1>

<h3>3.1 Make a copy of the original <code>/etc/network/interfaces</code></h3>

<p><code>cp -p /etc/network/interfaces /etc/network/interfaces.backup</code></p>

<h3>3.2 Open <code>/etc/network/interfaces</code> and edit</h3>

<p>Comment out eno1's IPv6 configuration, then add the following line:</p>

<p><code>iface eno1 inet6 manual</code></p>

<p>Continue to add the following lines to create an interface <code>br0</code>  for KVM networking:</p>

<pre><code>auto br0
iface br0 inet static
    address 192.168.0.1/24
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
iface br0 inet6 static
    address 2001:db8:ace:babe::1/64
    up ip -6 route add default via fe80::1 dev eno1
</code></pre>

<p><code>bridge ports none</code> means br0 is not attached to any physical interface. <code>bridge_stp off</code> disables Spanning Tree Protocol; usually we don't need it in simple cases. <code>bridge_fd 0</code> sets the forwarding delay time to 0; 0 is good in simple cases. The <code>iptables</code> line allows LAN nodes with private IP addresses to communicate with external public networks. The <code>ip -6 route</code> line specifies the IPv6 gateway.</p>

<p>Save the file; then run <code>systemctl restart networking.service</code> to apply changes.</p>

<p></p><details><summary>Example: my ORIGINAL /etc/network/interfaces</summary>

<pre><code>source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet static
    address 192.0.2.2
    netmask 255.255.255.192
    gateway 192.0.2.1
    # route 192.0.2.0/26 via 192.0.2.1
    up route add -net 192.0.2.0 netmask 255.255.255.192 gw 192.0.2.1 dev eno1
iface eno1 inet6 static
    address 2001:db8:ace:babe::1
    netmask 64
    gateway fe80::1
</code></pre>

<p></p></details><br />
<details><summary>Example: my NEW /etc/network/interfaces</summary>

<pre><code>source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet static
    address 192.0.2.2
    netmask 255.255.255.192
    gateway 192.0.2.1
    # route 192.0.2.0/26 via 192.0.2.1
    up route add -net 192.0.2.0 netmask 255.255.255.192 gw 192.0.2.1 dev eno1
iface eno1 inet6 manual

auto br0
iface br0 inet static
    address 192.168.0.1/24
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
iface br0 inet6 static
    address 2001:db8:ace:babe::1/64
    up ip -6 route add default via fe80::1 dev eno1
</code></pre>

<p></p></details>

<h1>4. Create the VM</h1>

<p><code>virt-install --name YOUR_VM_NAME --ram MEMORY_SIZE_IN_MB --vcpus=NUMBER_OF_CORES --disk /PATH/TO/VIRTUAL/DISK/IMAGE.qcow2,device=disk,bus=virtio,size=DISK_SIZE_IN_GB,format=qcow2 --graphics vnc,listen=0.0.0.0,port=VNC_PORT,password=VNC_PASSWORD --network bridge=br0 --noautoconsole --cdrom /PATH/TO/ISOFILE.iso --boot cdrom,hd</code></p>

<p></p><details><summary>Example</summary><br />
We want to create a VM whose name is TEST with 1GB memory, 1 core, and 10GB disk. TEST will be stored at /var/kvm/TEST.qcow2. The VNC port is 5901 and the VNC password is Hello1. We will use /var/iso/Debian.iso to install Debian on TEST.

<p><code>virt-install --name TEST --ram 1024 --vcpus=1 --disk /var/kvm/TEST.qcow2,device=disk,bus=virtio,size=10,format=qcow2 --graphics vnc,listen=0.0.0.0,port=5901,password=Hello1 --network bridge=br0 --noautoconsole --cdrom /var/iso/Debian.iso --boot cdrom,hd</code><br />
</p></details>

<h1>5. Configure Guest Networking</h1>

<p>Because we haven't configured the DHCP service on the host, we have to manually set the VM network settings. If you are using a netinst image to install the OS, then you need to set the IP address to 192.168.0.2/24 and the gateway to 192.168.0.1 during the installation.</p>

<p></p><details><summary>Example: Debain guest /etc/network/interfaces</summary>

<pre><code>source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

allow-hotplug ens3
iface ens3 inet static
    address 192.168.0.2/24
    gateway 192.168.0.1
iface ens3 inet6 static
    address 2001:db8:ace:babe:cafe::1/80
    dns-nameservers 2606:4700:4700::1001
    gateway 2001:db8:ace:babe::1
</code></pre>

<p></p></details>
]]>
        </description>
    </item>
    <item>
        <title>How To Setup A Mail Relay Server To Relay Mail Through MXRoute [CentOS, Alma, Rocky]</title>
        <link>https://lowendspirit.com/discussion/5288/how-to-setup-a-mail-relay-server-to-relay-mail-through-mxroute-centos-alma-rocky</link>
        <pubDate>Thu, 19 Jan 2023 04:28:15 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>FrankZ</dc:creator>
        <guid isPermaLink="false">5288@/discussions</guid>
        <description><![CDATA[<p>This is a guide on how to set up a sendmail mail relay server to relay outbound mail via MXRoute.  You will not need to have a reverse DNS (ptr) record for this VM's IPv4 address or worry about IP reputation. You can use this relay server to relay mail through MXRoute from any other VPS as well.<br />
If you're sending a limited amount of mail this outbound only mail relay server can be setup on a small VM with as little as 1 core, 512MB Ram, 5GB disk. If you send a lot of mail than you should up size your VM accordingly.</p>

<p>In part one of this guide we will set up an outbound only mail relay server that will connect and send mail via MXRoute.<br />
In part two we will show how to set up sendmail on any VPS that you want to relay mail through the outbound only mail relay server that you set up in part one.  You can also use postfix or any other mail service on the secondary servers to relay through the outbound only mail relay server.</p>

<p>NOTE: In an effort to make this rather long guide a more reasonable size I have put many of the code blocks that you will need to copy into display pull downs. You will need to click the <img src="https://i.postimg.cc/Jhq82hGP/display-pointer.png" alt="" title="" /> to see this information.</p>

<hr />

<h1> Part One</h1>

<h3>Install required packages </h3>

<p>CentOS 7: <br />
<code>yum -y install sendmail sendmail-cf cyrus-sasl cyrus-sasl-plain</code><br />
<code>yum -y remove postfix</code></p>

<p>CentOS 8, Alma8linux, Rockylinux:<br />
<code>dnf -y install sendmail sendmail-cf cyrus-sasl cyrus-sasl-plain</code><br />
<code>dnf -y remove postfix</code></p>

<h3>Make sure your hostname is set </h3>

<p>Edit <code>/etc/hosts</code> and ensure there is a line <code>[your IPv4]</code> tab <code>[your host name]</code><br />
Edit <code>/etc/sysconfig/network</code> and ensure there is a line <code>HOSTNAME=[your host name]</code></p>

<h3> Setup the certificates </h3>

<p>Get a cert from Let's Encrypt for your mail relay server (I am not showing how to do this here)<br />
Make a subdirectory called "certs" under /etc/mail/:<br />
<code>mkdir /etc/mail/certs</code></p>

<p></p><details><br />
<summary>Copy the cert template in this drop down to <code>/etc/mail/certs/sendmail.pem</code> using a text editor </summary>

<table>
 <tr><td>
-----BEGIN PRIVATE KEY-----<br />
Put your mail relay host private key here<br />
-----END PRIVATE KEY-----<br />
-----BEGIN CERTIFICATE-----<br />
Put your mail relay host certificate here<br />
-----END CERTIFICATE-----<br />
-----BEGIN CERTIFICATE-----<br />
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP
R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx
sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm
NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg
Z3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG
/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC
AYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB
Af8CAQAwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYfr52LFMLGMB8GA1UdIwQYMBaA
FHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw
AoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzAnBgNVHR8EIDAeMBygGqAYhhZodHRw
Oi8veDEuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB
gt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W
PTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl
ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz
CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm
lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4
avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
nLRbwHOoq7hHwg==<br />
-----END CERTIFICATE-----<br />
-----BEGIN CERTIFICATE-----<br />
MIIFYDCCBEigAwIBAgIQQAF3ITfU6UK47naqPGQKtzANBgkqhkiG9w0BAQsFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTIxMDEyMDE5MTQwM1oXDTI0MDkzMDE4MTQwM1ow
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwggIiMA0GCSqGSIb3DQEB
AQUAA4ICDwAwggIKAoICAQCt6CRz9BQ385ueK1coHIe+3LffOJCMbjzmV6B493XC
ov71am72AE8o295ohmxEk7axY/0UEmu/H9LqMZshftEzPLpI9d1537O4/xLxIZpL
wYqGcWlKZmZsj348cL+tKSIG8+TA5oCu4kuPt5l+lAOf00eXfJlII1PoOK5PCm+D
LtFJV4yAdLbaL9A4jXsDcCEbdfIwPPqPrt3aY6vrFk/CjhFLfs8L6P+1dy70sntK
4EwSJQxwjQMpoOFTJOwT2e4ZvxCzSow/iaNhUd6shweU9GNx7C7ib1uYgeGJXDR5
bHbvO5BieebbpJovJsXQEOEO3tkQjhb7t/eo98flAgeYjzYIlefiN5YNNnWe+w5y
sR2bvAP5SQXYgd0FtCrWQemsAXaVCg/Y39W9Eh81LygXbNKYwagJZHduRze6zqxZ
Xmidf3LWicUGQSk+WT7dJvUkyRGnWqNMQB9GoZm1pzpRboY7nn1ypxIFeFntPlF4
FQsDj43QLwWyPntKHEtzBRL8xurgUBN8Q5N0s8p0544fAQjQMNRbcTa0B7rBMDBc
SLeCO5imfWCKoqMpgsy6vYMEG6KDA0Gh1gXxG8K28Kh8hjtGqEgqiNx2mna/H2ql
PRmP6zjzZN7IKw0KKP/32+IVQtQi0Cdd4Xn+GOdwiK1O5tmLOsbdJ1Fu/7xk9TND
TwIDAQABo4IBRjCCAUIwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYw
SwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5pZGVudHJ1
c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTEp7Gkeyxx
+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEEAYLfEwEB
ATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2VuY3J5cHQu
b3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E
U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu
MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC
5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW
9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG
WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O
he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC
Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5<br />
-----END CERTIFICATE-----</td></tr> </table>

<p></p></details><br />
After copying the cert template to <code>/etc/mail/certs/sendmail.pem</code> you will need to modify the following: <br />
1. Replace <code>Put your mail relay host private key here</code> with the private key you received with your certificate from Let's Encrypt for your relay mail server host name.<br />
2. Replace <code>Put your mail relay host certificate here</code> with the certificate you received from Let's Encrypt for your relay mail server host name.

<p>While in the directory <code>/etc/mail/certs</code> execute the commands:<br />
<code>openssl dhparam -out dhparam.pem 4096</code><br />
and <br />
<code>ln -s /etc/ssl/certs/ca-bundle.crt ca-bundle.crt</code><br />
and <br />
<code>chmod 600 dhparam.pem sendmail.pem</code></p>

<p>You should now have three files in your <code>/etc/mail/certs</code> directory</p>

<blockquote><div>
  <p>ca-bundle.crt   [a soft link]<br />
  dhparam.pem<br />
  sendmail.pem</p>
</div></blockquote>

<p>The certificate will need to be undated before it expires.<br />
I should add a script to auto update the mail server cert from LetsEncrypt. (coming soon&trade;)</p>

<h3>Configure sendmail.mc </h3>

<p>Move the original sendmail.mc to sendmail.mc.org: <br />
<code>mv /etc/mail/sendmail.mc /etc/mail/sendmail.mc.org</code></p>

<p></p><details><br />
 <summary>Copy the code in this drop down to <code>/etc/mail/sendmail.mc</code> using a text editor </summary>

<table>
 <tr><td>divert(-1)dnl</td></tr>
 <tr><td>dnl #</td></tr>
 <tr><td>include(`/usr/share/sendmail-cf/m4/cf.m4')dnl</td></tr>
 <tr><td>VERSIONID(`setup for linux')dnl</td></tr>
 <tr><td>OSTYPE(`linux')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # Do not advertize sendmail version.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # default logging level is 9, you might want to set it higher to</td></tr>
 <tr><td>dnl # debug the configuration </td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl define(`confLOG_LEVEL', `9')dnl </td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl #  Your outgoing mail will be sent out through an external MXRoute server</td></tr>
 <tr><td>dnl #  Change the friday.mxlogin.com to the MXRoute server to which you have been assigned</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`SMART_HOST',`friday.mxlogin.com')dnl</td></tr>
 <tr><td>define(`RELAY_MAILER_ARGS',`TCP $h 587')</td></tr>
 <tr><td>define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl</td></tr>
 <tr><td>FEATURE(`authinfo',`hash /etc/mail/authinfo')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confDEF_USER_ID', ``8:12'')dnl</td></tr>
 <tr><td>define(`confTO_CONNECT', `1m')dnl</td></tr>
 <tr><td>define(`confTRY_NULL_MX_LIST', `True')dnl</td></tr>
 <tr><td>define(`confDONT_PROBE_INTERFACES', `True')dnl</td></tr>
 <tr><td>define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl</td></tr>
 <tr><td>define(`ALIAS_FILE', `/etc/aliases')dnl</td></tr>
 <tr><td>define(`STATUS_FILE', `/var/log/mail/statistics')dnl</td></tr>
 <tr><td>define(`UUCP_MAILER_MAX', `2000000')dnl</td></tr>
 <tr><td>define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl</td></tr>
 <tr><td>define(`confPRIVACY_FLAGS', `goaway,restrictqrun')dnl</td></tr>
 <tr><td>define(`confAUTH_OPTIONS', `A')dnl</td></tr>
 <tr><td>PrivacyOptions=nobodyreturn</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confCACERT_PATH', `/etc/mail/certs')dnl</td></tr>
 <tr><td>define(`confCACERT', `/etc/mail/certs/ca-bundle.crt')dnl</td></tr>
 <tr><td>define(`confSERVER_CERT', `/etc/mail/certs/sendmail.pem')dnl</td></tr>
 <tr><td>define(`confSERVER_KEY', `/etc/mail/certs/sendmail.pem')dnl</td></tr>
 <tr><td>define(`confCLIENT_CERT', `/etc/mail/certs/sendmail.pem')dnl</td></tr>
 <tr><td>define(`confCLIENT_KEY', `/etc/mail/certs/sendmail.pem')dnl</td></tr>
 <tr><td>define(`confDH_PARAMETERS', `/etc/mail/certs/dhparam.pem')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confTO_IDENT', `0')dnl</td></tr>
 <tr><td>FEATURE(`no_default_msa', `dnl')dnl</td></tr>
 <tr><td>FEATURE(`smrsh', `/usr/sbin/smrsh')dnl</td></tr>
 <tr><td>FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl</td></tr>
 <tr><td>FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl</td></tr>
 <tr><td>FEATURE(redirect)dnl</td></tr>
 <tr><td>FEATURE(always_add_domain)dnl</td></tr>
 <tr><td>FEATURE(use_cw_file)dnl</td></tr>
 <tr><td>FEATURE(use_ct_file)dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following limits the number of processes sendmail can fork to accept</td></tr>
 <tr><td>dnl # incoming messages or process its message queues to 20.) sendmail refuses</td></tr>
 <tr><td>dnl # to accept connections once it has reached its quota of child processes.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confMAX_DAEMON_CHILDREN', `20')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # Limits the number of new connections per second. This caps the overhead</td></tr>
 <tr><td>dnl # incurred due to forking new sendmail processes. May be useful against</td></tr>
 <tr><td>dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address</td></tr>
 <tr><td>dnl # limit would be useful but is not available as an option at this writing.)</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>define(`confCONNECTION_RATE_THROTTLE', `3')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The -t option will retry delivery if e.g. the user runs over his quota.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl</td></tr>
 <tr><td>FEATURE(`access_db', `hash -T&lt;TMPF&gt; -o /etc/mail/access.db')dnl</td></tr>
 <tr><td>FEATURE(`blacklist_recipients')dnl</td></tr>
 <tr><td>EXPOSED_USER(`root')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following causes sendmail to only listen on the IPv4 loopback address</td></tr>
 <tr><td>dnl # 127.0.0.1 and not on any other network devices. Remove the loopback</td></tr>
 <tr><td>dnl # address restriction to accept email from the internet or intranet.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following causes sendmail to additionally listen to port 587 for</td></tr>
 <tr><td>dnl # mail from MUAs that authenticate. Roaming users who can't reach their</td></tr>
 <tr><td>dnl # preferred sendmail daemon due to port 25 being blocked or redirected find</td></tr>
 <tr><td>dnl # this useful.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>DAEMON_OPTIONS(`Port=submission,Addr=127.0.0.1, Name=MSA, M=Ea')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following causes sendmail to additionally listen to port 465, but</td></tr>
 <tr><td>dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed</td></tr>
 <tr><td>dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't</td></tr>
 <tr><td>dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS</td></tr>
 <tr><td>dnl # and doesn't support the deprecated smtps; Evolution &lt;1.1.1 uses smtps&lt;/td&gt;</td></tr>
 <tr><td>dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # For this to work your OpenSSL certificates must be configured.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA,Family=inet,Addr=127.0.0.1,M=s')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following causes sendmail to additionally listen on the IPv6 loopback</td></tr>
 <tr><td>dnl # device. Remove the loopback address restriction listen to the network.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # enable both ipv6 and ipv4 in sendmail:</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')</td></tr>
 <tr><td>dnl # </td></tr> 
 <tr><td>dnl # We strongly recommend not accepting unresolvable domains if you want to</td></tr>
 <tr><td>dnl # protect yourself from spam. However, the laptop and users on computers</td></tr>
 <tr><td>dnl # that do not have 24x7 DNS do need this.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # FEATURE(`accept_unresolvable_domains')dnl</td></tr>
 <tr><td>dnl #</td></tr>
 <tr><td>dnl # Also accept email sent to "localhost.localdomain" as local email.</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>LOCAL_DOMAIN(`localhost.localdomain')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # The following example makes mail from this host and any additional</td></tr>
 <tr><td>dnl # specified domains appear to be sent from mydomain.com</td></tr>
 <tr><td>dnl #</td></tr>
 <tr><td>dnl MASQUERADE_AS(`mydomain.com')dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # masquerade not just the headers, but the envelope as well</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl FEATURE(masquerade_envelope)dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl # masquerade not just <a href="https://lowendspirit.com/profile/mydomainalias" rel="nofollow">@mydomainalias</a>.com, but <a href="https://lowendspirit.com/profile/%2A" rel="nofollow">@*</a>.mydomainalias.com as well</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl FEATURE(masquerade_entire_domain)dnl</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>dnl MASQUERADE_DOMAIN(localhost)dnl</td></tr>
 <tr><td>dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl</td></tr>
 <tr><td>dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl</td></tr>
 <tr><td>dnl MASQUERADE_DOMAIN(mydomain.lan)dnl</td></tr>
 <tr><td>define(`confHELO_NAME',`myhost.mydomain')</td></tr>
 <tr><td>define(`confDOMAIN_NAME',`myhost.mydomain')</td></tr>
 <tr><td>CLIENT_OPTIONS(`Addr=Family=inet,Addr=123.123.123.123')</td></tr>
 <tr><td>CLIENT_OPTIONS(`Family=inet6,Addr=::ffff:123.123.123.123')dnl</td></tr>
 <tr><td>dnl # FEATURE(`require_rdns')</td></tr>
 <tr><td>DAEMON_OPTIONS(`Name=MTARelay,Family=inet,Port=2525')</td></tr>
 <tr><td>dnl # </td></tr>
 <tr><td>LOCAL_CONFIG</td></tr>
 <tr><td>dnl # Certificates and keys must also have been configured</td></tr>
 <tr><td>O CipherList=ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:!DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA</td></tr>
 <tr><td>dnl # Disable SSLv2, SSLv3, TLSv1.0 (TLSv1.1 and TLSv1.2 should be supported)</td></tr>
 <tr><td>O ServerSSLOptions=+SSL_OP_NO_SSLv2 +SSL_OP_NO_SSLv3 +SSL_OP_NO_TLSv1 +SSL_OP_CIPHER_SERVER_PREFERENCE</td></tr>
 <tr><td>dnl # Set options required when operating as client to remote servers</td></tr>
 <tr><td>O ClientSSLOptions=+SSL_OP_NO_SSLv2 +SSL_OP_NO_SSLv3 +SSL_OP_NO_TLSv1</td></tr>
 <tr><td>MAILER(smtp)dnl</td></tr>
 <tr><td>MAILER(procmail)dnl</td></tr>
 <tr><td>dnl MAILER(cyrusv2)dnl</td></tr> </table>

<p></p></details><br />
After copying the code to <code>/etc/mail/sendmail.mc</code> you will need to modify the following: <br />
1. Change <code>friday.mxlogin.com</code> to the mail server you were assigned by MXRoute.<br />
2. Change both occurances of <code>123.123.123.123</code> to the IPv4 of your mail relay server.<br />
3. Change both occurances of <code>myhost.mydomain</code> to the hostname.domainname of your mail relay server.

<p>After making the above changes execute the command: <br />
<code>m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</code></p>

<h3>Setup MXRoute authinfo</h3>

<p></p><details><br />
 <summary>Copy the code in this drop down to <code>/etc/mail/authinfo</code> using a text editor </summary>

<table>
 <tr><td>
AuthInfo:friday.mxlogin.com &quot;U:[your user name]<a href="https://lowendspirit.com/profile/friday" rel="nofollow">@friday</a>.mxlogin.com" "I:[your user name]<a href="https://lowendspirit.com/profile/friday" rel="nofollow">@friday</a>.mxlogin.com" "P:[your password]" "M:LOGIN PLAIN"
</td></tr> </table>

<p></p></details><br />
After copying the code to <code>/etc/mail/authinfo</code> you will need to modify the following: <br />
1. Change both occurances of <code>[your user name]</code> to the username that you were assigned by MXRoute.<br />
2. Change all occurances of <code>friday.mxlogin.com</code> to the mail server you were assigned by MXRoute.<br />
3. Change <code>[your password]</code> to the password that you were assigned by MXRoute.

<p>After making the above changes ensure that you are in the directory <code>/etc/mail</code> and execute the command:<br />
<code>makemap hash authinfo &lt; authinfo</code></p>

<h3>Enable sendmail, saslauthd, and reboot</h3>

<p>Execute the following commands to enable sendmail and saslauthd to start on boot and then reboot: <br />
<code>/usr/bin/systemctl enable sendmail.service</code><br />
<code>/usr/bin/systemctl enable saslauthd.service</code><br />
<code>reboot</code></p>

<h3>Set SPF DNS record </h3>

<p>Add the IPv4 address of this mail relay server and MXRoute to your DNS spf record:<br />
<code>TXT     "v=spf1 +ip4:[IPv4 address of this mail relay server] include:mxlogin.com -all"</code></p>

<h3>Is it working ? </h3>

<p>Test if everything works as expected by running this command:<br />
  <code>echo "Subject: hello" | sendmail you@yourdomain</code> <br />
(replace <code>you@yourdomain</code> with your email address)</p>

<p>Check the log file:<br />
<code>cat /var/log/maillog</code></p>

<p>If you see <strong>stat=Sent (OK</strong>, you are sending your mail through MXRoute:</p>

<blockquote><div>
  <p>Jan  9 16:40:55 f sendmail[2246]: 309KF3K5001390: to=&lt;you@yourdomain&gt;, ctladdr=&lt;root@[your relay mail server]&gt; (0/0), delay=01:25:51, xdelay=00:00:01, mailer=relay, pri=750282, relay=friday.mxlogin.com. [159.69.65.104], dsn=2.0.0, <strong>stat=Sent (OK</strong> id=1pEzt1-0004Nf-UP)</p>
</div></blockquote>

<p>If you see <strong>stat=Deferred</strong>, it is not working:</p>

<blockquote><div>
  <p>Jan  9 15:30:02 f sendmail[1848]: 309KF3K5001390: to=&lt;you@yourdomain&gt;, ctladdr=&lt;root@[your relay mail server]&gt; (0/0), delay=00:14:58, xdelay=00:00:00, mailer=relay, pri=390282, relay=friday.mxlogin.com., dsn=4.0.0, <strong>stat=Deferred</strong></p>
</div></blockquote>

<h3>NOTES</h3>

<p>If you make any revisions to <code>/etc/mail/sendmail.mc</code> you will need to execute:<br />
<code>m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</code></p>

<p>If you make any revisions to <code>/etc/mail/authinfo</code> you will need to execute:<br />
<code>makemap hash authinfo &lt; authinfo</code></p>

<p>Then restart sendmail:<br />
<code>/usr/bin/systemctl restart sendmail.service</code></p>

<p>So that the changes you made will take effect.</p>

<h3>Are we done yet ? </h3>

<p>If you are NOT planning to have any other VMs relay through this mail relay server you are done. All mail from this VM will relay via MXRoute. While sendmail is listening on port 2525 no mail will be relayed except from localhost.</p>

<p>If you DO want to relay other VMs mail through this mail server to also send their mail via MXRoute then continue below.</p>

<h3>Allow other VMs to relay through this server</h3>

<p>Open <code>/etc/mail/access</code> in your favorite text editor and add each of the VMs that you want to allow mail to relay through this server by adding their IP address, each on a seperate line, at the bottom of the file as  <code>Connect:123.123.123.123          RELAY</code>.</p>

<p></p><details><br />
 <summary>An example file is shown in this drop down. Change 123.123.123.123 to the IPv4 of the VM you wish to allow to relay via your mail relay server.</summary>

<table>
 <tr><td>
# Check the /usr/share/doc/sendmail/README.cf file for a description <br />
# of the format of this file. (search for access_db in that file)<br />
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc<br />
# package.<br />
#<br />
# If you want to use AuthInfo with "M:PLAIN LOGIN", make sure to have the<br />
# cyrus-sasl-plain package installed.<br />
#<br />
# By default we allow relaying from localhost...<br />
Connect:localhost.localdomain           RELAY<br />
Connect:localhost                       RELAY<br />
Connect:127.0.0.1                       RELAY<br />
#<br />
Connect:123.123.123.123          RELAY<br />
</td></tr> </table>

<p></p></details>

<p>After you have added all the VMs you wish to allow to relay to MXRoute via this mail server, and saved the file, execute this command:<br />
 <code>makemap hash /etc/mail/access.db &lt; /etc/mail/access</code></p>

<p>Restart sendmail:<br />
<code>/usr/bin/systemctl restart sendmail.service</code></p>

<p>You will need to execute the two commands above anytime you make any additions or subtractions to the <code>/etc/mail/access</code> file for the changes to take effect.</p>

<h3>Don't forget to open your firewall</h3>

<p>To relay mail via your outbound only mail server from other VMs you must open your firewall for port 2525 access.</p>

<p>For firewalld: <br />
<code>firewall-cmd --permanent --zone=public --add-port=2525/tcp</code><br />
<code>service firewalld stop</code><br />
<code>service firewalld start</code></p>

<hr />

<h1>Part Two</h1>

<p>In part two we will show how to set up sendmail on any VPS that you want to relay mail through the mail relay server that you set up in part one.  It's much easier and faster.</p>

<h3>Install required packages </h3>

<p>CentOS 7: <br />
<code>yum -y install sendmail sendmail-cf</code><br />
<code>yum -y remove postfix</code></p>

<p>CentOS 8, Alma8linux, Rockylinux:<br />
<code>dnf -y install sendmail sendmail-cf</code><br />
<code>dnf -y remove postfix</code></p>

<h3>Make sure your hostname is set </h3>

<p>Edit <code>/etc/hosts</code> and ensure there is a line <code>[your IPv4]</code> tab <code>[your host name]</code><br />
Edit <code>/etc/sysconfig/network</code> and ensure there is a line <code>HOSTNAME=[your host name]</code></p>

<h3>Edit the sendmail.mc file </h3>

<p>Open <code>/etc/mail/sendmail.mc</code> with your favorite text editor and add the lines in the pull down near the bottom of the file between the quoted lines shown above and below the pull down box.</p>

<blockquote><div>
  <p>dnl MASQUERADE_DOMAIN(mydomain.lan)dnl</p>
</div></blockquote>

<p></p><details><summary></summary>

<table> <tr><td>
CLIENT_OPTIONS(`Family=inet6,Addr=::ffff:123.123.123.123')dnl<br />
define(`SMART_HOST',`myrelay.mydomain')dnl<br />
define(`RELAY_MAILER_ARGS', `TCP $h 2525')dnl<br />
</td></tr> </table>

<p></p></details>

<blockquote><div>
  <p>MAILER(smtp)dnl<br />
  MAILER(procmail)dnl<br />
  dnl MAILER(cyrusv2)dnl</p>
</div></blockquote>

<p>After copying the code to <code>/etc/mail/sendmail.mc</code> you will need to modify the following: <br />
1. Change 123.123.123.123 to the IPv4 of the server that is being installed.<br />
2. Change myrelay.mydomain to the hostname.domainname of your mail relay server from part one.</p>

<p>After making the above changes execute the command: <br />
<code>m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</code></p>

<h3>Enable sendmail and reboot</h3>

<p>Execute the following commands to enable sendmail to start on boot and start now : <br />
<code>/usr/bin/systemctl enable sendmail.service</code><br />
<code>reboot</code></p>

<h3>Set SPF DNS record </h3>

<p>If you have not done so previously, add the IPv4 address of the mail relay server and MXRoute to your DNS spf record of the domains for which this VM will be sending mail:<br />
<code>TXT     "v=spf1 +ip4:[IPv4 address of mail relay server] include:mxlogin.com -all"</code></p>

<h3>Is it working ? </h3>

<p>Test if everything works as expected by running this command:<br />
  <code>echo "Subject: hello" | sendmail you@yourdomain</code> <br />
(replace <code>you@yourdomain</code> with your email address)</p>

<p>Check the log file:<br />
<code>cat /var/log/maillog</code></p>

<p>If you see <strong>stat=Sent</strong>, and <strong>Message accepted for delivery</strong> you are sending your mail through your mail relay server:</p>

<blockquote><div>
  <p>Jan 10 04:27:12 localhost sendmail[2993586]: STARTTLS=client, relay=my.relayserver., version=TLSv1.3, verify=OK, cipher=TLS_AES_256_GCM_SHA384, bits=256/256<br />
  Jan 10 04:27:13 localhost sendmail[2993586]: 30A9RCpK2993585: to=you@yourdomain, ctladdr=&lt;root@localhost&gt; (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=149367, relay=my.relayserver. [IPv4 for my.relayserver], dsn=2.0.0, <strong>stat=Sent</strong> (30A9RCkP001947 <strong>Message accepted for delivery)</strong></p>
</div></blockquote>

<p>On the mail relay server from part one these are the logs of the same email message successfully being relayed through to MXRoute:</p>

<blockquote><div>
  <p>Jan 10 04:27:13 my sendmail[1947]: 30A9RCkP001947: from=&lt;root@the1stvps&gt;, size=11346, class=-60, nrcpts=1, msgid=&lt;202301100927.30A9R2jw2993246@the1stvps&gt;, proto=ESMTPS, daemon=MTARelay, relay=the1stvps [IPv4 of 1st vps]<br />
  Jan 10 04:27:16 my sendmail[1949]: STARTTLS=client, relay=friday.mxlogin.com., version=TLSv1.2, verify=OK, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128<br />
  Jan 10 04:27:17 my sendmail[1949]: 30A9RCkP001947: to=&lt;you@yourdomain&gt;, delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=239346, <strong>relay=friday.mxlogin.com.</strong> [159.69.65.104], dsn=2.0.0, <strong>stat=Sent (OK</strong> id=1pFAuc-0004BM-Uh)</p>
</div></blockquote>

<p>If you see <strong>stat=Deferred Connection timed out</strong> , it is not working. <br />
In this case the firewall was not open for port 2525 on mail relay server:</p>

<blockquote><div>
  <p>Jan 10 04:24:01 localhost sendmail[2987677]: 30A8S7uH2987677: to=&lt;you@yourdomain&gt;, delay=08:45:57, xdelay=00:00:00, mailer=relay, pri=931045, relay=my.mailrelayserver., dsn=4.0.0, <strong>stat=Deferred:Connection timed out with my.mailrelayserver.</strong></p>
</div></blockquote>

<p>If you see <strong>stat=User unknown</strong> , it is not working. <br />
In this case the IPv4 of this server was not in the <code>/etc/mail/access file</code> on the mail relay server:</p>

<blockquote><div>
  <p>Jan 10 22:30:47 localhost sendmail[3093806]: 30B3UkCR3093806: to=you@yourdomain, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=32612, relay=my.relayserver. [IPv4 of my.relaysever], dsn=5.7.1, <strong>stat=User unknown</strong></p>
</div></blockquote>

<p>This will be shown on the mail relay server as the following <strong>Relaying denied</strong> error.</p>

<blockquote><div>
  <p>Jan 10 22:30:47 my sendmail[1363]: 30B3UjUR001363: ruleset=check_rcpt, arg1=&lt;you@yourdomain&gt;, relay=the1stvps [IPv4 of 1st VPS], reject=550 5.7.1 &lt;you@yourdomain&gt;... <strong>Relaying denied</strong></p>
</div></blockquote>

<h2>Are we done yet ? </h2>

<p>Yes, for this guide that is it for now.....<br />
But no you are not done yet.  At a minumum servers that send outbound mail should use DKIM in addition to having SPF records and all the good stuff that MXRoute provides.</p>

<hr />

<p><br /></p>

<h2> A warning from MXRoute so as to not cause problems</h2>

<blockquote><div>
  <p><a href="https://lowendspirit.com/profile/jarland" rel="nofollow">@jarland</a> said:<br />
  It’s worth noting that a slight variation on this kind of setup consumes a significant amount of my time trying to protect the infrastructure from being overwhelmed by pure junk that drags down IP reputation by increasing the association between our IPs and spam folders. These are the big line items:</p>
  
  <ol>
  <li>Almost no one who does this cares that their hostname isn’t an actual valid domain, forcing me to locate all of their server hostnames and add them to a banned sender list so they get errors instead of flooding the queue with junk I can’t deliver or bounce.</li>
  <li>That cron job you have set to run every minute sends a notification, and the person who sets this up commonly has all of these emails sent to their Gmail address.</li>
  <li>A simple command line interface or a cron job notification lacks the required headers that a legitimate email client would add without the user noticing.</li>
  </ol>
  
  <p>Number 1 causes our mail queues to be packed full of “root@vps{1..999}” emails that I can’t and won’t deliver because they’re not from valid envelope senders. But I can’t say that these are inherently bad and prevent them from going out before I identify each one of them because temporary DNS issues could cause a sending address to appear invalid that isn’t later. So I queue them, but then I audit the queues every day for this junk and use it to build my banned sender list (ex. *<a href="https://lowendspirit.com/profile/localhost" rel="nofollow">@localhost</a>, *<a href="https://lowendspirit.com/profile/vps1" rel="nofollow">@vps1</a>, *<a href="https://lowendspirit.com/profile/vps" rel="nofollow">@vps</a>.local, etc.).</p>
  
  <p>Number 2 loops in with #1, and the two items work hand in hand to try to overly associate our IP addresses with Gmail’s spam folder, and number 3 comes in here as part of that. A bad sending address, a cron job notification that the user never meant for human consumption (and will never read, save for the 1 in a million user who might), and a lack of valid headers combined with Gmail’s threading feature mean you see one little junk email in your Spam folder, but you actually sent 1,440 junk emails per cron job to Gmail that were all destined to the spam folder. Combine that with the 600 other users doing the same thing, and you then have 864,000 emails from our platform daily, which are guaranteed to land in Gmail’s spam folder. Almost none of those users even meant to send those emails. The users rarely have any idea that they sent them, and they have no plan of gaining anything from it. It’s hard to let all of that through and then tell people I’m focused on doing everything I can to ensure inbox delivery.</p>
  
  <p>All this to say, it’s good to be able to configure your systems to do this, but please keep one thing in mind: The MXroute platform is designed to send emails that are intended for either human consumption or automatic processing. It is not intended to be used as a garbage delivery system for Gmail. It also can’t be used as a garbage delivery system for Gmail, expecting that intentionally sent emails have a high probability of landing in the inbox. It can be one or the other. It can’t be both. Doing everything I can to get intentional emails into the inbox has always been my top focus. So please, if you do this, take a moment to consider what your server is doing and how it may use this configuration in ways you weren’t thinking of at the time.</p>
  
  <p>Do make sure that your sending addresses are always valid. If your hostname isn’t valid, has no MX or SPF records itself, then your cron jobs and other system emails are going to be sending as invalid envelope senders. Think “root@localhost” that’s not valid, even “root@myvps.mydomain.tld” is invalid if myvps.mydomain.tld lacks valid MX/SPF. Most of that is fine if you’re sending to yourself to be delivered to an inbox on the same MXroute server that your service is hosted on, but if you’re sending these out to remote recipients that’s when you really need to dot your I’s and cross your T’s, making sure you have everything done properly.</p>
</div></blockquote>
]]>
        </description>
    </item>
    <item>
        <title>Five Ways to Keep Your Hosting Costs Under Control - Part II</title>
        <link>https://lowendspirit.com/discussion/5355/five-ways-to-keep-your-hosting-costs-under-control-part-ii</link>
        <pubDate>Thu, 26 Jan 2023 15:49:57 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>vyas</dc:creator>
        <guid isPermaLink="false">5355@/discussions</guid>
        <description><![CDATA[<h2>Five Ways to Keep Your Hosting Costs Under Control - Part II</h2>

<p>-By <a rel="nofollow" href="https://blog.amarvyas.in">A. Vyas</a>, January 2023</p>

<p>Read Part I here: <a rel="nofollow" href="https://lowendspirit.com/discussion/5233/five-ways-to-keep-your-hosting-costs-under-control-part-i" title="Five Ways to Keep Your Hosting Costs Under Control - Part I">Five Ways to Keep Your Hosting Costs Under Control - Part I</a></p>

<p></p><div><img src="https://lowendspirit.com/uploads/editor/88/qttdntujv8g4.png" alt="" title="" /></div>

<h3>Introduction</h3>

<p>This is the second and concluding part of a two part series on how you can reduce your web hosting costs in times of high inflation and increasing web hosting fees. In the previous part, we saw how a person "Lata" was able to save nearly 30 US dollars a month by adopting three different approaches to manage her web hosting plans.</p>

<p>To summarise, the three approaches she adopted so far were:<br />
I. Consolidate the hosting plans<br />
II. Moving the hosting to a cheaper location(s)<br />
III. Lower the specifications a notch or two</p>

<p>In this part, let us explore some more ways that she followed, and determine how much savings she was able to achieve in practical terms.</p>

<h4>IV. Check those idlers and duplicates</h4>

<p>Idlers are the bane of the Low End aficionados. Lata's case was no different. She had multiple idlers in her webhosting "Empire", and quite a collection of hosting services were in Singapore. From Lata's home location, Singapore offered the greatest set of options and a reasonable ping ~ 45 ms. It was not the fastest or the best latency she could get, but it was much better than locations in Western Europe (~ 150 ms) or the East Coast, USA (~ 220 ms).</p>

<p>Over the past couple of years Lata kept subscribing to newer plans in <a rel="nofollow" href="https://blog.amarvyas.in/web-hosting/vps-offers-singapore/">Singapore</a>, it almost became a habit of sorts. Recently, she decided to cut the number of plans to half. Gone was a small server, a larger KVM, and a reseller hosting plan. All three were mostly idling.</p>

<p>Lata also had multiple KVM plans in Western Europe. Some could be transferred out, but the renewal for these plans was only a few weeks away. She set them to be terminated at the conclusion of their respective periods.</p>

<p>Scheduling to terminate the service at the end of the billing period also gave her an opportunity to backup and migrate her data in a planned manner, instead of rushing things at the last minute.</p>

<blockquote><div>
  <p>Tip: You can consider transferring out the plans out to other users in the LE community. However, the level of effort and transfer fees in many cases may outweigh the savings.</p>
</div></blockquote>

<p><em>Estimated savings till March 2023 : about 30 US Dollars</em></p>

<blockquote><div>
  <p>Tip: Do you have a few extra idlers that are higher than your comfort level? Do you see an opportunity to cut down on a few plans? A great place to start would be to check if you have multiple plans in the same location.</p>
</div></blockquote>

<h4>V. Check the pricing terms, mode of payment, and currency</h4>

<p>Lata, who is based in Bengaluru in India, was paying for most services in US Dollars through <a rel="nofollow" href="https://paypal.com">PayPal</a>. She began to explore providers who accepted payment in Indian Rupees (INR). The reason for preferring PayPal will be highlighted in a different post, since it involves a deep dive into regulation, tax implications, as well as other technicalities.</p>

<p>She switched some of her services to providers who accepted payment in INR, and paid them using services such as Razorpay. Paying for longer terms (6 months or higher) helped her and the web host save some percentage points in processing fees as well.</p>

<blockquote><div>
  <p>The downside of this approach is that sometimes, this method may not be practical.</p>
</div></blockquote>

<p>For example, Lata had VPS plan with one host from India, for a VPS located in Mumbai. Their monthly charges were 4 US dollars. For annual payment, they offered a 8 dollar discount, that is 40 US Dollars per year. However, Lata was required to pay in US Dollars.</p>

<p>Typically, INR: US Dollar exchange rate is between 70 and 72 (i.e. 70 INR = 1 US Dollar). In recent months, it is hovering closer to INR 80-83 range. Adding Paypal fees, etc- the rate climbs to 85 or 86 INR per US Dollar. In other words, Paypal adds an overhead that negates any potential cost savings. In Lata's case, it resulted in savings of only 2 US Dollars. She dropped the idea of switching the currency and payment terms altogether, and decided to opt for monthly subscription.</p>

<p><em>Estimated savings till March 2023: Nil</em></p>

<blockquote><div>
  <p>Tip: Are you paying month to month, or a slightly longer term? Does your host offer discounts if you pay for six months or annually? Many hosts, in fact, do!</p>
</div></blockquote>

<h3>The savings add up</h3>

<p>Needless to say, the steps taken by Lata helped her save some money. In the first part of this series, we saw how Lata was able to save 87 US dollars. In this part, we saw that her proactive steps yielded savings of another 30 US Dollars.</p>

<p>All in all around 120 US dollars saved upto March 2023, or about 40 US dollars a month, is quite a bit of money saved! Maybe she should get a hot, tempting hosting plan during a future sale this year to reward herself for her efforts. Just kidding.</p>

<h3>Wrapping it all up</h3>

<p>Under normal circumstances, a cost increase due to inflation is expected and mostly a given. Inflation may vary from low single digits to high teens, depending on the country in which one lives. But present times are challenging and dynamic, where double digit inflation is prevalent in many countries at the same time, even those who have not seen such costs in 20 or even 30 years!</p>

<p>Add to this the falling value of the <a rel="nofollow" href="https://www.xe.com/currencyconverter/convert/?Amount=1&amp;From=GBP&amp;To=USD">British Pound</a>, <a rel="nofollow" href="https://www.xe.com/currencyconverter/convert/?Amount=1&amp;From=USD&amp;To=EUR">or the Euro</a>, in comparison to the US Dollar. I already mentioned INR's fall compared to the US Dollar earlier. The story may not be too different where you live.</p>

<p>But these times also present an opportunity to reflect on the hosting situation and think of ways to keep a tab on the hosting costs. I hope Lata's approach gave you an idea or two. However, the story does not end there.</p>

<p>Some questions that may arise such as:</p>

<ul>
<li><p>Has this post covered most of the practical approaches? (i.e. ones that can be considered as low hanging fruits)?</p></li>
<li><p>Did Lata miss something obvious?</p></li>
<li><p>Can she optimize the costs further?</p></li>
</ul>

<p>I leave you with these questions as food for thought, and may the Low End Spirit in you figure out the best way(s) for you.</p>

<hr />

<p>Author's Note: Thanks to the two reviewers, who shall remain unnamed, for their feedback and suggestions for this post.</p>
]]>
        </description>
    </item>
    <item>
        <title>Five Ways to Keep Your Hosting Costs Under Control - Part I</title>
        <link>https://lowendspirit.com/discussion/5233/five-ways-to-keep-your-hosting-costs-under-control-part-i</link>
        <pubDate>Tue, 10 Jan 2023 05:41:42 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>vyas</dc:creator>
        <guid isPermaLink="false">5233@/discussions</guid>
        <description><![CDATA[<h1>Five Ways to Keep Your Hosting Costs Under Control - Part I</h1>

<p>-By <a rel="nofollow" href="https://blog.amarvyas.in">A. Vyas</a>, January 2023</p>

<p></p><div><img src="https://lowendspirit.com/uploads/editor/88/qttdntujv8g4.png" alt="" title="" /></div>

<p>(This is a two part series that is aimed to help customers looking to optimize their web hosting costs, although many of the suggestions may apply to the web hosts themselves)</p>

<h4>Introduction</h4>

<p>It is early January 2023 as I write this post. The 2022 end of the year Holiday season has just concluded, the Black Friday/ Cyber Monday and Christmas/ New Year Sales have concluded, and hopefully many of you still have some money left over to pay for your renewing your web hosting plans! This period becomes allows some time to reflect on how much one is spending on subscriptions in general and web hosting services in particular. The possibility of an economic downturn is one reason. The other factor, which I have mentioned below, is already a reality.</p>

<p>Over the past few months, many web hosting providers have increased their hosting fees on account of rising costs. European countries in particular have witnessed very high energy costs, which has added to the problem of high inflation. This has resulted in higher costs for running their business. In most cases, they have no choice other than passing on these increases to their customers.</p>

<p>In such a situation, how can a user, who is say a typical customer of Low End hosting, keep the hosting costs low? Let us take a look at five different ways to help you keep a tight leash over your hosting costs in the coming months.</p>

<h4>Web Hosting Plans- The Problem of Plenty</h4>

<p>Before we get down to business, let us try and answer this all important question:</p>

<blockquote><div>
  <p>Do you have too many hosting plans, or do you have a large collection of hosting subscriptions?</p>
</div></blockquote>

<p>If the answer is yes, you are in a perfect position to take a deep, hard look at your respective hosting collections. There may be some impulse purchases, and some plans that do not make any sense now. Those are ripe to be dropped or culled. For example,</p>

<p>Is there a 2 GB shared hosting plan that you purchased during last Black Friday? Or an older OVZ server that is still active?</p>

<p>If the answer is no, you are in a good position to start optimizing further- maybe switch a plan or two to a lower tier. We will discuss that option in Part II of this series.</p>

<h3>Where and How to begin reducing your web hosting costs?</h3>

<h4>Lata's Approach to Saving on Web Hosting</h4>

<p>Let us take a look at the Web Hosting "Empire" of a person called Lata. She has gathered quite a number of webhosting plans over the years. When she was thinking of reducing these expenses she adopted the following approach.</p>

<p>First, she prepared a chart that lists all the hosting plans she actively subscribed to. In Lata's case, as might be the situation with many of you, this presented quite a collection of Shared hosting, Reseller, NAT, OVZ, KVM and Storage servers. In addition, she also has subscriptions for many SaaS (Software as a Service) based hosting plans from providers like <a rel="nofollow" href="https://jimdo.com">Jimdo</a> and <a rel="nofollow" href="https://shopify.com">Shopify</a>.</p>

<p>In other words, short of a Dedicated server, Lata had subscribed to practically every sort of hosting plan one may typically find here on Lowend Spirit(<a href="https://lowendspirit.com/" rel="nofollow">https://lowendspirit.com/</a>). While some of the hosting plans have been procured for friends and family, others are for her customers. Finally, a few plans are for her own personal or hobby projects.</p>

<p><img src="https://lowendspirit.com/uploads/editor/kl/up6fu6kvx8sr.png" alt="" title="" /></p>

<p><sub>Lata's Webhosting collection</sub></p>

<p>Let us see how Lata began to arrive at optimizing her costs.You can also develop a method that suits your situation the best. Lata tried five different approaches to arrive at some cost savings. In this first part of the series, we will look at three approaches. The balance will be covered in the second installment.</p>

<blockquote><div>
  <p>For sake of simplicity, all costs are mentioned in US Dollar terms, and any savings are projected to occur between January and March 2023.</p>
</div></blockquote>

<h4>I. Consolidate the hosting plans</h4>

<p>Once Lata drew up her "hosting empire", she added up the fees for these plans. She sorted them by fees incurred, starting from the highest to lowest. Most of her plans were paid annually or for a longer duration. Many were up for renewal over the next couple of months. This helped her to start prioritizing which hosting plans she should close. Terminating the most expensive plans alone could have added to her savings quite a bit, had it been a practical approach.</p>

<p><em>Estimated savings till March 2023 : about 40 US Dollars</em></p>

<blockquote><div>
  <p>Tip: List down the pricing for all the plans you have, that alone will be a great starting point before you start looking at savings.</p>
</div></blockquote>

<h4>II. Moving the hosting to a cheaper location(s)</h4>

<p>Hosting in Europe typically used to be cheaper till recent months. Generally speaking, this is likely to remain for some time, depending on how the current energy crisis evolves. However, these times also present an opportunity to move the hosting to a different location - say North America. And, in some (very rare cases) also Asia.</p>

<p>Lata followed this approach and reached out to some of her hosting providers who had services across multiple regions. She asked them,</p>

<blockquote><div>
  <p>"Would they consider moving some of her services to cheaper locations?"</p>
</div></blockquote>

<p>Some providers agreed, others refused, a couple of them offered to move her for a fee. Lata did a quick cost to benefit analysis, and decided that some non-critical service(s) could be moved to cheaper locations. However, the mission critical stuff that required the lowest latency or higher reliability remained at their present locations.</p>

<p><em>Estimated savings till March 2023 : about 35 US Dollars</em></p>

<blockquote><div>
  <p>Tip: Do you have hosting plans with provides who have services across multiple regions? Maybe a chat with the support team could help you figure out some savings.</p>
</div></blockquote>

<h4>III. Lower the specifications a notch or two</h4>

<p>The third approach Lata adopted involved asking an all-important question:</p>

<blockquote><div>
  <p>Did she really needed the plans with higher specifications- hosting she had subscribed to "Just in case"? </p>
</div></blockquote>

<p>For example, she had a shared hosting plan in North America with about 20 GB of Storage space, with a maximum of 10 domains, and 1 TB bandwidth per month. Most of this capacity was lying unused. She decided to move to a lower plan that had half the specifications. This resulted in nearly 30 percent savings.</p>

<p><em>Estimated savings till March 2023: about 12 US Dollars</em></p>

<blockquote><div>
  <p>Tip: In times of tightening the belt, scaling down a plan or two can help save some costs.</p>
</div></blockquote>

<h3>The savings do add up, and the journey is not yet complete.</h3>

<p>By adopting the above three approaches, (consolidating the hosting plans, moving the hosting plans to cheaper locations, and lowering the specifications on the plans) Lata is projected to save around 87 US Dollars over three months (or about 30 US dollars a month) in hosting fees. And she was not done yet! In the second part of this series, let us explore some more ways in which you can learn form Lata's experience and determine ways to lower your own web hosting costs.</p>

<p>Note: This article was originally written in October 2022, the estimated savings and timelines have been revised to reflect the costs at the time of publication.</p>
]]>
        </description>
    </item>
    <item>
        <title>Alternatives to CentOS -- After The Storm</title>
        <link>https://lowendspirit.com/discussion/4049/alternatives-to-centos-after-the-storm</link>
        <pubDate>Thu, 14 Apr 2022 03:47:38 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>vyas</dc:creator>
        <guid isPermaLink="false">4049@/discussions</guid>
        <description><![CDATA[<h1>Alternatives to CentOs- After The Storm</h1>

<p>Welcome to this first post of 2022 on the LES Blog!</p>

<p>Nearly 14 months have passed since the seminal announcement by Red Hat about the End of Life (EOL) for CentOs8. The much loved server oriented Linux distribution did reach it EOL on December 31, 2021. Over this period, how have the users coped up? What are the alternatives they have settled for? Did the predictions of doom and gloom really come true? Finally, which of the several alternative projects have made the greatest headway or found  the highest user acceptance? Read on to learn more. <br /><br />
<img src="https://talk.lowendspirit.com/uploads/editor/2h/lcz0t11ueysb.jpg" width="400x" alt="CentOS logo- Wikimedia Commons" /><br /><br />
Source: Wikimedia Commons</p>

<blockquote><div>
  <p>You can listen to the audio version of this post at (<a rel="nofollow" href="https://studio.lovo.ai/share/o/61227312-55da-4eef-a759-13e6cdecd6c8/60d4551aab24d20012ab6216">External Link</a>)</p>
</div></blockquote>

<h3>In This Post</h3>

<ol>
<li><a rel="nofollow" href="#Background">Background: RedHat Discontinues development for CentOs8</a></li>
<li><a rel="nofollow" href="#Adversity-Opportunity">Every Adversity is an Opportunity</a></li>
<li><a rel="nofollow" href="#Alternatives-CentOs8">Do We Have "Good" Alternatives?</a></li>
<li><a rel="nofollow" href="#Alma-Rocky">Alma Linux and Rocky Linux</a></li>
<li><a rel="nofollow" href="#Other-Alternatives">Other Alternatives to CentOs8</a></li>
<li><a rel="nofollow" href="#CentOs-Stream">What About CentOs Stream and CentOs7?</a></li>
<li><a rel="nofollow" href="#End-CentOs8-Era">Wrapping Up: End of CentOs8 Era</a></li>
<li><a rel="nofollow" href="#Fun-Reading">Optional reading - For Fun's Sake</a></li>
</ol>

<h2>Background: December 2020- CentOs project closing its doors <a name="Background"></a></h2>

<p>In early December 2020, the folks at Red Hat Linux had made the announcement that CentOS 8, the latest version of the open source server oriented operating system, <a rel="nofollow" href="https://blog.centos.org/2020/12/future-is-centos-stream/">would reach its end of life on December 31, 2021</a>. Development of Centos 9 would stop. CentOs project would focus on something called <a rel="nofollow" href="https://www.centos.org/centos-stream/">CentOs Stream</a>, instead of  a server distribution that was <em>downstream</em> of Read Hat Linux.</p>

<p>Naturally, there was a lot of hue and cry among the users of CentOS in particular, and  the open source community in general. The recurring view expressed was that an open source project that was backed by a large company, which decided to shut it down, leaving the users abandoned. The large company, Red Hat Linux, <a rel="nofollow" href="https://www.redhat.com/en/about/press-releases/ibm-closes-landmark-acquisition-red-hat-34-billion-defines-open-hybrid-cloud-future">had itself been acquired by a much bigger tech company</a>, - none other than Big Blue  a.k.a IBM.</p>

<h2>Every Adversity is an opportunity? <a name="Adversity-Opportunity"></a></h2>

<p>Since the day of the announcement, several expected and un-expected things happened.</p>

<p>a. There was an uproar in the tech community, and discussions on Reddit and web hosting forums, including this one.</p>

<p>b. Two new major projects were announced: Rocky Linux and Alma Linux. Both are backed by well known names in the Linux world. The trend of announcing new alternatives to CentOS continues. As recently as January 2022, SuSe Linux have proposed their own alternative to CentOs, <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/3716/liberty-linux-yaca-yet-another-centos-alternative/">called Liberty Linux</a>. And if you scroll below to the "Piece De Resistance" section below, you may be in for a surprise.</p>

<p>c. Media houses, publications, bloggers and YouTubers all began to come up with "<a rel="nofollow" href="https://duckduckgo.com/?q=alternatives+to+cent0s+2022">Alternatives to CentOs</a>" type of posts. Some posted good alternatives, others simply drew up a  random lists of operating systems <a rel="nofollow" href="https://www.g2.com/products/centos/competitors/alternatives">which included Windows 10!</a></p>

<p>d. Competitors such as Oracle began to run promotions trying to woo away users into the fold of Oracle Linux.</p>

<blockquote><div>
  <p>They say, every adversity is an opportunity. Maybe for the real change makers over the long run. In reality, in the short term, it is the opportunists who can also benefit.</p>
</div></blockquote>

<p>What turns out to be true in this case? Read on to find out...</p>

<h3>It's good to have alternatives... but do we have "Good" alternatives?<a name="Alternatives-CentOs8"></a></h3>

<p>My main intention here is to see where things stand nearly 14 months after the Red Hat announcement was made. In early February 2022, we will be in the fifth or sixth week since CentOs 8 reached its end of life. given this timeline, some of the questions I was keen to understand were:</p>

<p>a. Many alternatives to CentOs were proposed as in the multiple lists prepared by different publications. You can read some of them <a rel="nofollow" href="https://www.zdnet.com/article/where-centos-linux-users-can-go-from-here/">here</a> and <a rel="nofollow" href="https://www.makeuseof.com/best-centos-alternatives/">here</a>. Have the users really migrated to one of the many alternatives that are that were proposed?</p>

<p>b. What made them choose one option over another? Did any move to CentOs Stream?</p>

<p>c. What is the feedback about these alternatives? Which one really gained traction among the users?</p>

<h2>Taking a Look: User feedback and beyond</h2>

<h3>Alma Linux and Rocky Linux - The Dynamic Duo<a name="Alma-Rocky"></a></h3>

<blockquote><div>
  <p>While researching for this article, it has become evident that the two most popular CentOS alternatives are <a rel="nofollow" href="https://almalinux.org/">AlmaLinux</a> and <a rel="nofollow" href="https://rockylinux.org/">Rocky Linux</a>. The former is created by the folks at <a rel="nofollow" href="https://cloudlinux.com">Cloud Linux</a>, while the latter is set up by one of the original co-founders of CentOS.</p>
</div></blockquote>

<p>No matter which publication or resource once one looks at, these two names keep coming up right at the top.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/lq/vxbixr2p5o2g.png" width="400" alt="Logo of Alma Linux" /> <br /><br />
Source: Alma Linux</p>

<p>Alma Linux has a very good comparison of features, organizational structure, etc. for some of the alternative If you scroll below, you will find a table comparing the different alternative: CentOs, Alma Linux, Rocky Linux, Oracle Linux and Red Hat . Alma Linux is an open a community based distribution from the folks at Cloud Linux. Rocky Linux is a private limited company started by one of the original co founders of CentOS. The former is a nonprofit, latter is a for profit setup.  They both offer scripts that help the users migrate from CentOS to their respective distributions. Compatibility with Red Hat Enterprise Linux support, end of life cycles etc are pretty much identical.</p>

<p>Source: <a rel="nofollow" href="https://wiki.almalinux.org/Comparison.html">Alma Linux</a><br />
<img src="https://talk.lowendspirit.com/uploads/editor/5l/64k85bxcq7s8.jpg" alt="Comparison of alternatives to CentOs. Source: Alma Linux" /><br /></p>

<p>Some of the limitations of the alternatives were discussed extensively across Reddit, HackerNews and other sources. Some of the below also came up <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/3751/call-for-inputs-from-providers-users-centos-alternatives-2022">in this discussion right here on LES</a>. They include, in no particular order,</p>

<ul>
<li>Community, or lack of</li>
<li>Longevity of the teams or support from the organizations behind the projects</li>
<li>Maturity of the products</li>
<li>Backing by large Corporates. Some people were not happy with Corporate support for some of the newer projects- the Red Hat experience probably left a bad taste.</li>
</ul>

<p>Computingforgeeks has a good list of features that discusses the pro's and con's of the different <a rel="nofollow" href="https://computingforgeeks.com/rocky-linux-vs-centos-stream-vs-rhel-vs-oracle-linux/">alternatives to CentOs</a>. You can also read this <a rel="nofollow" href="https://www.reddit.com/r/linuxadmin/comments/r55u96/alma_or_rocky_linux_and_why/">discussion on Reddit</a> and on <a rel="nofollow" href="https://news.ycombinator.com/item?id=28213775">Hackernews</a>. For those who prefer the Video version, here is a decent resource that explains the difference between Rocky and Alma Linux.</p>

<blockquote><div>
  <p><span data-youtube="youtube-Iwafps4PnPI?autoplay=1"><a rel="nofollow" href="https://www.youtube.com/watch?v=Iwafps4PnPI"><img src="https://img.youtube.com/vi/Iwafps4PnPI/0.jpg" width="640" height="385" border="0" alt="image" /></a></span></p>
</div></blockquote>

<p><strong>Update April 2022</strong>: <a rel="nofollow" href="Distrowatch.com">Distrowatch.com</a> in their <a rel="nofollow" href="https://distrowatch.com/weekly.php?issue=20220404#news">April 4, 2022 edition of weekly newsletter (Issue 962)</a> mentions an article by FOSS Force which talks about Alma Linux as the most favored replacement for CentOs.</p>

<h3>The Next most discussed/ talked about alternatives to CentOs <a name="Other-Alternatives"></a></h3>

<p>Based on anecdotal experience and discussion with the LES community, I did  not encounter many users who have taken up any of the other alternatives. This includes Oracle Linux. Granted this is a small subset of the user base, it does give a data point to be considered.  With that in mind, I am listing a few alternatives that I have come across nonetheless.</p>

<h5>Oracle Linux</h5>

<p>Oracle Linux is based on Red Hat Enterprise Linux. Oracle even created a page on its website targeting CentOS users. They have developed a script that can convert existing CentOS installations to Oracle Linux. This distribution is free to use, but support contract is available for a charge.<br />
<img src="https://talk.lowendspirit.com/uploads/editor/hw/5kzdhgcowav7.png" alt="Screenshot of Oracle Linux" /><br /><br />
Source:Wikimedia commons</p>

<p>According to the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Oracle_Linux">Wikipedia page for this distribution</a>,</p>

<blockquote><div>
  <p>Oracle Linux is ..."available partially under the GNU General Public License since late 2006.[4] It is compiled from Red Hat Enterprise Linux (RHEL) source code, replacing Red Hat branding with Oracle's."</p>
</div></blockquote>

<h4>Liberty Linux (project by Suse Linux)</h4>

<p>This is the newest kid on the block, I had posted about it in the LES forum. Too early to discuss or comment, pending further updates, I will <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/3716/liberty-linux-yaca-yet-another-centos-alternative/p1">leave you with the link to the LES discussion</a>.</p>

<h4>Springdale Linux</h4>

<p>This is a project by the  members of the computing staff of Princeton University and the Institute for Advanced Study, this was earlier known as PUIAS Linux. They describe themselves as a "Custom Red Hat based Distribution and Mirror." Among other things they have an Interesting Webpage !!  The design reminds us of the early years of the World Wide Web.</p>

<blockquote><div>
  <p>visit <a rel="nofollow" href="https://springdale.math.ias.edu/timeline">Springdale Linux</a> to learn more.</p>
</div></blockquote>

<h4>ClearOS</h4>

<p>ClearOs offer commercial and community edition, as per the discussion on ClearOS forums, this <a rel="nofollow" href="https://www.clearos.com/clearfoundation/social/community/is-clearos-still-under-active-development">may not be a long term viable alternative </a></p>

<h3>VZLinux</h3>

<p>This is a CentOs based distribution from folks at Virtuozzo. You can download the image files from: <br />
<a href="https://repo.virtuozzo.com/vzlinux/8/iso/" rel="nofollow">https://repo.virtuozzo.com/vzlinux/8/iso/</a></p>

<p>Other than the above, I did not find much written or talked about this alternative to CentOs.</p>

<h4>Fedora Server</h4>

<p>Fedora is primarily a desktop oriented distribution, and a server version of Fedora, while possible and even capable, does not make a lot of sense. Atleast to me. According to one of the posts I came across on the topic,</p>

<blockquote><div>
  <p>Fedora server also follows short lifecycle. It is a community-supported operating system. Paid or commercial support option does not exist, and the lifecycle makes it less appealing as an alternative.</p>
</div></blockquote>

<h3>What about CentOs Stream? <a name="CentOs-Stream"></a></h3>

<p>Would you really consider moving to CentOS Stream for your servers? I have not found a definitive "Heck Yes" or "Hell, No!" answer to this query. Nor have, it appears <a rel="nofollow" href="https://thenewstack.io/centos-9-stream-is-now-available-but-should-you-use-it/">these guys</a>.<br /><br />
<img src="https://talk.lowendspirit.com/uploads/editor/ux/hs77wp8k2myh.png" width="400" alt="CentOS Stream" /><br /><br />
Source: Postgresweb</p>

<h4>Are you perfectly happy with CentOs 7?</h4>

<p>If you are happy with CentOs7, or belong to the <em>if-it-ain't-broke-don't-fix-it</em> school, then you have atleast 30 plus months of updates for CentOs coming from Red Hat. The Frequently Asked Question page on CentOs site <a rel="nofollow" href="https://www.redhat.com/en/blog/faq-centos-stream-updates">confirms the same</a>. In that case, should the <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/3751/call-for-inputs-from-providers-users-centos-alternatives-2022">EOL for CentOs 8creally be a concern for you</a>?</p>

<hr />

<h3>And now, the pièce de résistance: A server Linux distribution from Microsoft</h3>

<p>This one is real guys, and no more a joke in the Linux and open source communities. (Anybody remember Lindows.. er.. <a rel="nofollow" href="https://www.linspirelinux.com/">Linspire</a>?)<br />
edit: The project is still alive! That's cool.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/b6/b9de0a2lvvus.png" alt="Linspire Desktop" /><br /><br />
Source: Wikipedia</p>

<p>The Linux distribution from Microsoft, called CBL-Mariner, is based off Fedora and Linux From Scratch.  Form the github page for CBL-Mariner, <a href="https://github.com/microsoft/CBL-Mariner" rel="nofollow">https://github.com/microsoft/CBL-Mariner</a></p>

<blockquote><div>
  <p>CBL-Mariner is an internal Linux distribution for Microsoft’s cloud infrastructure and edge products and services. CBL-Mariner is designed to provide a consistent platform for these devices and services and will enhance Microsoft’s ability to stay current on Linux updates. This initiative is part of Microsoft’s increasing investment in a wide range of Linux technologies, such as SONiC, Azure Sphere OS and Windows Subsystem for Linux (WSL). CBL-Mariner is being shared publicly as part of Microsoft’s commitment to Open Source and to contribute back to the Linux community. CBL-Mariner does not change our approach or commitment to any existing third-party Linux distribution offerings.</p>
</div></blockquote>

<h3>Wrapping it up: Nearing the end of the CentOS Era <a name="End-CentOs8-Era"></a></h3>

<p>It is great to see several alternatives for CentOs, which is one of the beauties of the Open Source world. The challenge, as always, is that it presents a problem of plenty. Many folks in the LES Community- web hosts or the advanced users who used CentOs previously, seem to have converged towards Alma Linux or Rocky Linux. Among the rest of the list- Oracle Linux might have some users, given that many members on both the green forums have atleast one instance of <a rel="nofollow" href="https://blogs.oracle.com/cloud-infrastructure/post/oracle-builds-out-their-portfolio-of-oracle-cloud-infrastructure-always-free-services">Oracle Free tier</a>.</p>

<p>I hope that this post has captured the "After the Storm" scenario since CentOS8 reached EOL. Over the long run, I intend it will offer a handy resource for the LES community. In addition to the top two alternatives (Rocky Linux and Alma Linux), there is a long tail of "also consider" alternatives. Which is one of the real beautiful things about the Linux and Open Source world.</p>

<hr />

<h2>Further (Optional) reading: FFs (For Fun's Sake)<a name="Fun-Reading"></a></h2>

<p>While researching for this post, the search results threw some junk posts. I am adding a few of them below to add a flavor of humor. For example, <strong>really useless practices by some of the reviewers and authors</strong>. These included:</p>

<blockquote><div>
  <p>Some reviewers did a desktop review of Alma Linux, as in literally installing graphical interfaces. They spent a lot of time talking about how GNOME performed on this distribution versus KDE. One person even, did a screen capture of games being played on Alma Linux. Not sure if any server admins run GUI or play Steam games on their production servers.</p>
</div></blockquote>

<p><img src="https://www.how2shout.com/linux/wp-content/uploads/2021/03/command-to-install-KDE-plasma-desktop-GUI-AlmaLinux.jpg" alt="How To Shout article showing Alma Linux Desktop" /><br /><br />
Source: HowtoShout</p>

<p>The Techmint guys aren't too far behind : <a href="https://www.tecmint.com/wp-content/uploads/2021/06/AlmaLinux-Desktop.png" rel="nofollow">https://www.tecmint.com/wp-content/uploads/2021/06/AlmaLinux-Desktop.png</a></p>

<p><strong>Windows 10 as an alternative to CentOS? Really??</strong><br />
<a rel="nofollow" href="https://www.g2.com/products/centos/competitors/alternatives">g2 smokes some cheap stuff.</a></p>

<p><strong>The Roll your eyeballs version</strong><br />
Simply copy and paste names of popular Linux distributions, and not really doing any favor to the reader.  <a rel="nofollow" href="https://www.hostingseekers.com/blog/centos-alternatives/">Hostingseekers, you need therapy</a></p>

<hr />

<p><strong>Author's Note</strong>:</p>

<p>I put together this post with the intention of creating a handy resource for readers here on the Low End Spirit blog. I am not a user of CentOS or any of its derivatives. Even though I began my Linux Journey with Red Hat 6 (Zoot), my poison of choice for many years has been Debian. Or, grudgingly, I use Ubuntu LTS where the Software as a Service (SaaS) vendors require me to use it.</p>

<p>This post presented an opportunity first and foremost to understand what is going on in the CentOS world, or the CentOS extended universe. (To borrow a phrase from the Marvel Universe). I have not done any installation or testing of my own for the purposes of this article.My interest was mainly in understanding what has been the market acceptance over the past few months. One hopes that has been served well.</p>

<p>For any questions or comments, write to me at <a rel="nofollow" href="http://" title="contact+les@amarvyas.in">contact+les@amarvyas.in</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Tip: Install OS via netboot.xyz without ISO support</title>
        <link>https://lowendspirit.com/discussion/2210/tip-install-os-via-netboot-xyz-without-iso-support</link>
        <pubDate>Sat, 05 Dec 2020 19:07:54 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>ehab</dc:creator>
        <guid isPermaLink="false">2210@/discussions</guid>
        <description><![CDATA[<p>It can happen your vm provider has a broken iso mount or does not support it at all. You can install your OS using netboot.xyz the following way:</p>

<p>1- Have your vm already installed with one of the provided templates e.g: <strong>debian 9</strong>.  ssh into your vm as root install the ipxe package:</p>

<p><code># apt-get install ipxe</code><br />
<code># update-grub</code></p>

<p>Get your ip, gateway from your vm info email, provider cp or on debian this way and store it as it will be needed later.</p>

<p><code># cat /etc/network/interfaces</code><br />
or <br />
<code># ip r</code></p>

<p><code># reboot</code></p>

<p>2-  From your vnc or console, you should be able to see similar grub menu</p>

<p><img src="http://talk.lowendspirit.com/uploads/editor/89/p5ref5ubzzkz.png" alt="" title="" /></p>

<p>after you press enter then quickly keep pressing <strong>CTRL+B</strong>  ,or you can set to boot from CD only in you cp... then you should</p>

<p><img src="http://talk.lowendspirit.com/uploads/editor/gp/yvf6khru9zp1.png" alt="" title="" /></p>

<p>enter your ip info you stored from the above step 1 like show in next image</p>

<p><img src="http://talk.lowendspirit.com/uploads/editor/85/nmyulta4p1o1.png" alt="" title="" /></p>

<p>if your vm supports ipv6 then it may try to configure it so you press enter like shown:</p>

<p><img src="http://talk.lowendspirit.com/uploads/editor/zn/ecukkfl0pmi6.png" alt="" title="" /></p>

<p>let it boot and should be good <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /></p>

<p><img src="http://talk.lowendspirit.com/uploads/editor/ey/cms1cy48k78r.png" alt="" title="" /></p>

<p>I wrote this article when i got a HH vm and uploading iso is broken at time of this article.</p>

<p><strong>References :</strong><br />
1- <a href="https://unix.stackexchange.com/questions/190865/is-it-possible-to-add-some-pxe-network-boot-option-to-grub" rel="nofollow">https://unix.stackexchange.com/questions/190865/is-it-possible-to-add-some-pxe-network-boot-option-to-grub</a><br />
2- <a href="http://www.panticz.de/Install-GRUB-iPXE-netboot" rel="nofollow">http://www.panticz.de/Install-GRUB-iPXE-netboot</a></p>
]]>
        </description>
    </item>
    <item>
        <title>Alpine Linux - Install wireguard-go for OpenVZ 7 and wireguard on a KVM - IPv4 only</title>
        <link>https://lowendspirit.com/discussion/4753/alpine-linux-install-wireguard-go-for-openvz-7-and-wireguard-on-a-kvm-ipv4-only</link>
        <pubDate>Mon, 24 Oct 2022 02:34:28 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>ehab</dc:creator>
        <guid isPermaLink="false">4753@/discussions</guid>
        <description><![CDATA[<h1>Alpine Linux - Install wireguard-go for OpenVZ 7 and wireguard on a KVM - IPv4 only</h1>

<p>There are couple of providers offerings NAT vps such as <a rel="nofollow" href="https://clients.inceptionhosting.com/cart.php?gid=13" title="inceptionhosting">inceptionhosting</a> , <a rel="nofollow" href="https://clients.mrvm.net/cart.php?gid=11" title="mrvm">mrvm</a> and <a rel="nofollow" href="https://my.webhorizon.in/order/main/index/nat" title="webhorizon">webhorizon</a> .</p>

<p>Thanks to <strong>webhorizon</strong> for sponsoring this guide and offered to bump my ram.</p>

<p>NAT VPSs are affordable and useful for practical small apps.  In this guide we will setup a docker swarm cluster with a mix of single KVM manager and couple of OpenVZ7 NATs workers. For high availability it is recommend to have an odd number &lt; 5 managers.</p>

<p><strong>Minimum requirements</strong>: <br />
- 1 KVM and 1 NAT nodes with at least 512MB Ram and a minimum of 5GB disk<br />
- using <strong>IPv4</strong> on all nodes.<br />
- The host OS is Alpine Linux version 3.15 which is latest at time of writing this guide. Webhorizon already provides alpine as an os template on their NAT range.</p>

<hr />

<h2><strong>Section 1</strong>: ( Host setup and applications install )</h2>

<p><strong>Host kernel settings</strong>:<br />
- All hosts should have those kernel settings on ; For NATs if not enabled then open a ticket and nicely ask.</p>

<blockquote><div>
<pre><code># cat /proc/sys/net/ipv4/ip_forward
1
# cat /proc/sys/net/bridge/bridge-nf-call-iptables
1
</code></pre>
</div></blockquote>

<p>for KVM you can add that by</p>

<blockquote><div>
<pre><code>cat &gt; /etc/sysctl.d/01-configs.conf &lt;&lt;EOF
# alpine
net.ipv4.ip_forward=1
net.bridge.bridge-nf-call-iptables=1
EOF
</code></pre>
</div></blockquote>

<p>If your NAT provider does not include Alpine Linux template then one can install it using this <a rel="nofollow" href="https://gist.github.com/pexcn/dc3ebe60393cc4ede40b30e180d40ac5" title="script">script</a> and my slightly modified version <a rel="nofollow" href="https://gist.github.com/ehab2012/304e11cccd1683099d899e28ab6c4941" title="script">script</a>.</p>

<p>On your NAT vps cp make sure you enabled</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/3h/v7chcqtn1em0.png" alt="" title="" /></p>

<p><strong>OpenVZ7 Install wireguard-go</strong></p>

<blockquote><div>
<pre><code># apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing wireguard-go
# apk add wireguard-tools
</code></pre>
</div></blockquote>

<p>while the above is a testing repo so far it has been stable. You can always compile your own version.</p>

<p><strong>KVM Install wireguard</strong></p>

<blockquote><div>
<pre><code># apk add wireguard-tools
</code></pre>
</div></blockquote>

<p><strong>Install and enable Docker</strong></p>

<blockquote><div>
<pre><code># apk add docker
# service enable docker
</code></pre>
</div></blockquote>

<hr />

<h2><strong>Section 2</strong>: Nodes details</h2>

<ol>
<li><p>Server "kvm"</p>

<ul>
<li>Main Interface IP       = 185.253.47.54</li>
<li>Wireguard Private IP = 192.168.1.2</li>
</ul></li>
<li><p>Client "OpenVZ NAT"</p>

<ul>
<li>Main Interface IP = 10.37.136.225</li>
<li>Wireguard Private IP = 192.168.1.10</li>
</ul></li>
</ol>

<hr />

<h2><strong>Section 3</strong>: ( Generate keys and Conf file )</h2>

<p>Wireguard requires key generation and setting up the network interface in a certain way. There are scripts and quick command lines to accomplish this task. The next details describe the manual method. Take a note of the cat outputs tp add in wg0.conf file.</p>

<p>generate keys those way on both nodes</p>

<blockquote><div>
<pre><code># wg genkey | tee privatekey | wg pubkey &gt; publickey
# cat publickey
     OaJ6KDPdgOs+aOJh7oEnaQYs/w9aIuHd0LfFgyx3ORw=
# cat privatekey
     WH8fN46zIMIXCxt2m5+I75vI+31oehh6aHte3qYYIys=
# # presharedkey is only needed for client node
#  wg genpsk &gt; presharedkey
     Gg9HaCMkeEzUNl5zz9fUEzaDKIO2MNUKeG3D+ihchS8=
</code></pre>
</div></blockquote>

<p>Server side config</p>

<blockquote><div>
<pre><code># mkdir -p /etc/wireguard
# nano /etc/wireguard/wg0.conf
     [Interface]
     ListenPort = 51820
     PrivateKey = WH8fN46zIMIXCxt2m5+I75vI+31oehh6aHte3qYYIys=
     
     [Peer]
     PublicKey = OaJ6KDPdgOs+aOJh7oEnaQYs/w9aIuHd0LfFgyx3ORw=
     PresharedKey = Gg9HaCMkeEzUNl5zz9fUEzaDKIO2MNUKeG3D+ihchS8=
     AllowedIPs = 192.168.1.10/32
</code></pre>
</div></blockquote>

<p>Client side config ; change port number to one in the range given to you, in my example ist 22520</p>

<blockquote><div>
<pre><code># nano /etc/wireguard/wg0.conf
     [Interface]
     ListenPort = 22520
     PrivateKey = +KoN0pd30I6WERz2s9itHlIoikZBh1q2cbhB88UsnlI=
     
    [Peer]
    PublicKey = OaJ6KDPdgOs+aOJh7oEnaQYs/w9aIuHd0LfFgyx3ORw=
    PresharedKey = Gg9HaCMkeEzUNl5zz9fUEzaDKIO2MNUKeG3D+ihchS8=
    AllowedIPs = 0.0.0.0/0
    Endpoint = 185.253.47.54:51820
    PersistentKeepalive = 25
</code></pre>
</div></blockquote>

<hr />

<h2><strong>Section 4</strong>: (  Update network configuration )</h2>

<p>Server side interface file</p>

<blockquote><div>
<pre><code># nano /etc/network/interfaces
    ...
    auto wg0
    iface wg0 inet static
            address 192.168.1.2/24
            netmask 255.255.255.0
            pre-up ip link add dev wg0 type wireguard
            pre-up wg setconf wg0 /etc/wireguard/wg0.conf
            post-up ip route add 192.168.1.0/24 dev wg0; /sbin/iptables -A FORWARD -i wg0 -j ACCEPT;/sbin/iptables -A FORWARD -o wg0 -j ACCEPT;/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
            post-down ip link delete dev wg0
            post-down  /sbin/iptables -D FORWARD -i wg0 -j ACCEPT;/sbin/iptables -D FORWARD -o wg0 -j ACCEPT;/sbin/iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
</code></pre>
</div></blockquote>

<p>Client side interface file</p>

<blockquote><div>
<pre><code># nano /etc/network/interfaces
    ...
    auto wg0
    iface wg0 inet static
        address 192.168.1.10/24
        pre-up /usr/bin/wireguard-go wg0
        post-up /usr/bin/wg setconf wg0 /etc/wireguard/wg0.conf
        post-up /sbin/ip route add 192.168.1.0/24 dev wg0;
        post-down /sbin/ip link del wg0
        post-down rm -f /var/run/wireguard/wg0.sock
</code></pre>
</div></blockquote>

<hr />

<h2><strong>Section 5</strong>: (  Reboot and Test )</h2>

<p>Do a reboot and start testing the connection for both server and client, yours will be different when changing the ips, ports and keys etc...</p>

<blockquote><div>
<pre><code># ip a
</code></pre>
</div></blockquote>

<p><img src="https://lowendspirit.com/uploads/editor/5h/7wjq8g5gtdjf.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/bg/k6gq10x36114.png" alt="" title="" /></p>

<blockquote><div>
<pre><code># wg show
</code></pre>
</div></blockquote>

<p><img src="https://lowendspirit.com/uploads/editor/si/9y919si9piab.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/h0/kiw92vkfy2b8.png" alt="" title="" /></p>

<p><img src="https://lowendspirit.com/uploads/editor/0e/urntemz808vt.png" alt="" title="" /><br />
<img src="https://lowendspirit.com/uploads/editor/h0/0m7418f4fgc3.png" alt="" title="" /></p>

<p>above test show connection is made and our wireguard nodes are reachable.</p>
]]>
        </description>
    </item>
    <item>
        <title>Migrate a KVM VPS from one host to another – Easy Mode.</title>
        <link>https://lowendspirit.com/discussion/3840/migrate-a-kvm-vps-from-one-host-to-another-easy-mode</link>
        <pubDate>Wed, 27 May 2020 12:00:00 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>LES_Blog</dc:creator>
        <guid isPermaLink="false">3840@/discussions</guid>
        <description><![CDATA[<p><em>Written by Anthony Smith, 27 May 2020</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/d7/jyyx3ynmtdki.png" alt="image" />
</p>

<p>This is the first in a series of posts in the "Easy Mode" series</p>

<p>I thought I would write this up as a super easy basic guide to an almost no-effort method of migrating a KVM VPS from one host to another without having to worry about any minor changes in software stacks that could cause your backup and restore to fail or not restore as expected.</p>

<p>As a host one of the unfortunate realities is that sometimes it is just necessary to have migrations either due to end of life of an OS major version or impending hardware failure etc and on the rare occasion you need people to migrate their own server, this usually results in a 10% panic rate and a desperate cry for help.</p>

<p>With all that in mind I thought I would illustrate possibly one of the most simple server migration methods possible, I have done this based on KVM to KVM as that is likely to be the most common method however this method should also work for Xen HVM to Xen HVM or KVM to Xen HVM or Xen HVM to KVM and finally VMware to VMware should also work fine.</p>

<p>I can't cover the huge amount of different control panels and access methods out there but all that I have used either have access to an ISO mount or a rescue mode so it should be easy for you to use this guide as long as your host's control panel provides at least an ISO mount option or a rescue mode.</p>

<p>In this example, I have used a KVM VPS on a host that uses SolusVM and migrated it to a host that uses Virtualizor.</p>

<p>Requirements and additional info before we get started.</p>

<ul>
<li>The <strong>destination</strong> VPS should have the same size hard disk (bigger is fine).</li>
<li>This will only go as fast as the link between the 2 locations, latency is a huge factor, moving a 50GB Disk image from India to New York is no fun.</li>
<li>Some attention to detail is required, it is possible to lose your data if you mess up the commands.</li>
<li>If the destination control panel does not provide a 'reconfigure networking' button or a serial console/VNC option you can use to reconfigure networking yourself you may want to consider configuring but not activating the network settings for the destination VPS on the source prior to shutdown, SolusVM, however, will do this for you and in some cases depending on the Hosts configuration options in Virtualizor it will also.</li>
<li>Source VPS, in this case, was at Inception Hosting - London, the destination VPS was with Nexus Bytes - New York</li>
</ul>

<hr />

<p>First of all, I created a quick KVM VPS as the source on the SolusVM based host, installed apache2 and slightly modified the test page which you can see loading on the source IP:</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/2l/zniyu73dxmiz.png" alt="" title="" /></p>

<p>Then I shut down the Source VPS and put both the source and destination VPS into rescue mode.</p>

<p>For SolusVM (Source):</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/k3/8croozaarz9i.png" alt="" title="" /></p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/hy/862j55bwxlgd.png" alt="" title="" /></p>

<p>For Virtualizor (Destination):</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/n9/xz54kkp15j1d.png" alt="" title="" /></p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/xm/g9js7othui9n.png" alt="" title="" /></p>

<p><em>note: I noticed virtualizer has a tendency to just lock out all options even those for coming out of rescue mode when you do this which is resolved by simply refreshing the page, don't worry it does not resubmit the action</em></p>

<p>Now you should have both the source and destination in rescue mode and you should be able to login to both over ssh:</p>

<p>SolusVM VPS (Source)</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/51/woe0o6h22h5n.png" alt="" title="" /></p>

<p>Virtualizor VPS (Destination)</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/7j/wvotolqgra4z.png" alt="" title="" /></p>

<p>Next, you need to examine your disks to make sure you get the right one, the rescue modes will create a ramdisk so what was vda or sda on your VPS when it was running may not be now, this is the part you need to be sure you get correct, I have shown a side by side below using <code>fdisk -l</code> to check which disk I want to migrate to which disk on the other end.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/hf/iwojrxcezml7.png" alt="" title="" /></p>

<p>From the image above we can see that the 5GiB disk is the one I want <code>/dev/vda</code> because I know my source disk is 5GiB and on the destination side I can see that it is actually <code>/dev/vdb</code> I want to copy the disk to, the 10 GiB disk. It is <strong>very</strong> important that you check this before going any further as it could well be different.</p>

<p>Because we now know I want to copy <code>vda</code> on the source to <code>vdb</code> on the destination we can structure the command to do this.</p>

<pre><code>dd if=/dev/vda bs=32M status=progress | ssh root@45.61.123.123 "dd of=/dev/vdb"
</code></pre>

<p>let us break this down so it is better understood as there is nothing worse than knowing which buttons to press to achieve a goal, but having no idea why they work, or what they actually do:</p>

<ul>
<li>dd - Short for "data duplicator" a common commend used for copying or duplicating data.</li>
<li>if=/dev/vda - The input or what we are reading, in this case, the entire virtual hard disk image</li>
<li>bs=32M - BYTES, the number of BYTES to read per block when copying, you can set this yourself, I have found 32M is a good average.</li>
<li>status=progress - This shows the progress of the copy, it has a very small overhead but without it you get nothing in terms of a progress indicator</li>
<li>| - The pipe, in very simple terms, lets you pass the result of one command or set of commands to the next</li>
<li>ssh root@45.61.123.123 - Because this is after the pipe | it takes what was done before and sends it over an ssh session as root to the destination IP 45.61.123.123 (fake)</li>
<li>"dd of=/dev/vdb" - Finally the instruction on what to do at the other side which is to use dd "data duplicator" to write the blocks it is receiving over ssh to <code>/dev/vdb</code></li>
</ul>

<p>Once that command is issued you will see something like this:</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/p7/7n4y6jib6bcv.png" alt="" title="" /></p>

<p>And when it completes you will see:</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/9h/s05ejnapmj0e.png" alt="" title="" /></p>

<p>As we can see that took 634 seconds or a little over 10 minutes to complete and now the disk image on the destination should be identical to the source.</p>

<p>The next step is to cancel rescue mode on the destination via the control panel and then boot the destination VPS, going to the new IP address once it is finished booting shows that it was a success as the same page loads on the new IP:</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/lc/uetq2jiio6f9.png" alt="" title="" /></p>

<p>If your destination VPS has a bigger disk size than the source you will not instantly gain the extra space by following the above process, you will need to either expand your partitions or extend your logical volume if using LVM, that however is beyond the scope of this particular tutorial but if you are also looking for easy mode for that then just boot the VPS with a GParted ISO or a rescue cd that contains GParted which will give you a simple UI to expand your partitions or look up vgextend and lvextend if using LVM.</p>

<p>If having read this you discover that your host does not have a built-in rescue mode then I would suggest requesting they supply a SystemRescueCd ISO (Also contains GParted) <a rel="nofollow" href="https://www.system-rescue-cd.org/">https://www.system-rescue-cd.org/</a> so you can mount it and boot into rescue mode.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to Create and Setup a Debian KVM VPS with Proxmox VE 6 -- Part III -- Network Configuration</title>
        <link>https://lowendspirit.com/discussion/3933/how-to-create-and-setup-a-debian-kvm-vps-with-proxmox-ve-6-part-iii-network-configuration</link>
        <pubDate>Fri, 23 Jul 2021 12:00:00 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Not_Oles</dc:creator>
        <guid isPermaLink="false">3933@/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://lowendspirit.com/profile/Not_Oles" rel="nofollow">@Not_Oles</a>, 23 Jul 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/n9/cixat1djj0ag.png" alt="image" />
</p>

<h2>I. Before We Start</h2>

<p>We need to obtain our basic network configuration from our provider. Or, if we are running our own host node, we need to assign basic network configuration to ourselves. Our basic network configuration might look something like this:</p>

<table>
<thead>
<tr>
  <th><strong>Item</strong></th>
  <th><strong>Value</strong></th>
</tr>
</thead>
<tbody>
<tr>
  <td>IPv4 address</td>
  <td>172.16.165.97/28</td>
</tr>
<tr>
  <td>Netmask</td>
  <td>255.255.255.240</td>
</tr>
<tr>
  <td>Broadcast</td>
  <td>172.16.165.111</td>
</tr>
<tr>
  <td>Gateway</td>
  <td>172.16.164.1</td>
</tr>
</tbody>
</table>

<p>For IPv6, one might expect something like:</p>

<table>
<thead>
<tr>
  <th><strong>Item</strong></th>
  <th><strong>Value</strong></th>
</tr>
</thead>
<tbody>
<tr>
  <td>IPv6 address</td>
  <td>fe80::/64</td>
</tr>
</tbody>
</table>

<p>But occasionally, IPv6 could be something like:</p>

<table>
<thead>
<tr>
  <th><strong>Item</strong></th>
  <th><strong>Value</strong></th>
</tr>
</thead>
<tbody>
<tr>
  <td>IPv6 address</td>
  <td>fe80:xxxx:xxxx:xxxx::97/128</td>
</tr>
<tr>
  <td>Gateway6</td>
  <td>fe80:xxxx:xxxx:xxxx::3</td>
</tr>
</tbody>
</table>

<p>Notes:</p>

<ul>
<li>The /28 in the IPv4 address and the longer netmask are <a rel="nofollow" href="https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#:~:text=CIDR%20notation%20is%20a%20compact,bits%20in%20the%20network%20mask.">different ways of providing the same information about the size of the local, directly connected network.</a> It suffices for us to have this information in one format or the other. We don't need both formats because the information is the same. Also, the broadcast IP might not be provided, since it isn't strictly necessary.</li>
<li>For the second format of the IPv6 address, <strong>what happened to the /64</strong>? 😱 The /128 in the second form of the IPv6 address might seem <strong><em>clueless</em></strong> to IPv6 fans expecting a /64. Also, the second format of the IPv6 address includes a gateway6 address. The gateway6 address might seem strange to some IPv6 fans, but we need the gateway6 for our minimal, static configuration. More on all this below.</li>
</ul>

<h2>II. Introduction</h2>

<p>In <a rel="nofollow" href="https://lowendspirit.com/how-to-create-and-setup-a-debian-kvm-vps-with-proxmox-ve-6-part-ii-debian-install/">the previous post of this series</a> we finished using the Proxmox web GUI to install our new Debian KVM VPS via the <a rel="nofollow" href="https://www.debian.org/CD/netinst/">Debian netinst installer iso image.</a> The final step in Part II was removing the netinst install iso image from the emulated cdrom and then reooting our new VM, which came up from its own internal filesystem:</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/hs/2qx8afaew937.png" alt="" title="" /></p>

<p>In today's post, we continue from this exact place where we left Part II -- connected to our newly installed and newly rebooted KVM via the Proxmox web GUI. In this post, we will accomplish the networking configuration which was skipped in Part II because the <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/comment/63101/#Comment_63101">Debian netinst iso doesn't automatically configure out of band IP addresses.</a></p>

<p>There are three network configuration and related tasks we will accomplish today:</p>

<ul>
<li>First, we go "inside" our VM through the Proxmox web GUI's emulated "physical" console connection and set up networking. In Debian, networking setup requires that we adjust the file /etc/network/interfaces to tell our VM its network address and the address of its gateway to the internet.</li>
<li>Second, we edit the file /etc/resolv.conf to tell our VM the numerical addresses of <a rel="nofollow" href="https://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System ("DNS")</a> servers it can use to translate human readable <a rel="nofollow" href="https://en.wikipedia.org/wiki/Uniform_Resource_Identifier">Uniform Resource Identifiers (URI)</a> into numerical <a rel="nofollow" href="https://en.wikipedia.org/wiki/IP_address">Internet Protocaol ("IP") addresses.</a></li>
<li>Third, we set up /etc/apt/sources.list to tell our system's <a rel="nofollow" href="https://www.debian.org/doc/manuals/debian-faq/uptodate.en.html">Aptitude software package manager ("APT")</a> where to get software updates and the additional software packages we will want to install.</li>
</ul>

<p>Section III, Quick Setup, runs quickly through all three of today's tasks in "recipe style."</p>

<p>Section IV offers additional context on our setup environment.</p>

<p>Sections V, VI, and VII provide additional details on today's three setup tasks.</p>

<p>Section VIII discusses security.</p>

<p>Section IX discusses backup.</p>

<p>When we finish the Quick Setup, our new Debian KVM VPS should be connected to the internet, DNS should work, and we should be able to use the Debian package system to add whatever additional software we want.</p>

<p>When we finish all of today's post, we should have reasonable context within which to understand our Debian VM's networking setup.</p>

<h2>III. Quick Setup</h2>

<p>Logged into our VM through the Proxmox web GUI, we run the command <code>ip link show</code>. This command will give us the name of our network interface, probably something like "ens18."</p>

<p>As root or with <code>sudo</code>, we edit the text of the file /etc/network/interfaces so that it contains the minimum necessary information:</p>

<pre><code>auto ens18
iface ens18 inet static
  address IPv4_ADDRESS/CIDR
  gateway GATEWAY_ADDRESS

iface ens18 inet6 static
  address IPv6_ADDRESS/CIDR
  gateway GATEWAY6_ADDRESS
</code></pre>

<p>Using our example network configuration, our minimal /etc/network/interfaces looks like this:</p>

<pre><code>auto ens18
iface ens18 inet static
  address 172.16.165.97/28
  gateway 172.16.164.1

iface ens18 inet6 static
  address fe80:xxxx:xxxx:xxxx::97/128
  gateway fe80:xxxx:xxxx:xxxx::3
</code></pre>

<p>Second, we edit the /etc/resolv.conf file so that it looks like this:</p>

<pre><code>nameserver 1.1.1.1
nameserver 8.8.8.8
nameserver 2606:4700:4700::1111
nameserver 2001:4860:4860::8888
</code></pre>

<p>Third, we edit /etc/apt/sources.list so that it looks like this:</p>

<pre><code>deb http://deb.debian.org/debian buster main contrib non-free

deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free

deb http://deb.debian.org/debian buster-updates main contrib non-free
</code></pre>

<p>Finally, we restart networking so that our new configuration takes effect:</p>

<pre><code>systemctl restart networking
</code></pre>

<p>At this point, we should have both IPv4 and IPv6 connectivity, and DNS and APT both should work.</p>

<h2>IV. More Context</h2>

<ul>
<li><strong>Virtualized Console Connection</strong></li>
</ul>

<p>The Proxmox web GUI virtualizes a wired console connection. In other words, our web browser does connect over the internet to our Proxmox server, but, the view from inside our new KVM is the same as though a wired connection was attached. Our new KVM thinks it's talking over a wired connection to a physical console. From inside our new KVM, there is, as yet, no network connection.</p>

<p>By default, the Proxmox web GUI works via <a rel="nofollow" href="https://en.wikipedia.org/wiki/Virtual_Network_Computing">VNC.</a> <a rel="nofollow" href="https://pve.proxmox.com/wiki/Serial_Terminal">In the Proxmox wiki on serial terminal</a> Proxmox warns that VNC might</p>

<blockquote><div>
  <p>not have the features you need (i.e. easy copy/paste between other terminals)</p>
</div></blockquote>

<p>or it might be</p>

<blockquote><div>
  <p>impossible to capture all &#91;kernel messages, standard output, or error&#93; messages on &#91;the&#93; VNC screen.</p>
</div></blockquote>

<p>Yep, copy / paste commands <a rel="nofollow" href="https://forum.proxmox.com/threads/copy-paste-keys-commands-for-ct-kvm-vnc-console.28037/">do not seem to work in the Proxmox KVM virtual console.</a></p>

<p>Also, if you enjoy using the vi editor, you might find what looks like a "Send-Esc" button among the set of choices within the set exposed by the top button on the console VNC control bar. Use of the real keyboard Escape key results in exiting full screen. However, a second real Esc seems to produce the expected mode change, despite that maybe we no longer can see too well without returning to full screen.</p>

<ul>
<li><strong>No DHCP, No SLAAC</strong></li>
</ul>

<p>These days most network setups use <a rel="nofollow" href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol">Dynamic Host Configuration Protocol (DHCP)</a> to autoconfigure IPv4 networking. The machine on which networking is to be configured asks for and receives from a DHCP server all the needed information for the networking setup.</p>

<p>It is possible to configure DHCP so that it always returns the same IP address to each VM, but, since our entire Proxmox network is static, it may be simpler to set up networking manually--the traditional way for servers.</p>

<p><a rel="nofollow" href="https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_(SLAAC)">Stateless Address Autoconfiguration ("SLAAC")</a> provides automatic configuration of IPv6 addresses. SLAAC requires a /64, which is why people say, for IPv6, that a /64 is expected and that less than a /64 is <em>clueless.</em> However, it remains possible to hand configure a single static IPv6 address, as we are doing here.</p>

<p>What if, for whatever reason, we simply do not want to use SLAAC? What if our provider doesn't receive enough IPv6 addresses from <em>his</em> provider to allow passing on to each VPS its own /64? What if our provider's provider charges an extra fee for extra IPv6 addresses, but we do not want to pay our provider's pass through of his provider's extra fee? What if we simply choose to use single, static IPs as is traditional for servers?</p>

<ul>
<li><strong>No Cloud-Init</strong></li>
</ul>

<p>As mentioned in <a rel="nofollow" href="https://lowendspirit.com/how-to-create-and-setup-a-debian-kvm-vps-with-proxmox-ve-6-part-ii-debian-install/">the previous post of this series,</a> most VM network setups these days are done with <a rel="nofollow" href="https://github.com/canonical/cloud-init">Cloud-Init.</a> Proxmox <a rel="nofollow" href="https://pve.proxmox.com/wiki/Cloud-Init_Support">supports Cloud-Init,</a> which enables both networking and ssh access to virtual machines to be set up on the Proxmox hypervisor and outside of the VM. Cloud-init can use DHCP. Here, however, we have chosen the simplest possible manual configuration with static IPs.</p>

<ul>
<li><strong>Our Static, Routed Configuration And Out of Band Gateway From Our Provider's Provider</strong></li>
</ul>

<p>Here, our single, static IPv4 and single, static IPv6 are each derived from a <a rel="nofollow" href="https://en.wikipedia.org/wiki/Routing">routed subnet</a> assigned to our server node. However, our internet gateway IPv4 address is not included among our server's routed group of IPv4s. This is called an "out of band" gateway.</p>

<p>Besides routed subnets, it also is possible for a datacenter to assign to servers non-routed, individual IP addresses. Data for these non-routed IPs moves between the datacenter switch and server nodes via <a rel="nofollow" href="https://en.wikipedia.org/wiki/Network_layer">the "link layer."</a> Hetzner has a <a rel="nofollow" href="https://docs.hetzner.com/robot/dedicated-server/network/net-config-debian/">tutorial on Debian network configuration</a> which includes discussion of "bridged configuration" for non-routed IPs.</p>

<ul>
<li><strong>Systemd in Debian Networking</strong></li>
</ul>

<p><a rel="nofollow" href="https://lwn.net/Articles/585319/">Since about 2014,</a> networking is setup on Debian with <a rel="nofollow" href="https://en.wikipedia.org/wiki/Systemd">systemd.</a> The choice of systemd <a rel="nofollow" href="https://lwn.net/Articles/585363/">initially was</a> and <a rel="nofollow" href="https://www.howtogeek.com/675569/why-linuxs-systemd-is-still-divisive-after-all-these-years/">has continued to be divisive.</a> Nevertheless systemd has remained as the Debian default.</p>

<p>There are at least two basic variations of Debian's systemd network arrangement. The first--which seems to be the default variation for Debian systemd network configuration--at least with the netinst iso--is using systemd's networking.service. For example, by using <code>systemctl</code>, we can confirm that networking.service is what is being used on our Node:</p>

<pre><code>root@Proxmox-VE ~ # systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: 
   Active: active (exited) since Wed 2021-06-02 19:13:13 UTC; 1 weeks 2 days ago
     Docs: man:interfaces(5)
 Main PID: 791 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
   CGroup: /system.slice/networking.service

 [ . . . ]
root@Proxmox-VE ~ # 
</code></pre>

<p>Our test KVM also seems to think its networking is controlled by systemd:</p>

<pre><code>root@debian-kvm:~# systemctl status networking
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2021-06-16 01:20:45 UTC; 4min 51s ago
     Docs: man:interfaces(5)
  Process: 448 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
 Main PID: 448 (code=exited, status=0/SUCCESS)

Jun 16 01:20:45 debian-kvm systemd[1]: Starting Raise network interfaces...
Jun 16 01:20:45 debian-kvm systemd[1]: Started Raise network interfaces.
root@debian-kvm:~#
</code></pre>

<p>As we can see, systemd networking.service calls the traditional debian <code>ifup</code> and <code>ifdown</code>.</p>

<pre><code>root@debian-kvm:~# cat /lib/systemd/system/networking.service
[Unit]
Description=Raise network interfaces
Documentation=man:interfaces(5)
DefaultDependencies=no
Requires=ifupdown-pre.service
Wants=network.target
After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service ifupdown-pre.service
Before=network.target shutdown.target network-online.target
Conflicts=shutdown.target

[Install]
WantedBy=multi-user.target
WantedBy=network-online.target

[Service]
Type=oneshot
EnvironmentFile=-/etc/default/networking
ExecStart=/sbin/ifup -a --read-environment
ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
RemainAfterExit=true
TimeoutStartSec=5min
root@debian-kvm:~# 
</code></pre>

<p>The second Debian systemd possibility--not the default on Debian netinst.iso and not used here--is systemd-networkd. Sahitya Maruvada has a simple, clear, Debian systemd-networkd introduction, <a rel="nofollow" href="https://medium.com/100-days-of-linux/working-with-systemd-networkd-e461cfe80e6d">Working with systemd-networkd.</a> The <a rel="nofollow" href="https://wiki.debian.org/SystemdNetworkd">systemd-networkd wiki page</a> and the <a rel="nofollow" href="https://manpages.debian.org/buster/systemd/systemd.network.5.en.html">systemd.network manpage</a> also are available.</p>

<ul>
<li><strong>Official Debian Network Setup Instructions</strong></li>
</ul>

<p>Official Debian network setup instructions include the <a rel="nofollow" href="https://wiki.debian.org/NetworkConfiguration">Wiki,</a> the <a rel="nofollow" href="https://www.debian.org/doc/manuals/debian-reference/ch05.en.html">Handbook,</a> manual pages such as <code>man interfaces</code>, /etc/network/interfaces examples <a rel="nofollow" href="https://salsa.debian.org/debian/ifupdown/-/blob/master/examples/network-interfaces">online,</a> and sometimes locally:</p>

<pre><code># less /usr/share/doc/ifupdown/examples/network-interfaces
</code></pre>

<ul>
<li><strong>The <code>ip</code> Command Usually Is Available Even Though Networking Setup Varies Among Linux Distributions</strong></li>
</ul>

<p>Setting up networking, DNS name resolution, and software package management is very different in different Linux distributions. Therefore, we should not assume that the steps taken below would be exactly the same with a different Linux distribution than Debian.</p>

<p>Nevertheless, despite the different distributions' differing network setup systems, the <code>ip</code> command, <a rel="nofollow" href="https://en.wikipedia.org/wiki/Iproute2">supplied by the iproute2 collection,</a> usually is available these days. Please see also Red Hat's <a rel="nofollow" href="https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf">IP Command Cheat Sheet</a></p>

<p>Because the <code>ip</code> command often is available, networking can be configured in many distributions, including Debian, by running a sequence of <code>ip</code> commands. The net effect <img src="https://lowendspirit.com/plugins/emojiextender/emoji/twitter/smile.png" title=":)" alt=":)" height="18" /> of the sequence of <code>ip</code> commands can be to get the network functioning on most distributions without touching that individual distribution's network setup scheme.</p>

<p>Here's <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/comment/63067/#Comment_63067">an example</a> of the <code>ip</code> command used in the context of an <a rel="nofollow" href="https://en.wikipedia.org/wiki/IPXE">iPXE boot.</a> Note that the first command in the linked example requires knowledge of the name of the interface. We can list the names of the interfaces on our system by running the <code>ip link show</code> command.</p>

<p>One issue with using a sequence of <code>ip</code> commands is that the network setup fails to persist across reboots. However, we can place the <code>ip</code> command sequence inside a script which will be run automagically every time the server reboots. The sequence of <code>ip</code> commands in a script reminds us of the days before systemd, when scripts controlled all parts of the boot process including network setup.</p>

<p>Our KVM VPS's internal network configuration that we will be using below is similar to <a rel="nofollow" href="https://lowendspirit.com/creating-our-first-lxc-vps-with-proxmox-ve-6-2-at-soyoustart/">how LXC containers are configured in Proxmox.</a> As will be seen below, Proxmox's LXC containers' network configuration adopts a variant of the "scripted <code>ip</code> command" approach, which also works inside Proxmox's KVM VPSes.</p>

<h2>V. Our VM's Network Setup</h2>

<ul>
<li><strong>Interfaces</strong></li>
</ul>

<p>Our original /etc/network/interfaces file, the one installed by the netinst.iso, might look like this:</p>

<pre><code>debian@debian-kvm:~$ cd /etc/network
debian@debian-kvm:/etc/network$ cat interfaces.original
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
debian@debian-kvm:/etc/network$ 
</code></pre>

<p>Note that, in the default from the netinst.iso, /etc/network/interfaces.d is empty, so sourcing its files does nothing to the configuration.</p>

<pre><code>debian@debian-kvm:/etc/network$ ls interfaces.d
debian@debian-kvm:/etc/network$ 
</code></pre>

<p>Now, let's edit /etc/network/interfaces to match our example network information from the above Before We Start section.</p>

<pre><code>debian@debian-kvm:/etc/network$ cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto ens18
iface ens18 inet static
  address 172.16.165.97/28
  gateway 172.16.164.1

iface ens18 inet6 static
  address fe80:xxxx:xxxx:xxxx::97/128
  gateway fe80:xxxx:xxxx:xxxx::3

debian@debian-kvm:/etc/network$ 
</code></pre>

<p>The minimum required information does not include comments (lines beginning with <code>#</code>). Maybe we can make the rash and short-sighted assumption that we are not going to install anything which will want a file included from interfaces.d. The loopback interface might no longer be required <a rel="nofollow" href="https://salsa.debian.org/debian/ifupdown/-/blob/master/examples/network-interfaces">(please see lines 17 and 18 in this file from Debian sources).</a> Thus, for our example setup, the minimum /etc/network/interfaces might be:</p>

<pre><code>debian@debian-kvm:/etc/network$ cat interfaces

auto ens18
iface ens18 inet static
  address 172.16.165.97/28
  gateway 172.16.164.1

iface ens18 inet6 static
  address fe80:xxxx:xxxx:xxxx::97/128
  gateway fe80:xxxx:xxxx:xxxx::3

debian@debian-kvm:/etc/network$ 
</code></pre>

<p>When configuring Debian LXC containers, Proxmox configures their /etc/network/interfaces files using added post-up and pre-down routes. Similarly, just for fun, instead of giving the gateway addresses in our /etc/network/interfaces,, we can manually add routes. Except for the initial <code>post-up</code> and <code>pre-down</code> these added lines mirror <a rel="nofollow" href="https://talk.lowendspirit.com/discussion/comment/63067/#Comment_63067"><code>ip route</code> commands that we could run manually</a> to set up or take down networking without touching the /etc/network/interfaces file.</p>

<pre><code>debian@debian-kvm:/etc/network$ cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto ens18
iface ens18 inet static
  address 172.16.165.97/28
     post-up ip route add 172.16.164.1 dev ens18
     post-up ip route add default via 172.16.164.1 dev ens18
     pre-down ip route del default via 172.16.164.1 dev ens18
     pre-down ip route del 172.16.164.1 dev ens18

iface ens18 inet6 static
  address fe80:xxxx:xxxx:xxxx::97/128
     post-up ip route add fe80:xxxx:xxxx:xxxx::3  dev ens18
     post-up ip route add default via fe80:xxxx:xxxx:xxxx::3  dev ens18
     pre-down ip route del default via fe80:xxxx:xxxx:xxxx::3  dev ens18
     pre-down ip route del fe80:xxxx:xxxx:xxxx::3  dev ens18

debian@debian-kvm:/etc/network$ 
</code></pre>

<h2>VI. Our VM's DNS</h2>

<p>We might want to add more or different nameservers to /etc/resolv.conf. Our Quick Setup configuration, above, includes <a rel="nofollow" href="https://blog.cloudflare.com/dns-resolver-1-1-1-1/">IPs from Cloudflare</a> and <a rel="nofollow" href="https://developers.google.com/speed/public-dns">from Google.</a></p>

<h2>VII. Our VM's Apt Setup</h2>

<p>The Debian wiki instructions for configuring apt are at <a rel="nofollow" href="https://wiki.debian.org/SourcesList">https://wiki.debian.org/SourcesList.</a> There also is a <a rel="nofollow" href="https://manpages.debian.org/buster/apt/sources.list.5.en.html">man page.</a> The configuration shown above, in Section III Quick Setup, is from the <a rel="nofollow" href="https://wiki.debian.org/SourcesList">SourcesList Debian wiki page.</a></p>

<p>The Debian <a rel="nofollow" href="https://www.debian.org/security/">Security Information page</a> says:</p>

<blockquote><div>
  <p>You can use apt to easily get the latest security updates. This requires a line such as<br />
  deb <a href="http://security.debian.org/debian-security" rel="nofollow">http://security.debian.org/debian-security</a> buster/updates main contrib non-free</p>
</div></blockquote>

<p>Many of the larger providers offer Debian mirrors. For example, Debian packages and security updates are available from the <a rel="nofollow" href="https://docs.hetzner.com/robot/dedicated-server/operating-systems/hetzner-aptitude-mirror/">Hetzner Debian Mirror</a></p>

<p>After /etc/sources.list is edited, we update our system's package repositories as follows:</p>

<pre><code>apt-get upgrade &amp;&amp; apt-get dist-upgrade -y
</code></pre>

<p>We can see exactly which packages are installed by looking at the logs in /var/log/apt.</p>

<p>We may wish to install openssh-server so that we can connect to our VM via ssh in addition to our Proxmox VNC connection. With ssh we regain cut and paste functionality while enjoying lower apparent latency!</p>

<pre><code>apt-get install openssh-server
</code></pre>

<p>The <a rel="nofollow" href="https://aboutbryan.com/2013/03/03/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers/">Kennedy article,</a> mentioned below in Section VII, has some good tips for ssh server configuration.</p>

<h2>VIII. Security</h2>

<p><a rel="nofollow" href="https://www.google.com">Google</a> suggests its <a rel="nofollow" href="https://aboutbryan.com/2013/03/03/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers/">first choice among essential server security articles.</a> This article from 2013, by Bryan Kennedy, seems to provide still-good advice, except that, nowadays, many people prefer to use <a rel="nofollow" href="https://en.wikipedia.org/wiki/EdDSA">ed25519 keys</a></p>

<h2>IX. Backup</h2>

<p>After all this work, we certainly want to make an offline backup of our new VM. We can <a rel="nofollow" href="https://pve.proxmox.com/wiki/Backup_and_Restore">use Proxmox to make the backup</a> and then download a a copy from the host node's /var/lib/vz/dump directory.</p>
]]>
        </description>
    </item>
    <item>
        <title>HTTP Server Setup with a Single Command Line</title>
        <link>https://lowendspirit.com/discussion/3931/http-server-setup-with-a-single-command-line</link>
        <pubDate>Mon, 21 Mar 2022 20:31:31 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>alexxgg</dc:creator>
        <guid isPermaLink="false">3931@/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://lowendspirit.com/profile/alexxgg" rel="nofollow">@alexxgg</a>, 19 May 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/y9/8lyyu4b1q32d.png" alt="image" />
</p>

<p>This is a guest post by <a rel="nofollow" href="https://talk.lowendspirit.com">forum</a> user <a href="https://lowendspirit.com/profile/alexxgg" rel="nofollow">@alexxgg</a>,</p>

<p>Hi there!</p>

<p>These days when the internet shares things in milliseconds, who of you have needed to share a file quickly? I bet some of you remember at least one time one of those cases.</p>

<p>As you probably know, in terms of web servers, we can share files with popular software like Apache, Nginx, and Lighttpd but this software need basic configuration, also they consume server resources as long as they’re active.</p>

<p>What if you could set up a basic HTTP web server without installing Apache, Nginx, or Lighttpd? Well, that’s sounds kind of impossible, and even more unbelievable is that you can kill it with Ctrl^C. Thanks to Python3 we can do that with its <a rel="nofollow" href="https://pypi.org/project/httpserver/">HTTP server module</a>.</p>

<p>This module will deploy an HTTP server in any directory of the server, even in the root directory and that sounds ridiculously dangerous, fortunately, the default port of this HTTP server isn’t 80. Instead, it will use port: 8000 but you can assign a custom port, very convenient for NAT environment instances.</p>

<p>Now you can deploy a basic HTTP server -in the current directory with the default port- by typing this single command line:</p>

<pre><code>python3 -m http.server
</code></pre>

<p>Starting HTTP Server</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/05/lopja74fwxsh.png" alt="" title="" /></p>

<p>Killing HTTP Server</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/j0/nzh2vdl7fq70.png" alt="" title="" /></p>

<p>HTTP Server as Shown in Browser</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/ic/4ppesu0bamvj.png" alt="" title="" /></p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/81/dmmmh9vc0eds.png" alt="" title="" /></p>

<p>You can change the default port (example port: 32085) and specify a directory (example directory: /tmp/) with:</p>

<pre><code>python3 -m http.sever 32085 --directory /tmp/
</code></pre>

<p>More information about Python3 httpserver module is available <a rel="nofollow" href="https://docs.python.org/3/library/http.server.html">here</a></p>

<p>Also, there is a github page <a rel="nofollow" href="https://github.com/freelamb/simple_http_server">here</a></p>

<p><strong>Note</strong>: of course, you will need to install Python3 in order to use these post example command lines.<br />
Leave a comment to let me know any questions or suggestions.</p>
]]>
        </description>
    </item>
    <item>
        <title>How to change the number of minutes that the sudo password is cached</title>
        <link>https://lowendspirit.com/discussion/3928/how-to-change-the-number-of-minutes-that-the-sudo-password-is-cached</link>
        <pubDate>Mon, 21 Mar 2022 20:21:02 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>mikho</dc:creator>
        <guid isPermaLink="false">3928@/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://lowendspirit.com/profile/mikho" rel="nofollow">@mikho</a>, 4 May 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p>
  <img src="https://talk.lowendspirit.com/uploads/editor/c2/qds4s5mryuc2.png" alt="image" />
</p>

<p>This is a really QUICK TIP!</p>

<p>When you run any command as root, using sudo, the password is remembered for 15 minutes by default.<br />
If you want to change the time that the password is cached, open the terminal (as root) and run:</p>

<pre><code>editor /etc/sudoers 
</code></pre>

<p>Find this line in the file:</p>

<pre><code>defaults env_reset
</code></pre>

<p>And change it into:</p>

<pre><code>defaults env_reset , timestamp_timeout=x
</code></pre>

<p>where “x” is the time in minutes that the password will be cached.</p>

<p>Save and exit and work is done!</p>
]]>
        </description>
    </item>
    <item>
        <title>Announcing Cloudflare for SaaS for Everyone</title>
        <link>https://lowendspirit.com/discussion/3918/announcing-cloudflare-for-saas-for-everyone</link>
        <pubDate>Mon, 21 Mar 2022 19:43:33 +0000</pubDate>
        <category>LES Talk</category>
        <dc:creator>Laton</dc:creator>
        <guid isPermaLink="false">3918@/discussions</guid>
        <description><![CDATA[<p><em>Written by <a href="https://lowendspirit.com/profile/Laton" rel="nofollow">@Laton</a>, 24 Apr 2021</em><br />
<small>Article was migrated from WordPress to Vanilla in March 2022</small></p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/73/vn4x16y1spbj.png" alt="" title="" /></p>

<p>Cloudflare has recently adapted their <a rel="nofollow" href="https://www.cloudflare.com/en-gb/ssl-for-saas-providers/">SSL for SaaS</a> product, which was originally limited only to their Enterprise customers but has now been released publicly. Yesterday they announced their Cloudflare for SaaS solution available to everyone. And to reflect their recent service evolution of the product they have re-named it to: <a rel="nofollow" href="https://www.cloudflare.com/en-gb/saas/">Cloudflare for SaaS</a>.</p>

<p>You may ask yourself: <em>What exactly is SaaS?</em><br />
Software as a Service (SaaS) is a method of providing software to an end-user where the software is not installed and maintained by the user, but via hosted services (most often through a web browser). Popular examples of such a service include Salesforce, Google Apps, Microsoft Office 365, etc.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/wr/ss73sxt4l6wk.png" alt="" title="" /></p>

<p>Since the 15th of April, they have released their beta stage, which is available for sign up if you submit your request <a rel="nofollow" href="https://forms.gle/crARoXd4taCtoSti8">here</a>. Before the introduction of <a rel="nofollow" href="https://www.cloudflare.com/en-gb/saas/">Cloudflare for SaaS</a>, your best bet was for your customer to set up a CNAME record and have them generate a private key and CSR.</p>

<p>On top of that, you would be required to maintain a solution to generate and securely store private keys. But with the introduction of Cloudflare for SaaS, it is now more freely accessible and has provided less of a burden when managing multiple customers.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/ya/rh7reoegqtg4.png" alt="" title="" /></p>

<h4>Cloudflare Workers</h4>

<p>Back in January when SSL for SaaS was announced, 80% of beta users were already building their application on Cloudflare workers. But by combining the use of Cloudflare for SaaS with <a rel="nofollow" href="https://workers.cloudflare.com/">Cloudflare workers</a>, will overall reduce the time and core resources from building your application.</p>

<h4>Security</h4>

<p>It also has already provided <a rel="nofollow" href="https://www.cloudflare.com/en-gb/ddos/">DDoS Protection</a> and <a rel="nofollow" href="https://www.cloudflare.com/en-gb/waf/">Web Application Firewall (WAF)</a> built-in. Alongside the benefits offered to the Enterprise customers at no additional cost.</p>

<p><img src="https://talk.lowendspirit.com/uploads/editor/96/7te3da508k5e.png" alt="" title="" /></p>

<p>So, if you want to have more control of your SSL certificate solution and would like a simple but manageable solution, then why not sign up for the <a rel="nofollow" href="https://forms.gle/crARoXd4taCtoSti8">beta</a>.</p>
]]>
        </description>
    </item>
   </channel>
</rss>
