In any case, xLog is open source, and sometimes when I access xLog, it lags, so I wanted to have a login management platform, so I tried it myself.
Preparation#
Prepare a server and a domain name. The higher the server configuration, the better. When I first tested it, I used a 4h8g server, which is not as powerful as a U server. It was very laggy to play with, and my memory was quickly consumed.
I directly set it up according to the official GitHub documentation: https://github.com/Crossbell-Box/xLog/blob/dev/CONTRIBUTING.md I just messed around...
Start building#
Deploy server environment#
As usual, I use Centos7 and directly install a Baota.
yum install -y wget && wget -O install.sh http://io.bt.sy/install/install_6.0.sh && sh install.sh
I used the Baota Happy Edition here: https://bt.sy/bbs/thread-20606-1-1.html
After installing Baota, log in directly and install Nginx. After installation, click on Website-Node Project-Install Node Version Manager.
Then click on Node Version Manager-registry source to set it to official-Update software list-Install version v16.20.2 (other versions are also available, I just used this one)
Then set the command line version to the version you just installed, and then click on Modules to add a pnpm module.
Docker installation#
One-click installation script:
wget https://i.k7blog.com/sh/docker.sh && chmod +x docker.sh && clear && ./docker.sh
Deploy xLog#
SSH connect to the server and execute the following command:
git clone https://github.com/Crossbell-Box/xLog.git
cd xLog
Baota opens /root/xLog and copies the contents of .env.example
, then creates a .env file and pastes it in.
Then find the 7th line NEXT_PUBLIC_OUR_DOMAIN=localhost:2222
and change localhost:2222 to your domain name. If you use an IP, skip it.
Install pnpm#
Execute the installation code:
wget -qO- https://get.pnpm.io/install.sh | sh -
Then close the SSH connection and log in again to take effect.
Initialization#
cd xLog
pnpm i
Run the database through docker-compose: pnpm docker:db
Initialize the database: pnpm prisma:migrate:dev
At this point, the deployment is basically complete. Let's go back to the Baota website-Node project-Add Node project.
Project directory /root/xLog/
Set the startup option to dev [next -p 2222] The project port is 2222, and the running user is set to root, otherwise it will not start and will report an error.
You can bind the domain name for external access, or you can use the dark web domain name I wrote earlier Building a Dark Web Site or Reverse Proxy Using Baota for dark web access.
Friendly reminder#
It requires a high configuration. At first, I built it with 4h8g, which was very difficult. Later, I built it with 6h16g, and it was even more laggy. There have been some strange accesses in the logs...
If you can build it without lagging and want to read other people's articles, you can use wildcard resolution.