If there is a public IP, Alist can log in from the external network, which means there are more usage scenarios.
In the previous article《Alist丨Look first and then use six types of installation methods to choose from》In the article, six ways to install Alist are mentioned. If your broadband does not have a public IP, then installing Alist in a VPS is a good choice. In this way, you can get an unlimited speed "net disk". You no longer have to endure the speed limit policy of other brands of net disks.
It should be noted that exposing Alist to the public network will lead to the risk of data leakage. I will talk about basic avoidance operations in the fifth part. But the safest way is not to put private data in the network disk where Alist is mounted.
1. VPS Selection
Generally speaking, we just use the public IP of VPS to log in to Alist. If you want to use the hard disk space of VPS, you need to consider two additional factors: hard disk space and data traffic.
For more information on how to choose a vps, see this article:
How to buy a VPS? Three keywords: $10, unlimited traffic, clean IP
I'm using these two myself:
The former has a large hard drive space, while the latter has a low-priced unlimited data package.
There are many vps of this type, and there are special offers from time to time. You can choose according to your needs.
2. How to install
Installing Alist in vps is also very simple, only a few lines of code are needed.
I have installed it in Debian 12 and Ubuntu 20 respectively, and there are no problems.
1. Connect to vps
Tool: finalshell
The reason why I recommend it is that finalshell has a graphical UI, which allows you to directly view all the files of the vps. For example, operations such as changing the default port of alist do not require code, and you can just modify it directly. It is more convenient.
2. Install alist
Code
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install
If you want to upgrade or uninstall Alist, use the following two lines of code:
renew
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update
uninstall
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall
3. Set a password
After the installation is complete, set a password according to the prompts.
First enter the configuration folder:
cd /opt/alist
Manually set the password:
./alist admin set NEW_PASSWORD
Just change [NEW_PASSWORD] to the password you want.
The default user name is admin, which can be modified by logging into the Alist backend.
4. Modify the port
The default port number of Alist is 5244. I suggest you change it. The method is very simple.
Taking finalshell as an example, open the opt/alist/data/config.json file in the file bar at the bottom, and change the 5244 in "http_port":5244 to any four-digit or five-digit number, such as "12345".
Once saved, it will be automatically uploaded.
In the future, if you have similar operations to modify system settings, it is recommended to restart Alist.
systemctl restart alist
3. Basic Settings
Before mounting it on a network disk, you need to do some basic settings for Alist, including: modifying the default login name, confirming to disable the guest user, and changing the site title.
First, we log in to Alist. The URL is: http://vps IP: port number, that is: http://1.1.1.1:12345
1. Modify the default login name
In the profile or user, you can change the default admin to a personalized username
2. Confirm to disable the guest user
In the user list, the guest user is disabled by default. If you need to share files with others, you can enable it. But it is best to set the corresponding permissions.
For example: file paths that can be viewed and access without a password, try not to allow other things.
3. Modify the Alist website title (title)
In "Settings-Site", the website title (title) is Alist by default. It is recommended to change it to a random name. Otherwise, it is easy to be searched.
4. Mount on local hard disk
If you want to utilize the VPS hard disk space, you can create a folder in the VPS root directory to efficiently manage related data.
The specific code is:
Create a mount directory on the server:
mkdir -p /filename
However, I usually don't use such an abstract approach. I can directly connect to the VPS through finalshell, create folders at will, and then fill the folder directory into Alist.
5. Security Risks
At any time, we should be aware of network security and try not to expose personal information on the Internet. This is especially true when using network tools such as Alist. Let's take a look at an operation:
Search on a certain website (everyone who knows knows):
title=”alist” && country=”CN”
The meaning of this syntax is: web pages in China with the title alist have about 130,000 results:
When you open one of the websites, you can clearly see the user's personal photos, and they are the latest ones.
Therefore, friends who want to use Alist should pay attention: After installing Alist, in order to protect your data, you must confirm the following operations:
- Modify the default username admin
- Don’t make your login password too simple
- Disable guest permissions or set limited permissions
- Modify site title
- Change the default port of alist to 5244. Do not use 5678, 443, 80.
- Important files (folders) must be accessed online, so you may consider setting a separate password (set in the meta information)
Of course, the safest thing to do is not to save or back up your personal data on the public network.
Okay, if you find it useful, just follow it.
In the next issue, let’s talk about how to bind a domain name and log in directly to your own alist website.










