Some Basic Pre-requisites

Some Basic Pre-requisites

Open all ports (dev purpose only)

$ sudo iptables -P INPUT ACCEPT
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -P OUTPUT ACCEPT
$ sudo iptables -F
$ apt-get purge netfilter-persistent
$ reboot

Install docker

$ curl -fsSL -o
$ sudo sh

Install docker-compose (check latest version)

$ sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
$ sudo chmod +x /usr/local/bin/docker-compose

Export snap path

$ export PATH=$PATH:/snap/bin

Clean up all unused docker images

$ docker system prune -a

Install V2Ray

$ curl -O
$ curl -O
$ bash
$ bash

# LOCATION: /usr/local/etc/v2ray/

$ bash --remove

Install BBR (check script before run)

$ wget --no-check-certificate && chmod +x && ./

Caddy v2

$ echo "deb [trusted=yes] /" \
| sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
$ sudo apt update
$ sudo apt install caddy
$ sudo systemctl daemon-reload
$ sudo systemctl enable caddy
$ sudo systemctl start caddy
$ sudo systemctl status caddy


## This is 128M*32=4G swapfile, for 2G RAM. Adjust yourself
$ sudo dd if=/dev/zero of=/swapfile bs=128M count=32
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ sudo nano /etc/fstab
## Add the following new line at the end of the file, save the file, and then exit:
/swapfile swap swap defaults 0 0

Copyright statement: Unless otherwise stated, all articles on this blog adopt the CC BY-NC-SA 4.0 license agreement. For non-commercial reprints and citations, please indicate the author: Henry, and original article URL. For commercial reprints, please contact the author for authorization.