Websites Are the Future ________________________________________________________________________________ My first experiment with hosting was... involved. My bar for enjoyable music is high. What makes music good is of little interest to me; the variety of your scales, your singing ability, your talent with a guitar, all fine qualities. But an *enjoyable* artist, now that seems to be the whole point of the enterprise, doesn't it? An enjoyable album will tell a story. Like Night Riot's Love Gloom, or Atmosphere's God Loves Ugly, every artist has a story to tell. Their own kind of story, in the best way they think it can be. I only ever really listen to music I own, and I will almost always play an entire album from start to finish. Sure, I have a go-to playlist when I'm in my car driving for less than twenty minutes, but that's not how I really enjoy digesting music. The point is in the listening, and you have to hear the whole thing. Otherwise, you miss the story. In my younger years I had a massive music collection. I listened to music 24/7 - I had albums playing while I was asleep. Some albums played on a loop continuously for days. Every time I hear Green Day's American Idiot, I get flash backs to playing Kirby's Nightmare in Dream Land. It's a vivid memory, almost as good as what smell does. Point is, I tore through entire collections of genres searching for Yet Another Album to put into rotation. And my rotation was MASSIVE. Of course, back then, mobile MP3 players were pretty lacking in storage, and Spotify had only just been launched. Nobody knew what streaming was; MTV still had music videos. So what's an enthusiast to do when they want to listen to an album they own, but their iPod touch doesn't have it and they left the CD at home? Why, they setup a jukebox on a laptop and expose their entire collection to the internet of course! Somehow in my ignorance I managed to setup DynDNS to proxy some poor sap of a domain to the IP of my laptop, which housed an entire LAMP stack managed by one of a dozen jukebox apps. Worked like a charm. Didn't use it much though! Turns out WiFi was ALSO pretty rare back then, and it was just easier to carry around CDs. So my music collection shrank, storage capacities got larger, and Google Music launched. Now I just listen to podcasts while I decide what album to put on. In this post we're going to explore putting KISS on a Linode. Arguably, the easiest thing to install KISS to, and the easiest thing to have on a VPS. Enjoy. [0.0] INDEX ________________________________________________________________________________ - Choose a Domain [1.0] - Choose a Hoster [2.0] - GitHub Pages [3.0] [1.0] Choose a Domain ________________________________________________________________________________ The most important thing to get right here is that it should be unique. Lesser known TLDs are usually cheaper, and they allow for more variety and personality. Just don't choose a .net, those are gross. You can always use Domain.com or GoDaddy, but why do that when you can support smaller and cooler companies? I bought k1sslinux.org on Porkbun, and it was super easy. They provide excellent features by default, their nameservers are fine and they offer the option to switch to CloudFlare, they offer their own hosting service you can use and provide either email forwarding or an email server you use! Not too shabby. Plus, they offer an easy setup for GitHub Pages, super useful for (soon) this site, and KISS. Their knowledge base isn't the biggest, but it's sufficient for most questions, and they seem pretty laid back. I've had no issues working with their site, and their prices are usually a bit cheaper than competitors. Choosing a domain name is tricky, but let your personality shine. If it isn't a professional site, there's no good reason it has to be named inline with what it does. Mostly, I'm just mad .corner isn't a TLD. [2.0] Choose a Hoster ________________________________________________________________________________ Hosting for your server can be a fickle business. In general, serving things from your own server at home can be quite unsafe - exposing any part of your own network beyond what you do with a webbrowser is probably a bad move. Luckily, hosting has come a long way in the last fifteen years! Options abound. I have found Linode to be the cheapest and neatest to work with, though you may have success with Vultr or Digital Ocean. If you want to, feel free to use my Linode Referral link [1]. Choose whatever Linode lines up with your goals - I chose a simple Linode to be my server. Choose any distribution you want - we're going to nuke it in twenty seconds anyways. Pick a region near where most people will access it, I guess? Linode has incredibly low latency and high speeds. It's incredible. Perks of being your own ISP, I suppose. I chose Newark, because I want to represent Brick City. Choose a plan that fills your needs - I am a simple man, but chose the 4GB Linode. I will probably downscale it to a 1GB in the future - turns out my loads are quite small - my server uses <200MB of RAM basically constantly, and I don't need much in the way of storage (it's all mostly text files, after all). Plus, KISS is small! I'm using 1.3GB of space on /, serving a git and fossil repository, two mailing lists, and my own mailserver. Incredible. Name it, tag it, set a root password, and add your SSH keys. Please, add them. SSH from your own machine. The LISH console doesn't actually work for me, and the GLISH console is a lagtastrophe at getty. SSH is the way. Create it, Shut it down, stick it in a stew. Open up your Linode - I named mine KISSnode because I'm cute and clever - and click the 'Storage' section. Click the ... for every label and click 'delete'. Nuke this sucker! Create a Disk, label it, give it a filesystem, and give it a size. You can add swap and stuff if you want, but it doesn't so much matter - we can always do things in the Linode itself, and swapfiles are better for you anyways. Go to the 'Configurations' tab next door and either edit the given one or add a new one. Name it (I named mine KISS), add some descriptive comments, and... Select Paravirtualization Select the Latest 64 bit kernel Run the default Run Level Limit RAM if you would like /dev/sda -> the disk you made Set custom root to /dev/sda1, unless you plan on putting / on another partition. Just turn on all the Filesystem/Boot Helpers. Make it simple. Save the changes. This will be the configuration that we use to boot up our Linode under most circumstances. However, our next step is not most circumstances. Click the ... in the top right - it should be in line with the buttons: Power off | Reboot | Launch LISH Console ... Click Rescue, and set any option to anything - as long as one of them is the disk you made earlier. Make note of which disk it is. This is where we'll be unpacking our KISS rootfs tarball. After you've selected which disk goes where, click 'Reboot into Rescue Mode'. Launch the LISH console - we won't be here for long, I promise. In the console, you'll be greeted by Linode's useful rescue system. Do an lsblk to find your disk, use cfdisk/fdisk/parted/whatever to create your partitions - I just made a single monolithic partition /dev/sda1. Choose whatever filesystem you want. I cannot stress to you enough how easy this whole process is. From there, follow the process for installing KISS [2]. Skip section 5, 8, 9, 13. That's right; no kernel, no bootloader, you don't even need a device manager. And no Xorg, because 1) security risks, 2) wayland is the future, 3) we're running a server. We don't need X where we're going. Once you've untarred KISS, installed baseinit, cloned your repos, and gotten dhcpcd, you're basically done. Whole process can take about five or ten minutes. I recommend getting openssh, enabling the service, and perhaps use ssh-copy-id on your home machine to easily get your SSH key into the authorized keys file. Fiddle with SSH settings as necessary - my server was basically hit with nonstop SSH attempts for a LONG time. Change the default port, don't allow root login, don't allow logins with passwords. If you lock yourself out, just use the LISH console to edit the config file. You're always safe with Linode :) If you plan on setting up a mail server, I recommend setting the hostname to mail.domain.tld (or whatever your future MX record points at for mail). Basically nothing uses `hostname` EXCEPT for mail, so there's not really a super good reason to make it something else. After that, just exit out the chroot and close the console. Navigate back to the Configurations tab and click Boot. You'll find that in just a few seconds, you'll be able to SSH into your Linode - you didn't even need to setup a kernel. Ain't Linux amazing? KISS is officially the fastest distribution to install on a VPS - it takes less time than it does to provision the Linode! [3.0] GitHub Pages ________________________________________________________________________________ KISS' website is hosted using GitHub Pages $/kiss-community/website However you want to generate your site is fine. Make a repository, go to Settings > Pages, and set up your site with Github Pages. Set the Custom domain to whatever domain you bought earlier, and Enforce HTTPS so security hawks don't yell at you in IRC for flouting best practices in favor of simpler protocols. GitHub will recommend that you use a CNAME record, which is fine. Alternatively, if your registrar supports GitHub Pages setup on their end, you can do it there. That's what I did. GitHub might complain about DNS records, but that's none of their business. If it works, it works. Now, you could always put your website up on your server. That's totally cool. But I'm hosting a GitHub and a Fossil repository on my server, I don't want my website to get in the way. Plus, I inherited the setup and don't feel like playing with it. Whatever floats your Unix Boat, ya'know? That repository bit will be explored in a later blog post. Recall that I said I'm also running a full-blown mailserver off this bad boy. You guessed it; Yet Another Blog Post. ___ [1] https://www.linode.com/?r=2f065ff41f1c3ce4bccbfea2d334dd4a757b6444 [2] https://k1sslinux.org/install ________________________________________________________________________________ Dilyn Corner (C) 2020-2022