NoteThis is the first article in the "Mix Space + Yohaku Deployment Series," focusing on the installation of the backend (Core). For deploying the frontend theme Yohaku, please proceed to the second article.
Mix Space is a modern, frontend-backend separated personal blog system. The backend Core provides a full suite of services including RESTful API, scheduled tasks, backups, serverless functions, etc., acting as the quietly beating heart of the entire system; the frontend theme is separated from it and can be freely paired.
This article will guide you through using the 1Panel panel to run the Mix Space backend on your own server—no need for much hassle, just follow step by step.
Step 1 · Installing the 1Panel Panel
1Panel is a modern, open-source Linux server operations panel with a clean interface and intuitive operation. With it, subsequent container management, file uploads, and reverse proxying will become exceptionally convenient.
A Small Pre-installation Check
| Check Item | Requirement |
|---|---|
| Operating System | Mainstream Linux distributions (Debian / Ubuntu / CentOS, etc.) |
| Server Architecture | x86_64, aarch64, armv7l, etc. are all supported |
| Available Memory | Recommended 1 GB or more |
| Network Environment | Must have normal internet access |
| Browser | Modern browsers like Chrome, Firefox, Edge, etc. |
One Command to Complete Installation
SSH into your server and execute:
Follow the command-line prompts and wait patiently for the installation to complete. Upon success, the console will print access information similar to this:
Forgot the security entrance? SSH back into the server and execute the following command; the value of the entrance field is the entrance path:
If Docker installation fails, first run this command separately to fix it:
Step 2 · Installing Mix Space via 1Panel
2.1 Download the Application Package
Download the mxspace.zip file from the repository below for later use:
2.2 Upload the Application Package
Log into the 1Panel panel, go to Host → Files in the left menu, and navigate to the path:
Click Upload, and select the mxspace.zip file you just downloaded.
2.3 Extract, Pay Attention to the Path!
After the upload is complete, click on mxspace.zip and select Extract.
2.4 Sync Local Applications
Go to the 1Panel App Store, click the Sync Local Apps button in the top right corner, wait a moment, then type mxspace in the search box, and you should see the application you just added.
Click Install to enter the configuration page.
2.5 Fill in the Installation Configuration Items
The installation page has three read-only notes and five configuration items. Fill them in from top to bottom:
NoteAt the top of the page, there are three gray "📌" note texts explaining JWT secret requirements, domain format, and encryption function considerations, for reference only, no need to modify, just skip them.
🔑 JWT Secret
This is the core security credential for the backend service. The length requirement is no less than 16 characters and no more than 32 characters. It is recommended to use a randomly generated strong password. You can execute in the terminal:
Enter the generated result here and keep it safe—it's like the key to this blog system; losing it will require a reset and cause some trouble.
🌐 Allowed Origins
Fill in the frontend domain(s) allowed to access the backend API. Separate multiple domains with English commas. Format example:
When deploying the Yohaku frontend, this is where you fill in the domain where Yohaku is located. If you are not sure yet, you can fill in localhost:* for now and modify it later in the configuration page of the installed application.
🔒 Enable Encryption
Select from the dropdown, default is Off (Recommended).
🗝️ Encryption Key
Only required if the previous item is set to "On." The key must be 64 lowercase letters and numbers. It can be generated with the following command:
If encryption is turned off, leave this field empty.
🔢 HTTP Port
Default is 2333, usually no need to change. If there is a port conflict, you can change it to another available port.
NoteIt is not recommended to directly check "External Access" for the port. Instead, expose the service through the next step's reverse proxy, which is safer and more standard.
2.6 Start Installation 🎉
Confirm the configuration is correct and click Start Installation.
1Panel will automatically pull the innei/mx-server, mongo:7, and redis:alpine three images and orchestrate their startup. The first installation requires pulling images, so wait patiently for a few minutes.
When the status shows Running, the Mix Space backend is quietly running 🌿
Step 3 · Configuring Reverse Proxy and HTTPS
Exposing the port directly is neither secure nor elegant. It is recommended to bind the service to your domain via Nginx reverse proxy and then add HTTPS to make the setup complete.
Here is a complete Nginx configuration. It does something interesting—it writes the routing for both the frontend (Yohaku, port 2323) and the backend (Mix Space Core, port 2333) in the same server block, serving them under the same domain. Visitors access your blog, with the frontend pages and backend API quietly working behind the scenes, presenting only a clean domain to the outside.
In 1Panel's Website → OpenResty → Configuration File, or by directly editing the Nginx configuration on the server, fill in the following content:
After saving the configuration, execute nginx -t to check the syntax, then nginx -s reload to reload and make it effective.
After configuration is complete, your backend-related addresses are as follows (will be used when deploying Yohaku later):
Please note down these addresses.
Step 4 · Initializing the Admin Panel
After the reverse proxy configuration is complete, access the admin panel in your browser:
The first visit will guide you through initialization, including creating an administrator account, filling in basic site information, etc. Just follow the prompts.
Frequently Asked Questions
Q: After installation, the container keeps restarting and cannot start normally?
Most likely, MongoDB or Redis health checks haven't passed yet—they need a little time to fully become ready, and the Core container will automatically retry. Wait about 1 minute, and it usually recovers on its own. If the issue persists, you can check the specific error messages in the container logs within 1Panel.
Q: What if I forgot to save the JWT secret?
In the 1Panel App Store's installed list, click Edit or Configure for mxspace to view the current environment variable values.
Q: How do I modify the allowed domains?
Modify the ALLOWED_ORIGINS environment variable in the configuration page of the installed application, save, and restart the container for it to take effect.
Q: Where is the data stored?
All data is persistently stored in the /opt/1panel/apps/local/mxspace/mxspace/data/ directory, containing MongoDB data, Redis data, and mx-space runtime files. Regularly back up this directory, or back it up along with 1Panel snapshots.
References
- 1Panel Online Installation Documentation
- Mix Space Official Documentation
- mx-server GitHub Repository
- Self-Creating 1Panel Applications · FIT2CLOUD Community Forum
The backend has landed steadily 🌱 Next, head to the second article to dress it up in the beautiful garment that is Yohaku.