Introduction
This article mainly introduces how to deploy the open-source Linux server management panel 1Panel locally on the Orange Pi Zero3 running CasaOS light NAS system using Docker, and how to achieve remote access to the panel via cpolar internal network penetration, thereby improving server management efficiency and remote website building. No public IP is required, and there’s no need to set up the router so complicatedly.
The 1Panel panel is no stranger to operations and personal station masters. Managing servers using a graphical user interface management panel is much easier than command line operations. As a new generation of open-source Linux operation and maintenance management panel, the operating interface is ad-free, providing a better user experience, and is also likened to a cost-effective alternative to Baota panel.
The 1Panel dashboard can display the usage of key server resources in real-time, and its monitoring capabilities and alarm mechanisms can achieve comprehensive monitoring of the server. Users can also quickly build websites through 1Panel and easily manage their own websites. The built-in app store integrates a rich variety of open-source software, greatly lowering the deployment threshold for open-source software.
Recently, I saw many people sharing the installation of 1Panel on fnOS, which can improve the user experience in managing Docker containers. Coincidentally, I also saw 1Panel in the app store of the CasaOS Orange Pi Zero3 I have been using recently, so I will simply share the installation process and how to achieve remote access to the panel to manage containers and other operations through the cpolar internal network penetration tool.
1. Add Image Source
The environment I am demonstrating is the Orange Pi Zero3 small host that has already flashed CasaOS.
If you don’t know how to operate, you can check this tutorial:How to Flash CasaOS Light NAS System on Orange Pi Zero3
First, we need to enter the Orange Pi IP address in the browser to access the CasaOS management interface.
Then enter the terminal and log in with the root account password.
After entering the terminal, execute the command below:
nano /etc/docker/daemon.json
In the editor, enter the new image source address:
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://docker.1panel.live"
]
}
Then press Ctrl+X to save this image source, exit the editor, and execute the command below to restart the Docker service:
2. Deploy 1Panel
After completing the above operations, we return to the CasaOS main interface and click on the system’s built-in App Store application center.
When just installing the CasaOS system, you will find that there are too few applications inside. In fact, the official has provided a method to manually add more applications, just click on more applications in the current APP dropdown box.
Then click the question mark, which will automatically open a page in the browser to add more applications:
Copy the addresses from this page, then return to the CasaOS application center interface.
Paste the address into the input box with the question mark and click add. The system will automatically update more applications to the application center interface, which can increase from dozens to hundreds.
When adding applications, you can search for 1Panel in the app store, and after it appears, click install to automatically deploy:
A security prompt box will pop up showing the relevant information required for login, and you can take a screenshot to save it.
After the deployment is complete, click to open, and you can access the web login interface of the 1Panel panel in the browser:
PS: If you want to install via command line in the terminal, you can visit the official website of 1Panel: https://1panel.cn/docs/installation/online_installation/ Choose the system of your server, copy the command line for installation. During the installation process, you will be prompted to set the account password and port information, etc.
3. Local Access Test
Enter the account password displayed in the prompt box before installation in the login box to log in.
On the homepage, we can see the CPU, memory, host load, disk, and network conditions, as well as website-related information and server data monitoring information.
Clicking on the app store also shows various mainstream website building tools, including Halo and WordPress. Users can install these website building software in the 1Panel app store with one click to quickly build personal blogs or corporate websites. When managing websites, domain settings, website directories, HTTPS, pseudo-static, anti-leech, redirection, password protection, and traffic limiting can all be implemented in 1Panel.
In the container menu, you can manage Docker containers just like in Portainer, and it supports Chinese, which indeed provides a better experience.
Clicking on the host allows you to quickly achieve file management with a visual interface without using the command line, enabling common operations like copying, moving, renaming, and deleting, thus simplifying management processes and providing a fast and efficient experience.
4. Install Internal Network Penetration Tool
At this point, we have successfully deployed the 1Panel panel in the local CasaOS Orange Pi host, but it can only be used within the local area network, which has certain limitations. If you want to remotely access the 1Panel panel at home while on a business trip to check the server status or manage containers, what should you do?
It’s simple, just install a cpolar internal network penetration tool on the Orange Pi to easily achieve remote access to the services deployed on the internal network host. Next, I will introduce how to install the cpolar internal network penetration.
First, click the upper left corner to enter the terminal:
Enter the root account password to log in: (If you don’t know how to obtain the password, you can refer to the flashing tutorial mentioned above)
Then execute the command below in the terminal to install the cpolar internal network penetration tool:
curl -fsSL https://get.cpolar.sh | sudo sh
After installation, you can execute the command below to check the service status:
systemctl status cpolar
The following image shows that the cpolar internal network penetration service is running normally.
5. Configure Public Address
Then we use the CasaOS Orange Pi IP address plus 9200 to open a new browser to log into the cpolar management interface:
PS: The Orange Pi’s IP address can be viewed in the router, named orangepizero3.
If you do not have an account, you can click to register for free to access the cpolar official website: https://www.cpolar.com
After entering the account password to log into the cpolar web UI management interface, click on the tunnel management in the left dashboard——create a tunnel:
Tunnel Name: Can be customized, be careful not to duplicate with existing tunnel names, in this example, it is: casa1pan
Protocol: http
Local Address: 10086
Domain Type: Random Domain
Region: Select China VIP
Click Create
After the tunnel is created successfully, click on the status on the left——online tunnel list, to view the generated public access address. There are two access methods, one is http and https, either one can be chosen, and append the default entry suffix displayed in the 1Panel login prompt:/entrance to access in the browser. After logging in, only the public address generated by cpolar will be displayed in the address bar.
After logging in with the account password used earlier, we can successfully access the web management interface of the 1Panel panel deployed in the local CasaOS Orange Pi Zero3 from devices such as mobile phones and tablets!
If you want to change the account password for the login panel, you can do so in the panel settings:
Summary
For convenience in demonstration, the public address generated by cpolar in the above operations is randomly generated. The advantage of this random address is that it is quick to establish and can be used immediately. However, its disadvantage is that the URL is randomly generated and hard to remember, and this address will change randomly within 24 hours, making it more suitable for temporary testing use.
If there is a need for long-term remote access to the 1Panel panel in the local CasaOS Orange Pi or other local services, and you do not want to reconfigure the public address every day, and want the address to be nice and easy to remember, I recommend choosing to configure a fixed public address for remote access.
6. Configure Fixed Public Address
Log in to the cpolar official website, click on the reservation on the left, select to retain a secondary subdomain, choose the region as China VIP, set a secondary subdomain name, and click retain. After successful retention, copy the retained secondary subdomain name, here I fill in my1pan
, you can also customize your favorite name.
After successful retention, copy the name of the successfully retained secondary subdomain:my1pan
, return to the cpolar web UI management interface, click on the tunnel management in the left dashboard——tunnel list, find the tunnel you want to configure casa1pan
, click on the edit on the right:
Modify the tunnel information to configure the successfully retained secondary subdomain into the tunnel
-
Domain Type: Select Secondary Subdomain
-
Sub Domain: Fill in the successfully retained secondary subdomain: my1pan
-
Region: Select China VIP
Click Update
(Note, click update once is enough, no need to submit repeatedly)
After the update is completed, open the online tunnel list, and you can see that the public address has changed from a random address name to two fixed secondary subdomains (fixed public address):
Finally, we use any fixed public address + default entry (in this example it is https://my1pan.vip.cpolar.cn/entrance)
to access in the browser, you can see that the access is successful, thus a fixed and permanent public address is set up, allowing remote access to the local area network of the CasaOS Orange Pi host 1Panel panel anytime and anywhere!
The above is the complete process of how to deploy the 1Panel panel on the CasaOS light NAS system Orange Pi Zero3, and install the cpolar internal network penetration tool to configure a fixed and unchanging secondary subdomain public address, achieving remote management of the server or container anytime and anywhere. Thank you for watching, and feel free to leave comments for communication.
If you need to reprint, please indicate the source!