Required Software Packages (Debian)
apt install unzip screen wget tar vim -y
Installing Dotnet3
If you are on Arm64 architecture (Raspberry Pi, mainstream old phones), please refer to the instructions below to execute the commands.
Run the command arch to check if you are using arm64 architecture.
GuihongWang@marisa:~$ arch
aarch64 x86_64
The left side is arm64 and the right side is the computer's 64-bit architecture.
Download the arm64 architecture Dotnet package.
wget https://download.visualstudio.microsoft.com/download/pr/f9f54199-f0b3-43ac-badd-f9ef6867641c/50bd985f26c59f5d63f29f571f7f89e5/dotnet-sdk-3.1.412-linux-arm64.tar.gz
Place it in /root and then execute as root.
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-3.1.412-linux-arm64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
If you are on 64-bit architecture, look here to install dotnet.
This demonstration uses Debian 11 64-bit.
Paste the commands all at once.
wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-3.1
Line Break
OAuth (if for personal use, no need to pay attention)
Please refer to the official help to create OAuth official help page
For the pfx certificate, I recommend you get one from freessl.cn (it takes 1-2 hours to obtain the certificate) and then use their recommended keymanager to generate the certificate.
Line Break
Keymanager More - Export Certificate - Select All Formats
In the specified command, find the domain name for which you applied for the certificate - a string of numbers.zip
Enter the zip, go into the folder, find the IIS folder, and enter it.
Remember the password inside, as you will need it later.
So far, we have prepared the necessary files. Now let's download Microsoft E5 Renew X.
Manually download https://sundayrx.lanzoui.com/aW09Lsss75g and upload it to a location on the server that you can remember.
Then execute unzip -d /renew Microsoft365_E5_Renew_X.zip
This will place it in the location you remember /renew.
Configure by uploading the above certificate to the Deploy folder.
cd Deploy
vim Config.xml
In vim, use the i key to enter input mode, press esc to exit input mode, type to save and exit. w saves, q exits, ! forces execution for the last command (e.g., ! forces save and exit).
If configured correctly, if a 500 proxy error occurs, please set the SSL certificate transfer to false.
After configuring the certificate and OAuth, switch to our Baota panel.
Before opening the Baota panel, create a website (I am using Apache; Nginx may have a similar operation).
Before performing reverse proxy, let the Office 365 E5 Renew program run persistently.
Screen (create a virtual window).
Then cd into the directory you remember /renew.
Then run dotnet Microsoft365_E5_Renew_X.dll.
Finally, when you see Application started. Press Ctrl+C to shut down., you can press ctrl + a + d to exit this virtual window (after exiting, the Office 365 E5 Renew program continues to run inside).
Return to the Baota panel, Website - Settings - Reverse Proxy to configure.
Enjoy!