mirror of
https://github.com/sipeed/NanoKVM.git
synced 2026-09-11 09:26:44 -05:00
NanoKVM Server
The code of NanoKVM backend server. For more documentation, please refer to Wiki.
Structure
server
├── config // server config
├── logger // server log
├── main.go
├── middleware // server middleware
├── proto // api request and response arguments
├── router // api routes
├── service // api handlers
└── utils // utils functions
Development
The configuration file path is /etc/kvm/server.yaml. There are two configurable options:
-
log: error: log level, default iserror. Too many logs may affect service performance, it is recommended to use theerrorlevel in production environment. -
authentication: enable: Whether to enable authentication, default isenable. Logging in is required after each service restart, usedisablewill skip the authentication check and don't need to log in again. Please delete this configuration for production environments!
Deployment
# Build
cd server
go mod tidy
GOARCH=riscv64 GOOS=linux go build
- After the compilation is complete, the executable file
NanoKVM-Serverwill be generated; - Upload the
NanoKVM-Serverfile to the/kvmapp/server/directory of NanoKVM; - Execute
/etc/init.d/S95nanokvm restartin NanoKVM to restart the service.