https://github.com/saigut/vps-scripts
Auto setup your vps by scripts. 自动化配置 VPS 的脚本。
https://github.com/saigut/vps-scripts
docker nginx shadowsocks v2ray vps-setup
Last synced: about 2 months ago
JSON representation
Auto setup your vps by scripts. 自动化配置 VPS 的脚本。
- Host: GitHub
- URL: https://github.com/saigut/vps-scripts
- Owner: Saigut
- Created: 2022-03-21T08:08:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-22T06:50:48.000Z (almost 4 years ago)
- Last Synced: 2025-06-07T05:07:59.910Z (about 1 year ago)
- Topics: docker, nginx, shadowsocks, v2ray, vps-setup
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vps-scripts
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)***
## Brief introduction
1. Auto setup your vps by scripts;
2. All the configuration files are managed by git repository;
3. Shadowsocks, v2ray, and nginx run as docker container.
## How to use
### Steps to setup
1. Setup git repository on vps
First you should have python (>= 3.2) installed on vps.
Then, execute `git_repo.py` on your vps:
```shell
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).
2. Push the pre-prepared `vps-files` git repository to vps
Push your `vps-files` git repository to `/opt/docker/git-repo/vps-files/.git` of the vps via ssh. (The structure of `vps-files` repository refer to: [Structure of git repository vps-files](#structure-of-git-repository-vps-files)).
3. Execute personal script and start docker containers.
Execute `setup_vps.py` on your vps:
```shell
python setup_vps.py
```
This script will execute your personal script and then start docker containers (Shadowsocks, v2ray, and nginx).
### Structure of git repository vps-files
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
Log file locations on vps,
v2ray:
`/var/log/v2ray/`
nginx:
`/var/log/nginx/`