How to install Wei-Shaw/sub2api. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.
Wei-Shaw/sub2api Installation Guide
How to install Wei-Shaw/sub2api. Official project installation instructions and setup guide.
⚡
Automated Install (Recommended)
Quick installation instructions for Wei-Shaw/sub2api. This is the fastest way to complete project installation and setup.
Install via curl
curl -fsSL https://hexmos.com/ipm-install | bash &&
ipm i Wei-Shaw/sub2apior
Install via npx
npx @hexmos/ipm i Wei-Shaw/sub2apiPrerequisites
Go
languageVersion: 1.21+
Node.js
languageVersion: 18+
PostgreSQL
databaseVersion: 15+
Redis
cacheVersion: 7+
Docker
containerizationVersion: 20.10+
Docker Compose
containerizationVersion: v2+
Manual Installation Methods
Manual installation instructions. How to install from GitHub source.
Script Installation (Linux)
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/install.sh | sudo bash
sudo systemctl start sub2api
sudo systemctl enable sub2apiDocker Compose Installation (Linux/macOS)
mkdir -p sub2api-deploy && cd sub2api-deploy
curl -sSL https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/deploy/docker-deploy.sh | bash
docker compose up -dBuild from Source (Linux/macOS/Windows)
git clone https://github.com/Wei-Shaw/sub2api.git
cd sub2api
npm install -g pnpm
cd frontend && pnpm install && pnpm run build
cd ../backend && VERSION=$(./scripts/resolve-version.sh) && go build -tags embed -ldflags="-X main.Version=${VERSION}" -o sub2api ./cmd/server
cp ../deploy/config.example.yaml ./config.yaml
nano config.yaml
./sub2apiPost Installation Steps
- Access the setup wizard in your browser at http://YOUR_SERVER_IP:8080 to configure database, Redis, and create an admin account.
- If using Docker Compose, retrieve auto-generated credentials from logs: `docker compose -f docker-compose.local.yml logs sub2api | grep "admin password"`
- For building from source, ensure PostgreSQL 15+ and Redis 7+ are running and configured in `config.yaml`.
