-
Update, Upgrade, and Clean the server.
-
Install Useful Packages.
-
Enable Packages at Server Boot.
-
Create & Enable
SWAPFile. (Default is2Gb) -
Enable
IPv6Support. -
Clean the Old
SYSCTLSettings. -
Optimize the
SYSCTLSettings.- SWAP
- Network
- BBR
- Kernel
-
Optimize
SSH.- Back up the original sshd_config file
- Disable DNS lookups for connecting clients
- Enable compression for SSH connections
- Remove less efficient encryption ciphers
- Enable and Configure TCP keep-alive messages
- Allow agent forwarding
- Allow TCP forwarding
- Enable gateway ports
- Enable tunneling
-
Optimize the System Limits.
nprocnofile
-
Optimize
UFW& Open Common Ports.
Reboot at the end.
Ubuntuserver(16+)withrootaccess.curl
If your Ubuntu server does not have curl, install it first:
sudo apt install -y curl
bash <(curl -s https://raw.githubusercontent.com/samsesh/Ubuntu-Optimizer/main/ubuntu-optimizer.sh)run with tmux
tmux new -s optimizer 'bash <(curl -s https://raw.githubusercontent.com/samsesh/Ubuntu-Optimizer/main/ubuntu-optimizer.sh)'This script is provided as-is, without any warranty or guarantee. Use it at your own risk.
This script is licensed under the MIT License.