Article directory
Preface
1Panel is a modern, open source Linux server operation and maintenance management panel. Efficient management, easily manage Linux servers through the Web, including host monitoring, file management, database management, container management, etc.
Below we introduce how to install 1Panel locally on Linux and combine it with the cpolar intranet penetration tool to achieve remote access to the 1Panel management interface.
1. Install 1Panel on Linux
Execute the following command to install 1Panel with one click:
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh
After successful installation, we can see the following information:
- During the installation, you will be prompted to set the port number for access, which can be defaulted or customized. At the same time, you will be prompted to set the user name and password. This can be customized to facilitate login
- Finally, the installation is successful. We can see the access port, login username and password. Here, according to the default port, it is:
16098
- We can see a security code behind the panel address access URL. Be careful not to miss it when accessing.
2. Install cpolar intranet penetration
Above we installed 1Panel successfully, and saw our local port. Next, we install the cpolar intranet penetration tool in Linux, and forward the http public network address mapped to the local port through cpolar. We can easily access 1Panel remotely without having to use it ourselves. Register a domain name and purchase a cloud server. The following are the steps to install cpolar
cpolar official website address: https://www.cpolar.com
- Use one-click script installation command
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
- Add services to the system
sudo systemctl enable cpolar
- Start cpolar service
sudo systemctl start cpolar
After cpolar is successfully installed, access Linux port 9200 on an external browser: [http://LAN ip:9200], log in with the cpolar account, and you can see the cpolar web configuration interface after logging in, and then configure it on the web interface That’s it
3. Configure 1Panel public network access address
Click Tunnel Management - Create Tunnel on the left dashboard to create a local cpolar tunnel for https!
- Tunnel name: You can customize the name. Be careful not to duplicate the existing tunnel name.
- Protocol: Select http
- Local address: https://127.0.0.1:16098 (local port seen above)
- Domain name type: Choose a random domain name for free
- Region: Select China vip
Click创建
After the tunnel is successfully created, click on the status on the left - online tunnel list to view the generated public network access address. There are two access methods, one is http and https
4. Remote access to 1Panel management interface via public network
Use the above https public network address to access in the browser of any device, pay attention not to miss the security code when accessing, and then you can successfully see our 1Panel management interface, such a public network address and remote access can be created. When accessing from a new address, you may need to log in again.
After logging in, you can see the main management interface
5. Fixed 1Panel public network address
Since the tunnel created using cpolar above uses a random public network address, it will change randomly within 24 hours, which is not conducive to long-term remote access. Therefore, we can configure a second-level subdomain name for it. This address is a fixed address and will not change randomly [ps: cpolar.cn has been filed]
Note that you need to upgrade the cpolar package to a basic package or above, and the bandwidth corresponding to each package is different. [cpolar.cn has been registered]
Log in to the cpolar official website , click Reserve on the left, choose to reserve the second-level subdomain name, set a second-level subdomain name, click Reserve, and copy the reserved second-level subdomain name after the reservation is successful
After the reservation is successful, copy the name of the second-level subdomain name that was successfully reserved.
Go back to log in to the cpolar web UI management interface, click the tunnel management on the left dashboard - tunnel list, find the 1Panel tunnel to be configured, and click edit on the right
Modify the tunnel information and configure the successfully reserved second-level subdomain name into the tunnel.
- Domain name type: Select a second-level subdomain name
- Sub Domain: Fill in the successfully reserved second-level subdomain name
Click 更新
(note, click once to update, no need to submit again)
After the update is complete, open the online tunnel list. At this time, you can see that the public network address has changed, and the address name has also become a fixed second-level subdomain name.
Finally, we use a fixed public network address to access the 1Panel service. Mainly, we also need to add a security code, and then we can see that the access is successful. Such a fixed and permanent public network address is set.
Reprinted from cpolar pole cloud article: Linux deploys 1Panel modern operation and maintenance management panel & remote access