-
Update, Upgrade, and Clean the server.
-
Install Useful Packages.
-
Enable Packages at Server Boot.
-
Create & Enable
SWAP
File. (Default is2Gb
) -
Enable
IPv6
Support. -
Clean the Old
SYSCTL
Settings. -
Optimize the
SYSCTL
Settings.- 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.
nproc
nofile
-
Optimize
UFW
& Open Common Ports.
Reboot at the end.
Ubuntu
server(16+)
withroot
access.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.