minecraft

Report #7 - Useful Cross-Platform Programs

This report will have a tidy list of all of the software posted at the bottom if you want to quickly peruse through. For everyone else that enjoys some ramble, read on!

Very top of my useful bit of software is Joplin https://joplinapp.org/ It's a markdown editor that I use for pretty much anything involving text in some form or another. Quickly making lists, writing these reports or writing down technical information that requires sections to be marked as code. There is also a webclips addon that while I haven't used very much, the few times it's been very handy for quickly capturing information from web pages. Before this I used Simplenote and while it also has markdown functionality, it's hosted by someone else and I was looking to move as much as possible to self hosting. It also works on my phone so I'm able to check and edit things else where.

There really isn't to much more to say about it other than it's handy for keeping a ton of information and/or writing, easy to sync with just about anything.

Other notable text writing programs would be:
Focuswriter https://gottcode.org/focuswriter/ Good for distraction free writing.
Ghostwriter https://wereturtle.github.io/ghostwriter/ A minimal markdown editor.
Simplenote https://simplenote.com/ note keeping app that you need an account to sync, uses markdown but I never used that bit.
novelwriter https://novelwriter.io/ Side info for novelwriter, if you're on Windows the easiest way to install it is to install python3 with PATH enabled in setup then in powershell execute pip install novelWriter Linux land in terminal run sudo apt install python-3 and then pip3 install novelWriter
It's a very useful bit of software if you're going to write a large novel, it helps you keep track of a lot of information and stay organized.

Next part I should talk about is syncing files among machines, I have a desktop, laptop and a phone. The desktop and laptop have general files to keep in sync with all of them but I do want things like Joplin to be able to sync to all three. I tried to use Dropbox for a while as Google's Drive was not something I was interested in as I've been slowly removing google bits from my digital day to day. Nothing inherently wrong with how Dropbox worked it just didn't give me enough granular control over what I wanted, for general single folder sync, would of been perfect. I did find Syncthing https://syncthing.net/ and it fit everything I needed and wanted perfectly. I could declare different folders to sync and the big bonus, it's something I could self host, you don't even need a central server to self host either, it's peer to peer so no middle man bits, just need two computer you want to sync a folder, or folders to. Setup was really easy and wish I found this bit of software sooner! And while you don't need a server, I run an instance of syncthing on my server anyway to be a kind of 2nd hand back up.

Now if you need something more manual for syncing or manual I can recommend FreeFileSync https://freefilesync.org/ it's pretty much Rsync in GUI form which I like, you can also save sync jobs and name them so when you open up a job it's options easily readable rather than trying to remember what the long list of option commands.

"Is recursive -r or -R...wait why are there both -a and -A in here too?"

This has happened a few times and having to reread the documentation for a terminal command gets old after the 2nd time. FreeFileSync does all the things you'd expect, Local files & SSH remote files. There are more fancy features but that's all I really use it for as I have an external HDD that I use to keep my photo library on and after a shoot I dump all the images onto it, then sync the drive to my server which does all the backing up in background for me. Also the visual comparison that lets me skim to make sure things should be running as they should is just a nice little quality of life detail.

For general automated backup system of my desktop and laptop is Duplicati https://www.duplicati.com/ An automated backup system that can send backups in lots of different remote ways. Used to use DejaDup on Linux and I'm aware that Windows has it's own backup system but I stuck with Duplicati as it still allowed me to use it across whatever OS I want. Also it lets me recover a backup from a Linux backup onto Windows machine and vice versa if there is something I need.

KeePassXC https://keepassxc.org/ It keeps your passwords. That's it really. Has everything I need and has some nice password generation features, a dark theme, looks clean. Keep backups of your keepass file and nothing to worry over. The idea of someone else hosting my passwords is simply terrifying to me, companies get broken into all the time, I don't need that looming stress.

You'll notice a bit of a theme that I'm slightly obsessive over self-hosting as much as possible. Well here comes some more! I only recently came across this but with what I've messed with of so far seems very promising. I currently use things such as Discord, Telegram and whatever dozen accounts for messaging programs I've used in the past. Naturally I have to find a way to do it myself in some way. First on the list is voice chat, for that I've been using Mumble https://www.mumble.com/ it's comes bare bones so it's a small task to setup but the voice quality is so much better. Discord or Telegram will always hit you with the robot voice sooner or later. This is something I have running in a jail within my TrueNAS server that I'll talk about more later.

As for messaging and way more there is RetroShare https://retroshare.cc/ this is an interesting beast, does way more than I'm really needing but it's something that I'm hoping to slowly introduce at least to my close friends and family into using. A quick fire list of details is chat rooms, email-ish system, forums and a post board in a reddit style voting system. It's decentralized so no need to rely on someones server, it just requires at least two people to connect to one another and you can keep it to as small or as big of a network as you want. Some NAT and UPnP router stuff to make sure it works but as my router has UPnP on mostly auto it worked fine out of the box. There is a list for voice and video in the future but I've got Mumble for voice and video isn't something on my need-to-have list.

As mentioned earlier a lot of this self hosting is done with my server, which runs TrueNAS https://www.truenas.com/ previously known as FreeNAS. Before using TrueNAS I just spun up a Debian box but it was only a file hosting system, doing anything extra like virtualization or running instances was a hassle. I covered quite a few details in report 6 about the file sharing so I'll just cover the other stuff I self host. So currently on my server there are jail instances running for Mumble, Minecraft, a ffmpeg specific jail, Nextcloud, Plex, Syncthing, Zoneminder and Deluge.
It's doing quite a lot of utility for me without having to fuss to much and the WebGUI of TrueNAS makes it easier to quickly see the status of everything going on and still be able to jump into the shell of an jail. Just in case you're unaware a jail is a virtualized instance of the OS, very little overhead and lets you create and destroy them without having to worry about the base OS. This is a function of FreeBSD which TrueNAS runs.

Nextcloud https://nextcloud.com/ is a strange use case for me as I tried to use it as an all in one stop for just about everything. These days however It's simply a WebDAV server for my phone to keep contacts and events, just another tiny detail to make sure Google isn't holding enough of my personal information as is.

Both FFmpeg https://ffmpeg.org/ and Plex https://www.plex.tv/ I use together in a way. I'm not able to do this with everything but I prefer to buy the bluray of whatever movie or series and then take MakeMKV http://www.makemkv.com/ to turn it into something FFmpeg can chew away on the server which is then sent to a directory Plex can read it. Buying the optical media for what you want is more expensive, yes. But I've run into a movie or a series being kicked off of whatever streaming platform just for it to end up in a completely different one and that is simply frustrating, everything is far to fractured with streaming services and I'm not going to pay for all of them. Once you buy a disc, it's there, the bluray won't break down magically one day just for purpray to come out the next day and have to buy it again. I don't watch many shows or movies these days anyway so it's not like it's a huge budget anyway.

Zoneminder https://www.zoneminder.com/ is a CCTV NVR. You'll have to double check what kinds of cameras to buy and the WebGUI is a touch fussy. I'm not sure if it's my server or cameras but it's not quite smooth or easy to use. I'm looking to replace it with something else but currently all the other options are way more expensive or come with severe privacy concerns. For now though it's handy enough to slap some cameras around and have them record.

MineOS https://minecraft.codeemo.com/ I've made a previous post before about this bit of software and glad it's still around.

Deluge https://www.deluge-torrent.org/ While I’m sure the image of anything torrent is tainted with the look of “that’s for pirates” is a stain that will never go away there is plenty of things that still use it. That list is rather exhaustive so won’t clutter it up here.

There are other home server options available, make sure to do research for what you need as that's beyond the scope of this ramble.

Here is a quick fire list of programs I use as well.

mpv https://mpv.io/ A clean video player. I know a lot of people stick to VLC but in both Windows and Linux VLC gave me issues now and then but so far mpv has been flawless. I keep both them installed anyway.

Strawberry music player https://www.strawberrymusicplayer.org/ This is a fork of Clementine, for the most part there isn't anything drastically different. Updated fairly regularly.

FFmpeg Batch AV converter https://ffmpeg-batch.sourceforge.io/ take a beast of a CLI tool and slap a GUI to it. What's nice is that it gives you the CLI output so you don't need to always use the GUI.

Kabuu Audio Converter https://kabuusoft.com/product/detail/2/kabuu-audio-converter a simple audio converter tool, nothing I use regularly but very handy for when it's needed.

Audacity https://www.audacityteam.org/ Audio editing software, good for editing down podcasts or samples of sounds. I've used this bit of software for a super long time.

youtube-dl https://youtube-dl.org/ A super handy utility to download and make back ups of youtube videos, or almost any video on a webpage.

Everything in here is cross platform for the most part. I'll be making another post that is much more narrowed in on Windows specific programs. Along with other nit picky details in setup or usage. If there are changes to this list I'll make update notes at the bottom.

Joplin - https://joplinapp.org/
Focuswriter - https://gottcode.org/focuswriter/
Ghostwriter - https://wereturtle.github.io/ghostwriter/
Simplenote - https://simplenote.com/
novelwriter - https://novelwriter.io/
Syncthing - https://syncthing.net/
FreeFileSync - https://freefilesync.org/
Duplicati - https://www.duplicati.com/
KeePassXC - https://keepassxc.org/
Mumble - https://www.mumble.com/
Retroshare - https://retroshare.cc/
TrueNAS - https://www.truenas.com/
Nextcloud - https://nextcloud.com/
FFmpeg - https://ffmpeg.org/
Plex - https://www.plex.tv/
MakeMKV - http://www.makemkv.com/
Zoneminder - https://www.zoneminder.com/
MineOS - https://minecraft.codeemo.com/
Deluge - https://www.deluge-torrent.org/
mpv - https://mpv.io/
Strawberry music player - https://www.strawberrymusicplayer.org/
FFmpeg Batch AV converter - https://ffmpeg-batch.sourceforge.io/
Kabuu - https://kabuusoft.com/product/detail/2/kabuu-audio-converter
Audacity - https://www.audacityteam.org/
Youtube-dl - https://youtube-dl.org/

Full disclaimer, nothing here is something I was paid to say or link to. These are things I simply find useful in my day to day.

Minecraft server at home

In this helpful guide I'm going to go through what I did to make a self-contained Minecraft server at home on the cheap and also keep it low power but can still run 2 or 3 separate worlds at once (depending on the amount of players)

The main thing that bought all of this together is MineOS Turnkey. This linux distribution of Turnkey is ready to deploy with a webGUI for both Minecraft and the OS itself so you won't have to struggle with staring at a terminal all of the time (but you will have to use it sometimes). You'll more than likely be going with the 64-bit version depending on your hardware and speaking of hardware.

Parts!

ASUS Mini ITX AM1I-A
AMD Athlon 5350 APU
Kingston HyperX FURY 8GB Kit (2x4GB) 1600MHz DDR3 CL10 DIMM - Black (HX316C10FBK2/8)
Sentey Mini ITX Ss5-2514 Computer Case

All of this so far brought me up to $222 but I didn't mention a disk drive, you can use really anything but I used a Crucial 128GB M4 SSD for the low noise and low power, though honestly you don't even need 128GB so if you can pick up a cheaper 64GB. With the 128GB SSD in mind everything came together for about $300 total. A HDD with work just fine if you're looking to go as cheap as possible.

On a final note you will need a USB thumb drive to create the boot stick. And an external monitor & keyboard for the very first install. Also I'd recommend getting a Uninterruptible power supply if you plan on leaving this on for other players for long periods of time. As this is so low power even the cheapest one will give you a safety net to power outages and brown outs.

Hardware setup

As this build is straight forward there isn't really anything to point out other than to put it all together and if you've ordered different parts you'll have to go on your own anyway, but here are some photos.

The front of the case. An internal 3.5-inch SATA drive for size comparison. I also printed the IP number on the case with a label maker.

The front of the case. An internal 3.5-inch SATA drive for size comparison. I also printed the IP number on the case with a label maker.

Power and Ethernet, in the end that's all the system needs to run as a server.

Power and Ethernet, in the end that's all the system needs to run as a server.

Cords are easy to keep out of the way, there is hardly anything in here!

Cords are easy to keep out of the way, there is hardly anything in here!

OS Setup

Everything is together and now you're ready to get MineOS on here. Note that you will need a monitor and keyboard for the initial setup.
First part is to download the ISO, head on over to minecraft.codeemo.com and download the  version you need (likely 64 bit). While you're downloading grab Rufus, this is the bit of software I use to make bootable ISOs.

Once your download is done stick in your USB thumb drive and open up Rufus, from here all you have to do is make sure the drive letter is the same as the USB thumb drive and then click the CD image icon to open a window to find the ISO, load it up and hit start!

Once it's done safely remove the thumb drive and plug it into your soon to be stand alone minecraft server. When booting make sure the first bootable device is the USB thumb drive.
Go through all the steps of the install.

As this is a standalone server guided install with LVM is your bet option.

This is just confirming which disk to install to, and LVM is good to have for future changes.

This is tell you about what percentage of the HDD you can use, just hit ok.

90% is what it gives you by default and I use that just in case something happens and there needs to be something installed in that 10%.

This is the guided installers final report, if you are using a single disk drive bets are good it did everything perfectly. Hit yes.

This window is asking if it should install GRUB and yes you should.

Restart away and remove the USB thumb drive.

This is GRUB giving you options but it will auto start with the default selection in a few seconds.

Make a password for the root account, make a good one.

Make a password for the m account, this is for editing the minecraft servers, it should be different from the root password.

TurnKey Linux comes with a build in backup function called tklbam, you won't really need this so go ahead and skip it (sorry I'm highlighting apply here, just ignore that)

MineOS14.png

Install the updates!

Here is the final screen of the OS, write down all the IP numbers and their names you see above TKLBAM, you'll need this for later.

Firewall/Router setup

One thing I highly recommend to do within your router is to reserve an IP address for your server so you won't have to keep hunting down a new IP just in case your router needs to be restarted (or power loss).
You'll need to be able to make changes to your router, if you know the IP to that then you can skip this next bit. If you don't know your router IP, an easy way to check it on windows is to hit the windows key, then type on the keyboard:
cmd
Hit enter and a command prompt should come up, type in:
ipconfig
Hit enter and a list of numbers will show up, look for Default Gateway, this should be your router. For example the router is 192.168.1.1 (most common home routers use this), now go into your browser and type in the address of 192.168.1.1. At this point a dialog will ask for user name and password, if you haven't setup anything in your router it's a good bet that the user name will be admin and password could be either admin, 12345 or password. If you're having a hard time getting into your router go to the manufactures website and find a manual.
If you only have a modem from your ISP then there is a good chance it won't have more than one ethernet port anyway so you'll need a router.

Once in your router then look for DHCP Reservation list, here I can't really guide you as each router is always different but what you're doing is locking in the IP address with the MAC address of the server.

If you don't know the MAC address of your server check the box the motherboard came in, if it's not listed anywhere we will get the MAC address here in a bit.

If you never plan to let anyone access your server via the net you can ignore this part and head on to Minecraft setup.

To get payers from the net to access your local server you'll need to forward a port in your router so it knows internet traffic can directly look at the minecraft server. This is going to be different from router to router so I'll just direct you to PortForward.com about Minecraft. 25565 is the default port for the server but you'll have to open another port if you have more than one server.
If you plan on having another minecraft server you'll have to mess with the Iptables, here is the direct link to the page about how to do that.
http://minecraft.codeemo.com/mineoswiki/index.php?title=Iptables

Minecraft Setup

Nothing on fire yet? Good!

We first need to update the WebUI so it knows about the newest minecraft server version. Get the number listed as Web Shell from the server and direct your browser there, an example being

https://192.168.1.7:12320

Your browser might complain about it not being a safe site but you're safe to keep going, it's just using https without a proper certificate. Once there you'll be greeted with a black screen and the prompt "core login" type in root and then enter, then type in your password, enter

You should be logged in as root, now type in the following with every new line being an enter key stroke.

cd /usr/games/minecraft

git fetch

git merge origin/master

It should show something as it does below in the screenshot.

While we are here, type in ifconfig then enter. Look for eth0 and then the HWaddr listed to it, that is the MAC address if you were having problems finding it.

Now direct your browser to the MineOS Web-Ui address, example being

https://192.168.1.7:8080

Again the browser will warn you about it being insecure but you're fine. Enter mc as the user name and then your password and sign in. From here click Manage Profiles.

Click "Create Stock Profile" right now the most current is 1.8.4 but it could be newer for you.

It has made a listing for the 1.8.4 stock profile but it's now downloaded yet, hit the green update button and wait a moment (can take a bit if the hosting server is bogged).

Now lets make a minecraft server, click Create New Server. Give it a name and leave ownership to mc, click next.

I would reccomend entering in something in level-name as it helps in case you need to recover backups from the disk. level-seed is optional but if you know of a seed ahead of time here is your one and only chance. Everything else here is up to you, only thing to note is that if you're making more than one server running at a time give the server-port a different number (25566 for the second server, 25567 for the third, ect.)

Make sure the profile is the one newest one.
Both java_xmx and java_xms should be changed to something larger. To figure out how much, know ahead of time how many servers you're going to have. Lets say two and you have 8GB of ram remove 512MB for system stuff and then split that per server, so you'd have 3744MB of RAM to spare for the two servers and put the same number in both xmx and xms.
Enable Archive and Backup interval, I'm never that busy on the server so I only do 24hr but you can make it shorter.
Enable Start Server on Boot!

mcserversetup6.png

From here you can click each server and look at their settings and real-time log of what is going on. Go ahead and start your new server and log into it!

As you might of noticed my servers are still 1.8.3 and as time goes on I'll need to update the servers, this is really easy. Just do the same thing from when you logged into the Web Shell (https://192.168.1.7:12320) with the black screen and redo the three commands:

cd /usr/games/minecraft
git fetch
git merge origin/master

If you've had any windows/tabs open with the Web-UI close them and log back into it so it can refresh the changes. Click on Manage Profiles and click Create Stock Profile, select the newest version then the update button.
Click on the dashboard and select the name of the server you want to update and a new selection on the left should show up, click on server.config, it will be the first dialog box and in my case I'm rename it from vanilla183 to vanilla184 then hit enter. All done the server is now running the latest version of minecraft!
If you run into any problems trying to git fetch go here:
http://minecraft.codeemo.com/mineoswiki/index.php?title=Updating_the_Webui


This is about the only thing you'll have to manually do, other than that linux will keep itself up to date and the servers will back up (if you've told them too).

Power Consumption

Powering up it spikes at 35 to 40 watts but once it's done things settle to 25 watts even with people playing on it. Planning on leaving it on 24/7? Well here are some numbers for you its kWh of a day is 0.6 and the kWh year is 219.
To put that into a perspective a 60 watt incandescent light bulb kWh of a day is 1.44 and the kWh year 525.6.

I have my server on a UPS, again optional but if you know you're area is prone to black outs/brown outs I'd say it's worth getting one.

Hope this was all helpful, let me know if there is any glaring errors to fix.