Skip to content

Latest commit

 

History

History
317 lines (224 loc) · 5.96 KB

README.md

File metadata and controls

317 lines (224 loc) · 5.96 KB

Language : 🇺🇸 English | 🇨🇳 简体中文

ServerBee Backend

Backend for iOS application named ServerBee

Features

  • CPU load
  • load average
  • memory usage
  • uptime / boot time
  • filesystem mounts (and disk usage)
  • disk I/O statistics
  • network interfaces
  • network traffic statistics
  • process list
  • detail process
  • kill process
  • sub process

Dashboard for web

overview process disk&network terminal settings

Interactive install

interactive install

How to use

Installation

Quick install(Linux、macOS)

bash <(curl -s https://raw.githubusercontent.com/ZingerLittleBee/server_bee-backend/main/script/startup.sh)

Docker

The installation tutorial is located in the documentation 👉 Docker

docker run -d \
  -v /proc:/proc \
  --privileged=true \
  --restart unless-stopped \
  --network=host \
  --name=serverbee-web \
  zingerbee/serverbee-web -p 9527

Linux、macOS

👇 The installation tutorial is located in the documentation

From Release Page get the latest version download address

# (optional)
mkdir serverbee
cd serverbee

# tips: download the corresponding version according to the system architecture
# macOS
wget https://github.com/ZingerLittleBee/server_bee-backend/releases/download/v1.2.6/serverbee-deploy-x86_64-apple-darwin.zip
unzip serverbee-deploy-x86_64-apple-darwin.zip

# Linux
wget https://github.com/ZingerLittleBee/server_bee-backend/releases/download/v1.2.6/serverbee-deploy-x86_64-unknown-linux-musl.zip
unzip serverbee-deploy-x86_64-unknown-linux-musl.zip

# default port is 9527
./serverbee-deploy

Windows

The installation tutorial is located in the documentation 👉 Windows

  1. Download the latest version serverbee-deploy-x86_64-pc-windows-gnu.zip from Release Page

  2. unzip serverbee-deploy-x86_64-pc-windows-gnu.zip

  3. double-click to run serverbee-deploy.exe

More settings

Allow downloading of pre-release versions

By default, only stable versions will be downloaded

If you want to download pre-release versions, you can use the --pre-release parameter

./serverbee-deploy --pre-release

Interactive install

./serverbee-deploy -i

Enable auto launch (default is enable)

./serverbee-deploy -a true

Disable auto launch

./serverbee-deploy -a false

Use custom port

./serverbee-deploy -p 8081
# for unused deploy module
./serverbee-web -p 8081

Log directory (default is current directory)

./serverbee-web -l /var/log/serverbee

Data directory (default is current directory)

./serverbee-web -d /var/lib/serverbee

Examples

./serverbee-deploy -p 8081 -a false -u true

Configuration related API

The following interfaces can only be accessed from localhost

View all configurations

curl http://localhost:9527/local/config

The response is as follows:

{
  "success": true,
  "data": {
    "web_server": {
      "port": 9527
    },
    "server": {
      "token": "token",
      "host": "serverhub.app",
      "disable_ssl": false
    },
    "app": {
      "token": "token"
    }
  }
}

View web_server config

Related configuration of web server, including port number

curl http://localhost:9527/local/config/web_server

The response is as follows:

{
  "success": true,
  "data": {
    "port": 9527
  }
}

Update the web_server configuration

curl -X POST -H "Content-Type: application/json" -d '{"port": 9527}' http://127.0.0.1:9527/local/config/web_server

The response is as follows:

{
  "success": true
}

View app config

App-related configurations, including communication keys

curl http://localhost:9527/local/config/app

The response is as follows:

{
  "success": true,
  "data": {
    "token": "token"
  }
}

Update app config

curl -X POST -H "Content-Type: application/json" -d '{"token": "newToken"}' http://localhost:9527/local/config/app

The response is as follows:

{
  "success": true
}

View server config

Server related configuration, including communication key, server address, whether to disable SSL

curl http://localhost:9527/local/config/server

The response is as follows:

{
  "success": true,
  "data": {
    "token": "token",
    "host": "serverhub.app",
    "disable_ssl": false
  }
}

Update server config

curl -X POST -H "Content-Type: application/json" -d '{"token": "newToken", "host": "serverhub.app", "disable_ssl": false}' http://127.0.0.1:9527/local/config/server

The response is as follows:

{
  "success": true
}

Compile from source

1. Build the front-end source code

Need to install nodejs, pnpm

pnpm -C apps/view install
pnpm -C aaps/view build

The build product is in the view/dist directory

2. Build web, deploy module source code

Need to install rust

cargo build --release

and then you can find the binary file in target/release

Read More

Office Website

Document

App Store