Setting up a file server doesn't require heavy web panels or complicated apps. The most efficient way is to use Nginx and Aria2 to deploy a download server on storage VPS environment.
In this guide, you will learn a complete setup for your Storage VPS. By combining Nginx's native directory indexing for serving files with Aria2's powerful RPC capabilities for fetching them remotely, you can build a fast and resource-friendly download station that consumes almost no system overhead.
Install Required Packages to Deploy Download Server on Storage VPS
To follow this guide, you need a Storage VPS, which you can check PerLod Hosting plans for reliable plans.
Once you are logged into your server, the first step is to update your system and install the required packages, including Nginx and Aria2:
Nginx will be used to serve files, and Aria2 to download them.
Set up the Download Directory
At this point, you need a dedicated place to store all your downloaded files. You can create a new folder and set the correct permissions so Nginx can publicly serve whatever Aria2 downloads into it. To do this, run the commands below:
Now you must configure Nginx to display a clean directory listing instead of looking for a default web page. You can set Nginx to serve your download folder and enable file indexing, so every completed Aria2 download displays instantly at your server URL.
Create a new Nginx configuration file with your desired text editor:
Bash
sudonano/etc/nginx/sites-available/downloads
Paste the following configuration into the file with your actual VPS IP or domain:
Aria2 needs to run as a background service, RPC mode, so you can send download links to it remotely. You can run Aria2 as the www-data user so Nginx can easily read the downloaded files without any permission errors.
Create the configuration directory and session file with the commands below:
This configuration sets up Aria2 as a remote-controlled service that saves up to 5 simultaneous downloads directly to your Nginx folder, protects access with a secure password, and automatically resumes any interrupted files if your server reboots.
Create a Systemd Service File for Aria2
To ensure Aria2 starts automatically when your VPS boots, you can create a systemd unit file for it. To do this, you can run the command below:
At this point, you can test your setup by opening your web browser and visiting the following URL:
HTML/XML
http://your_server_ip
You must see an empty Index of / page.
Your server is now actively listening on port 6800. You can connect to it using any Aria2 WebUI like AriaNg or a browser extension by entering your server IP, port 6800, and the rpc-secret token you defined in the previous steps.
When a download finishes in Aria2, you will immediately see it on your server's web page.
Conclusion
At this point, you have a download server on Storage VPS by using Nginx as a simple file indexer and Aria2 for fetching files directly into your download folder. If you want an easier workflow, you can manage everything from your browser by connecting an Aria2 WebUI like AriaNg to your server’s RPC endpoint.
We hope you enjoy using this guide. Subscribe to our X and Facebook channels to get the latest updates and articles.
You can connect to your server using any Aria2 web interface, such as AriaNg. Open AriaNg in your browser, go to the RPC settings, enter your server's IP address, set the port to 6800, and paste the rpc-secret password you created.
This happens when Aria2 downloads a file as the root user, but Nginx is trying to read it as the www-data user. By running the Aria2 systemd service under User=www-data, both programs share the same permissions.
Since Aria2 runs as a system service, you can easily use: sudo systemctl restart aria2. And because you enabled the save-session feature in the configuration, your unfinished downloads will safely resume after the restart.
We use cookies to run PerLod and to understand how the site is used. You can accept everything, or open Manage to turn individual categories off. Cookie policy.