The scripts to auto setup your vps with git repo server, shadowsocks, v2ray, and nginx web server.
为 vps 自动化配置 git 仓库服务器、shadowsocks、v2ray 和 nginx web 服务器的脚本。
(Caution: The commands to install docker only work under Ubuntu Linux)
- Auto setup your vps by scripts;
- All the configuration files are managed by git repository;
- Shadowsocks, v2ray, and nginx run as docker container.
-
Setup git repository on vps
First you should have python (>= 3.2) installed on vps.
Then, executegit_repo.py
on your vps:python git_repo.py
And then a git bare repository will be generated at path
/opt/docker/git-repo/vps-files
(In fact at the.git
subdirectory). -
Push the pre-prepared
vps-files
git repository to vps
Push yourvps-files
git repository to/opt/docker/git-repo/vps-files/.git
of the vps via ssh. (The structure ofvps-files
repository refer to: Structure of git repository vps-files). -
Execute personal script and start docker containers.
Executesetup_vps.py
on your vps:python setup_vps.py
This script will execute your personal script and then start docker containers (Shadowsocks, v2ray, and nginx).
The structure of vps-files
should be:
vps-files/
|- webroot/
|- personal_setup.sh
|- ss-manager.json
|- v2ray-config.json
|- nginx-default.conf
|- [other directories or files as you need]
Directory webroot
is the html root of nginx.
personal_setup.sh
is a bash script. You can use it as you need, or just let it an empty script.
ss-manager.json
, v2ray-config.json
, and nginx-default.conf
are the configuration file of shadowsocks manager, v2ray, and nginx correspondingly.
Log file locations on vps,
v2ray:
/var/log/v2ray/
nginx:
/var/log/nginx/