Skip to content

Latest commit

 

History

History
executable file
·
160 lines (114 loc) · 7.26 KB

GUIDE.md

File metadata and controls

executable file
·
160 lines (114 loc) · 7.26 KB

Anarchy Server Optimization Guide

The Basics

  1. Don't use Bukkit/Spigot! I hope you are atleast using Paper after downloading AnarchyExploitFixes... I recommend PaperBin, this will make eating/breaking blocks work great in low tps and optimize many other things.

  2. You should obviously be using AnarchyExploitFixes after reading this in the AnarchyExploitFixes repo.

  3. Remove any shitty "antilag" plugins that actually cause lag such as Clearlag or L2X9Core. L2X9core causes freezes because it doesn't run web requests and other things on a seperate thread. This causes your main thread to freeze randomly. It also disables vanilla features for example, killing people for riding boats in vanilla.

  4. Popular plugins you should not be using on Anarchy Servers:

    • DriveBackupV2 - This backup plugin was meant for small worlds such as 200mb. This will cause a shit ton of lag on a big map like 500gb.

    • IllegalStack - This plugin causes a shit ton of lag and even enables certain dupes: https://youtu.be/_gF67eaiLIk

  5. Use the Paper autosave! The default autosave (Bukkit) is dogshit for big maps and will freeze your server every 5 minutes. Make sure to set autosave to -1 in bukkit.yml, and set auto-save-interval to 6000 (or however long you want to wait per autosave) in paper.yml

  6. Try not to use a shared host, most oversell their servers or use terribly clocked xeons which means your server will suffer from TPS loss.

  7. Don't use multicraft and try not to use any panels at all. These often cause lag because they were not meant for big servers. For example multicraft will run /save-all every 5 minutes (which will freeze the server) when paper already has an autosave built in. If you absolutely have to use a Panel I recommend Pterodactyl

  8. Use Debian. Windows Server is terrible for performance, Ubuntu is better but it's still worse than Debian. Debian is pretty much the same without extra packages you don't need. It only uses about 90mb of ram when nothing is running compared to 2+ gb with Ubuntu and 5+ gb with Windows. 99% of ubuntu tutorials will work on debian.

  9. Make sure you are using a good ddos protection provider, ddos attacks are being used more and more, especially on anarchy servers, and any ordinary person can launch one now. I recommend TCPShield if you are a small server and use less than 1TB of bandwidth.

  10. I've noticed the server has a ton of lag if it generates new chunks outside of the default worldborder. If you are having lag try decreasing the world border by a few hundred blocks.

  11. Make sure your backend server ips are set to 127.0.0.1 in server.properties to prevent backdoors.

Advanced

  1. Plugins I recommend using alongside AnarchyExploitFixes:

    • 2LS ExploitFixer - This prevents most packet exploits, AEF patches some packet exploits, but I'm not going to patch exploits that this plugin already patches simply because it's not worth my time.
    • PandaWire - This optimizes redstone which will prevent some lag machines.
    • WorldStatsRewritten - https://github.com/moom0o/WorldStatsRewritten I recommend using my version over the original due to the original code being terrible and causing lag.
    • AntiRedstoneClock - Only recommended if you really need it, this removes all redstone clocks. It could be very annoying for any players trying to build redstone contraptions but could help prevent lag machines.
  2. If you are using Linux and have a spare ssd available, I recommend having all your server files on the ssd and using symlinks to have ONLY the region files on a seperate drive. This will improve performance because the server won't freeze when saving playerdata, advancements or plugin data.

  3. Possibly setup your own ddos protection if you use more than 1TB of bandwidth on TCPShield, I recommend buying a vps from BuyVM and setting up an nginx reverse proxy on it to protect your anarchy server. Make sure to setup the ddos protection firewall in the BuyVM Stallion for L7 protection, block all ports except needed ones, and connect through the unprotected ip for best ping (9ms hetzner etc). If you already have good protection then you probably won't need this, if you are currently getting attacked, ask your host if you can reset the ip address. If using Hetzner you can buy another subnet.

NGINX reverse proxy config:

Add to bottom of /etc/nginx/nginx.conf then run sudo service nginx reload

stream {
    server {
        listen 25565;
        proxy_protocol on;
        proxy_bind UnProtectedIP; # Make sure its binded!
        proxy_pass BackendServerIP:25565;
    }
}

/etc/network/interfaces config - Reboot when done.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
  address UnProtectedIP
  netmask 255.255.255.0
  gateway YourGatewayIP # FIND AT https://manage.buyvm.net/vserver/ID/ipaddresses# - Replace ID with the ID on your BuyVM panel, click the gear, go to network settings of the non protected ip.
auto eth0:1
iface eth0:1 inet static
  address ProtectedIP
  netmask 255.255.255.0
  gateway YourProtectedGatewayIP # FIND AT https://manage.buyvm.net/vserver/ID/ipaddresses# - Replace ID with the ID on your BuyVM panel, click the gear, go to network settings of the protected ip.

Make sure to enable proxy protocol in BungeeCord/Waterfall config.

You should not use an OVH VPS or OVH Game for DDoS Protection due to internal attacks (meaning you can hit off an OVH server using another OVH server) and does not have very great filtering.

Plugin Issues

DeathMessagesPrime

  1. Replace all %plrtag% variables with %player% this removes the extra data associated with names which can kick all players.
  2. Replace all %weapon% variables with %weapon_name% this removes the NBT data associated with the weapon which will prevent the 2b2t kick exploit https://www.youtube.com/watch?v=gR58gbei0TM

antiRedstoneClock

  1. This plugin has a chance to cause redstone to duplicate as demonstrated in this video: https://www.youtube.com/watch?v=p8-bx1W5BZc To prevent this, simply set DropItem to 'false'.

Configs

Follow this guide, decrease the options even more if needed: https://www.spigotmc.org/threads/guide-server-optimization%E2%9A%A1.283181/

Server.properties

If you are already using an anticheat, enable flight in server.properties, this will prevent the boat kick exploit.

Bukkit.yml

Set autosave to -1

Spigot.yml

Set tab-complete to -1 to prevent .pl on clients

Paper.yml

  1. Set auto-save-interval to 6000
  2. Set armor-stands-tick to false to prevent lag machines, this is not really needed and is mainly used for lag machines.

paperbin.properties

  • antiChunkBan - True
  • antiIllegalItem - True
  • antiPhysicsCrash - True
  • antiUnicodeChat - Make sure this is false because players with a different language may not be able to speak.
  • chunkLoadOptimisations - True
  • mobAiMultithreading - False, its broken

Other

Please create a pull request if you want to share any of your knowledge.