Deploy on VPS or PC (Binary)
Here I suppose you're using Linux server (Windows is similar).
Steps
- Download the latest version from Release page and extract it to your machine, let's say
/opt/subconv
. It should containapi
file andstatic
folder. cd /opt/subconv
to enter the directorychmod +x api.py
to give it execution permission- Run
./api -G default
to generate the default configuration file. Then modify it as needed. If you need to use ZJU's configuration file, you can use./api -G zju
to generate ZJU's configuration file. For detailed configuration items, please refer to Configuration ./api -h
to see the help message.
For example, you can use./api -H 127.0.0.1 -P 2534' or './api -H 127.0.0.1 -P 2534
to specify the host and port to listen. If all parameters are omitted, the host will be0.0.0.0
and the port will be8080
Note: If you're not using a privileged user, you usually can't bind to a port below 1024. It's recommended to use a high port or you can use
setcap
to give python the permission to bind to a low port.- Use reverse proxy (optional)