Technical backend stuff about the server. Things like setting up the server, portforwarding, SSH to VM, using Tmux, etc…
Virtual Machine & MC Server Specifications
- Virtual Machine:
- OS: Ubuntu 20.04.6 LTS
OS: Oracle Linux (Version 8.9)- Shape: VM.Standard.A1.Flex
- 2 CPU Cores
- 16 GB Memory
- MC Server:
- Minecraft
v1.20.4 - Fabric Loader
v0.15.10 - Runs on Java 17
- Minecraft
Running Server Via Terminal
- The command follows:
sudo java -Xmx12G -jar fabric-server-mc.1.20.4-loader.0.15.10-launcher.1.0.1.jar nogui - Default run command:
java -Xmx<Amount-Of-Memory> -jar <server jar file> nogui
Website
This website used to utilize MCWebServer, a mod which allowed a MC server to run alongside a site. Built off Jekyll, a static site generator, the site was configured to run off port 80 (the default port for http sites) which meant I had to prefix sudo to the run command, granting superuser privileges and allowing it to bind to port 80. Not doing so would result in a “Server Connection error: Permission denied”. Since then I have migrated over to this HTTPS site you’re currently on that runs off WordPress, all installed via Hestia.
Running Server 24/7 By Utilizing Tmux
Tmux installation for Linux: sudo yum install tmux
- Creating session:
tmux new -As <name> - Listing all active sessions:
tmux lsortmux list-sessions - Attaching to session:
tmux attach -t <name> - Detach from session:
Ctrl B + D - Kill/Delete a session:
tmux kill-session -t <name>
View all Tmux commands via Tmux Cheat Sheet
Video demonstration utilizing Tmux for a Minecraft server.
Other Useful Commands
- List file space usage:
du -h - List all directories only:
ls -d */ - Search for files within system:
sudo find / -iname <file name> - Report file system disk space usage:
df -h - Change user password:
sudo passwd <username> - Finding IP address associated with the domain name:
nslookup <domain> - Copy files via SSH:
sudo scp -i <private-key> <file directory> <user@ipaddress>:<directory to copy to>
Firewall Rules & Commands
For Ubuntu:
- Check if a port is being used:
sudo ss -tuln | grep <port> - Verify and ping connections:
telnet <ip> <port>- Example:
telnet 10.0.0.109 25565
- Example:
To reset Hestia back to its default firewall rules run sudo su - and iptables-save | awk '/^[*]/ { print $1 } /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } /COMMIT/ { print $0; }' | iptables-restore
For Linux:
// Example: Opening Port UDP & TCP at 8100
sudo firewall-cmd --permanent --zone=public --add-port=8100/udp
sudo firewall-cmd --permanent --zone=public --add-port=8100/tcp
// Example: Closing Port UDP & TCP at 8100
sudo firewall-cmd --permanent --zone=public --remove-port=8100/udp
sudo firewall-cmd --permanent --zone=public --remove-port=8100/tcp
// Example: Closing Port UDP & TCP at 8100
sudo firewall-cmd --permanent --zone=public --remove-port=8100/udp
sudo firewall-cmd --permanent --zone=public --remove-port=8100/tcp
// Finally, apply changes:
sudo firewall-cmd --reload
- List all open ports in firewall:
sudo firewall-cmd --list-ports - List all open services in firewall:
sudo firewall-cmd --list-services - Check if a port is already being used: netstat -tuln | grep :<port>
Performing Backups
- Zip file with command:
sudo zip -r <name of zipped file> <file you want to zip>. - Copy zipped file by using the
scpcommand or with WinSCP by simply dragging onto local machine.
Sources
Sites, Articles, & Documentation
- How To Set Up and Run a (Really Powerful) Free Minecraft Server in the Cloud
- Oracle Cloud
- Tmux Cheat Sheet
- No-IP: Free Dynamic DNS
- RClone Documentation For Google Drive
- Hestia Control Panel Docs
- How To Create A Minecraft Server On Ubuntu 22-04
- Open Ports Checker
- Whats My Dns
- Operating Linux Cockpit

Leave a Reply