phira-mp
phira-mp is a project developed in Rust. Below are the steps to deploy and run the server.
简体中文 | English Version
Environment
- Rust 1.70 or higher
Server Installation
For Linux Users
Dependencies
First, install Rust if not already installed. You can follow the instructions at https://www.rust-lang.org/tools/install
For Ubuntu or Debian users, if curl is not already installed, install it with the following command:
sudo apt install curlFor Fedora or CentOS users, use the following command:
sudo yum install curlAfter installing curl, install Rust using the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shThen, build the project:
cargo build --release -p phira-mp-serverRun the Server
You can run the application using the following command:
RUST_LOG=info target/release/phira-mp-serverYou can also specify a port via arguments:
RUST_LOG=info target/release/phira-mp-server --port 8080For Docker
- Create a Dockerfile
FROM ubuntu:22.04
RUN apt-get update && apt-get -y upgrade && apt-get install -y curl git build-essential pkg-config openssl libssl-dev
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /root/
RUN git clone https://github.com/TeamFlos/phira-mp
WORKDIR /root/phira-mp
RUN cargo build --release -p phira-mp-server
ENTRYPOINT ["/root/phira-mp/target/release/phira-mp-server", "--port", "<preferred-port>"]Build the image
docker build --tag phira-mp .Run the container
docker run -it --name phira-mp -p <prefered-port>:<preferred-port> --restart=unless-stopped phira-mp
Monitoring
You can check the running process and the ports it is listening on:
ps -aux | grep phira-mp-server
netstat -tuln | grep 12346
For Windows or Android Users
See: https://docs.qq.com/doc/DU1dlekx3U096REdD
HSNPhira Exclusive
Provides room status monitoring functionality, used in conjunction with phira-web-monitor/monitor-proxy.
Set environment variables before running:
export HSN_SECRET_KEY=<some_random_secret_key>The secret key here must match the one set in phira-web-monitor/monitor-proxy.