Cube Computer
System Setup
- Thorough dust cleaning, new bios battery and removed secondary hard
drive - May 2026
- Xubuntu 26.04 installed. Released April 2026, EOL April 2029.
- Xubuntu desktop (very low memory usage and almost none when not
logged in).
- Automated security updates enabled
- On tailscale network, with ports 25560-25569 forwarded from
minecraft.locklin.science
- UFW firewall is enabled (
tldr ufw).
- Port 25560 is the ssh server (key access only!) so ssh works
anywhere.
- Port 25565 is used for Minecraft
- The other ports may be used for other things, but you need to enable
them on the ‘ufw’ firewall.
- Samba (Windows) share accessible only to laptop’s tailscale ip
address
- Java JDK is not installed at the system level in favor of SDKMAN,
which allows many different versions to be installed and updated by the
current user. If you end up developing in Java, SDKMAN is the typical
way you install SDKs of various versions for your projects too.
- Most development tools are installed via apt.
Storage
- home and (seperately) minecraft folder are zfs partitions.
- ‘public_html’ specifically is a standard partition because it is
full of constantly re-generated files which would grow snapshots. It
also prevents the system from crashing if the map generation ever fills
the storage completely as only that partition will be affected. Consider
it ephemeral - anything in there can be safely lost.
- The root system partition is 40Gb and the public_html partition is
50Gb, the remainder is available for the zfs pools (they dynamically
grow as needed). See
zfs list
ZFS
- Zfs is a next-generation “copy on write” filesystem invented on UNIX
systems years ago but more recently available on Linux.
- Copying a large file is instant and causes no increase of storage
consumption! Only when the files diverge are data slowly added to the
storage. This makes copying a server folder easy and cost nothing if you
want to experiment or upgrade something without affecting the
origional.
- This allows free and instant snapshots. For a minecraft world, which
is a large and slowly changing binary file, this means you can have
snapshots of world state going back in time. Keeping snapshots forever
obviously uses more space as the worlds change over time, so they are
rotated by a script.
- in both home (/home/alex) and in the server folder (it’s own zfs
pool), you have a hidden ‘.zfs’ directory. Look in there to find
snapshots of past states. You can copy any file out of there to restore
old versions of files or worlds or entire server directory instances. It
keeps hourly, daily, weekly and 3 monthly snapshots, rotating the old
ones out. Remember that if someone wrecks your world, you can only
restore hourly backups same-day.
- zfs also allows easy backup at the partition level. We will set up
storage backup to the new server when it’s ready in case the ssd ever
fails. It also does constant checks for corruption and guarentees
against silent “bit rot”.
Starting a server
There are lots of server instances in ~/minecraft. Included are the
old servers from previously on the Cube, and 3 brand new up-todate
servers. They all are configured for the same port so you can only run
one at a time.
cd ~/minecraft/<instance-name>
sh run.sh
The server runs in the foreground in your tmux session. Detach
without stopping: Ctrl-b d
Stopping a server
Type stop in the server console, or from any shell:
mc-stop
Key directories
~/minecraft/ — server instances go here
~/minecraft/.zfs - Historic snapshots of servers
~/bin/ — simple scripts and tools
~/public_html/ — web content (not snapshoted)
~/notes/ — these docs, get published to https://minecraft.locklin.science/notes
~/.zfs - Historic snapshots of the rest of home folder
~/share - Available to laptop via windows share (over tailscale)
Commands (shell scripts in
~/bin)
Anything in ~/bin can be run from anywhere, it is part of the shell’s
$PATH like any other program on Linux. The scripts are extremely simple
and can be easily modified.
mc-stop stop the running server
mc-console attach to the server console
mc-status show server status
mc-render rebuild world maps (done automatically)
make_web rebuild the notes pages and index page from markdown files
Notes
Any markdown files in the ~/notes directory are used by
make_web to generate the pages in
https://minecraft.locklin.science/notes. Make a new markdown file and it
will show up on the website. make_web was designed to be
the world’s simplest static site generator -easy to understand how it
works. It can be run as a command, but also runs periodically to keep
things in sync.
- tmux, a terminal multiplexor lets you resume where you left off and
support long-running processes, like minecraft via the run.sh scripts.
If you see a status bar at the bottom, you are inside tmux. If you are
connected to the same tmux session from two devices or terminal windows,
it might get temporarily scrambled until you interact with it. No
harm.
- micro, a simple terminal text editor with syntax highlighting -
better than nano.
- fd, search for files. (Much easier than the old
find
command)
- man comman, man pages for command. Alternatively,
tldr
command has more readable documentation for commands. Try
tldr ls.
- tree, see the directory tree from wherever you are.
cd public_html; tree for example.
- zsh, the configured shell, with more features than standard bash,
suggested completions from history and more colours.
- btop, system status dashboard showing cpu, memory, etc.
- cat file, print a file to the console instead of editing it.