====== Information ====== * Minetest ((http://www.minetest.net)) * [[Information:Realm of Espionage]] * mine.realmofespionage.xyz ((Minetest)) ===== Prerequisites ===== * [[distros:arch_linux_server | Arch Linux (Server)]] ====== Dependencies ====== **** sudo pacman -S 'minetest-server' ====== Firewall ====== * 30000/udp is Minetest Server sudo -e '/etc/ufw/applications.d/custom' && sudo ufw allow 'minetest-dedi' [minetest-dedi] title=minetest-dedi description=Minetest Server ports=30000/udp ====== Settings ====== * List of settings can be found at https://github.com/minetest/minetest/blob/master/minetest.conf.example * The ''.conf'' name correlates with the service name ((''main.conf'' = ''minetest@main'')) sudo -e '/etc/minetest/main.conf' send_pre_v25_init = false server_name = RoE | Mine server_description = Get your Minetest on at the Realm of Espionage Minetest server! This is a vanilla server running the minetest game mode. server_address = mine.realmofespionage.xyz server_url = https://realmofespionage.xyz server_announce = true serverlist_url = servers.minetest.net port = 30000 strict_protocol_version_checking = true ipv6_server = false default_game = minetest motd = Welcome to the Realm of Espionage Minetest server! max_users = 16 enable_damage = true default_password = roemt enable_pvp = true disallow_empty_password = true disable_anticheat = false enable_rollback_recording = true kick_msg_shutdown = Server is shutting down. kick_msg_crash = The server has encountered an unexpected issue and is shutting down. You will be disconnected. ask_reconnect_on_crash = true mg_name = v7 secure.enable_security = true name = Espionage724 ====== Services ====== ===== Initial ===== **** sudo systemctl enable 'minetest@main' --now ===== Backup ===== ==== Service ==== mkdir -p ~/'backups' && sudo -e '/etc/systemd/system/minetest-b.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/minetest-b.service' [Service] Type=oneshot WorkingDirectory=/var/lib ExecStart='/usr/bin/bash' -c '"/usr/bin/tar" -cvzf "/home/CHANGEME/backups/minetest-"$$(date +%%Y-%%m-%%d)".tar.gz" "minetest"' ExecStart='/usr/bin/sync' ==== Timer ==== sudo -e '/etc/systemd/system/minetest-b.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'minetest-b.timer' --now && sudo systemctl start 'minetest-b' && sudo systemctl status 'minetest-b' -l [Unit] Description=Minetest Account and World Backup [Timer] OnCalendar=*-*-* 02:35:00 Persistent=true [Install] WantedBy=timers.target ====== Backup ====== * Create backup archive on server and transfer to client computer ===== Server ===== ==== Archive Folders ==== **** cd '/var/lib' && tar -cvzf ~/'minetest-manual.tar.gz' 'minetest' && cd ~ && sync ===== Client ===== ==== Transfer Archive to Client ==== **** scp espionage724@192.168.1.153:~/'minetest-manual.tar.gz' ~/'Downloads' && sync ====== Restore ====== ===== Client ===== ==== Transfer Archive to Server ==== **** scp ~/'Downloads/minetest-manual.tar.gz' espionage724@192.168.1.153:~ ==== Remove Archive ==== **** rm ~/'Downloads/minetest-manual.tar.gz' && sync ===== Server ===== ==== Stop Minetest ==== **** sudo systemctl stop 'minetest@main' ==== Remove Previous Folders ==== **** sudo rm -Rf '/var/lib/minetest' ==== Restore Folders ==== **** cd '/var/lib' && sudo tar -xvzf ~/'minetest-manual.tar.gz' 'minetest' && sudo chown -R 'minetest':'minetest' '/var/lib/minetest' && cd ~ && sync ==== Start Minetest ==== **** sudo systemctl start 'minetest@main' ==== Remove Archive ==== * Verify that Minetest works before running rm -R ~/'minetest-manual.tar.gz' && sync