πŸš€ Build Your Own Remote Download Server (Torrents, Direct Links, Cloud Sync)

:bullseye: Self-Hosted Download Manager with Web Dashboard & File Browser

:floppy_disk: Turn Any VPS Into a Personal Seedbox with Browser Access

:world_map: One-Line Flow: Your own private download server β€” torrents, direct links, cloud sync β€” all from a browser, anywhere.


Why this matters:

Ever wanted to download massive files to a server instead of your laptop? Queue up torrents while you sleep? Access everything from your phone? This stack gives you a Netflix-style β€œdownload anywhere” setup β€” except YOU own the server, the files, and the zero monthly fees. One afternoon of setup, years of β€œwhy didn’t I do this sooner.”


:wrapped_gift: What You’re Getting

Tool What It Does
Aria2 Pro Downloads everything β€” torrents, magnets, direct links, even multi-part files
AriaNg Pretty web dashboard to manage downloads from anywhere
FileBrowser Browse/share your downloaded files like Google Drive
Portainer Visual Docker manager (no terminal needed after setup)
Rclone Auto-sync downloads to cloud storage (optional)
Nginx + SSL Makes everything secure and accessible via your domain

:clipboard: Before You Start

What You'll Need

Your Server:

  • Ubuntu 20.04/22.04 or Debian 11/12
  • Root access (or sudo)
  • 1GB RAM minimum (2GB+ better)

Your Network:

  • A domain pointed through Cloudflare
  • Ports open: 80, 443, 6800, 6888

:locked_with_key: Step 1: Get Your SSL Certificate (Free, 15-Year)

Cloudflare gives you a free certificate that lasts 15 years. Yes, really.

Cloudflare Certificate Setup
  1. Login to Cloudflare Dashboard
  2. Select your domain
  3. Go to SSL/TLS β†’ Origin Server
  4. Click Create Certificate
  5. Choose β€œGenerate private key and CSR with Cloudflare”
  6. Hostnames: *.yourdomain.com and yourdomain.com
  7. Save both files:
    • Certificate β†’ aria2.pem
    • Private Key β†’ aria2.key

:warning: The private key shows ONCE. Copy it immediately or start over.


:spouting_whale: Step 2: Install Docker

Docker Installation Commands
# Install Docker
curl -fsSL https://get.docker.com | bash

# Enable on boot
systemctl enable --now docker

# Verify it worked
docker compose version
# Should show: Docker Compose version v2.x.x

:open_file_folder: Step 3: Create Your Folder Structure

Directory Setup
# Create all folders
mkdir -p /home/ubuntu/aria2-config/aria2
mkdir -p /home/ubuntu/aria2-config/nginx/conf.d
mkdir -p /home/ubuntu/aria2-config/certs
mkdir -p /home/ubuntu/aria2-config/rclone
mkdir -p /home/ubuntu/aria2-downloads

# Go to working directory
cd /home/ubuntu/aria2-config

What you’ll end up with:

/home/ubuntu/
β”œβ”€β”€ aria2-config/        ← All config files live here
β”‚   β”œβ”€β”€ aria2/
β”‚   β”œβ”€β”€ nginx/conf.d/
β”‚   β”œβ”€β”€ certs/           ← Your SSL files go here
β”‚   └── rclone/
└── aria2-downloads/     ← Your downloaded files

:gear: Step 4: Create Configuration Files

You need 4 files. Copy-paste each one.


πŸ“„ File 1: docker-compose.yml
nano docker-compose.yml

Paste this entire block:

services:

  # Download engine
  aria2-pro:
    container_name: aria2-pro
    image: p3terx/aria2-pro
    environment:
      - PUID=0
      - PGID=0
      - UMASK_SET=022
      - RPC_SECRET=YourSecretToken    # πŸ”΄ CHANGE THIS!
      - RPC_PORT=6800
      - LISTEN_PORT=6888
      - DISK_CACHE=64M
      - IPV6_MODE=false
      - UPDATE_TRACKERS=true
      - CUSTOM_TRACKER_URL=
      - TZ=America/New_York           # πŸ”΄ CHANGE THIS!
    volumes:
      - ./aria2:/config
      - /home/ubuntu/aria2-downloads:/downloads
    ports:
      - "6800:6800"
      - "6888:6888"
      - "6888:6888/udp"
    networks:
      - aria2-net
    restart: always

  # SSL & routing
  nginx-proxy:
    image: nginx:alpine
    container_name: nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:ro
      - ./certs:/etc/nginx/certs:ro
      - /home/ubuntu/aria2-downloads:/usr/share/nginx/html/downloads:rw
    networks:
      - aria2-net
    restart: always

  # File manager
  filebrowser:
    image: filebrowser/filebrowser
    container_name: filebrowser
    environment:
      - FB_BASEURL=/download
    volumes:
      - /home/ubuntu/aria2-downloads:/srv
      - ./filebrowser.db:/database/filebrowser.db
      - ./settings.json:/config/settings.json
    networks:
      - aria2-net
    restart: always

  # Docker manager
  portainer:
    image: portainer/portainer-ce:latest
    container_name: portainer
    command: -H unix:///var/run/docker.sock
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    networks:
      - aria2-net
    restart: always

networks:
  aria2-net:
    driver: bridge

volumes:
  portainer_data:

:red_circle: You MUST change:

  • RPC_SECRET β†’ Your own password (remember this!)
  • TZ β†’ Your timezone

πŸ“„ File 2: settings.json
nano settings.json
{
  "port": 80,
  "baseURL": "/download",
  "address": "",
  "log": "stdout",
  "database": "/database/filebrowser.db",
  "root": "/srv"
}

Then create the empty database:

touch filebrowser.db

πŸ“„ File 3: nginx/conf.d/default.conf
nano nginx/conf.d/default.conf
server {
    listen 80;
    listen 443 ssl;
    server_name yourdomain.com;    # πŸ”΄ CHANGE THIS!

    ssl_certificate /etc/nginx/certs/aria2.pem;
    ssl_certificate_key /etc/nginx/certs/aria2.key;

    # AriaNg dashboard
    location / {
        root /usr/share/nginx/html;
        index index.html;
    }

    # FileBrowser
    location /download/ {
        proxy_pass http://filebrowser:80;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    # Portainer
    location /portainer/ {
        proxy_pass http://portainer:9000/;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    # Aria2 RPC
    location /jsonrpc {
        proxy_pass http://aria2-pro:6800/jsonrpc;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

:red_circle: Change yourdomain.com to your actual domain.


πŸ“„ File 4: rclone/rclone.conf (Optional)

Only needed if you want auto-upload to cloud storage.

Option A: Already have Rclone configured? Copy your existing ~/.config/rclone/rclone.conf contents.

Option B: Generate fresh config on your local machine:

curl https://rclone.org/install.sh | sudo bash
rclone config

Then paste the output into rclone/rclone.conf on your server.


:rocket: Step 5: Deploy Everything

Launch Commands

1. Put your SSL certificates in place:

/home/ubuntu/aria2-config/certs/aria2.pem
/home/ubuntu/aria2-config/certs/aria2.key

2. Launch:

cd /home/ubuntu/aria2-config
docker compose up -d

3. Verify everything’s running:

docker ps --format "table {{.Names}}\t{{.Status}}"

You should see all 4 containers with β€œUp” status.


:white_check_mark: Step 6: Access Your Stack

Service URL
AriaNg Dashboard https://yourdomain.com
FileBrowser https://yourdomain.com/download/
Portainer https://yourdomain.com/portainer/

πŸ”§ Connect AriaNg to Aria2
  1. Open https://yourdomain.com
  2. Go to AriaNg Settings β†’ RPC
  3. Set:
    • Address: wss://yourdomain.com/jsonrpc
    • Secret: Your RPC_SECRET from docker-compose.yml
  4. Click Reload

Green status = you’re in.


πŸ”‘ Default Logins
Service Username Password Action
FileBrowser admin Create 12 Digit Change immediately
Portainer ’ admin ’ Create 12 Digit Create account on first visit

:hammer_and_wrench: Troubleshooting

Port 80/443 Already in Use
# Find what's using the ports
sudo lsof -i :80
sudo lsof -i :443

# Kill common culprits
sudo systemctl stop apache2
sudo systemctl stop nginx
SSL Certificate Errors
# Check files exist
ls -la /home/ubuntu/aria2-config/certs/

# Fix permissions
chmod 644 /home/ubuntu/aria2-config/certs/aria2.pem
chmod 600 /home/ubuntu/aria2-config/certs/aria2.key
RPC Connection Failed
  • βœ“ RPC_SECRET matches in both docker-compose.yml AND AriaNg settings
  • βœ“ Using wss:// (not ws://) since you’re on HTTPS
  • βœ“ Container running: docker ps | grep aria2
Useful Docker Commands
# View logs
docker compose logs -f

# Restart everything
docker compose restart

# Stop everything
docker compose down

# Nuclear option (rebuild)
docker compose up -d --force-recreate

# Check resource usage
docker stats

:books: Resources


Got stuck? Drop your docker compose logs output below β€” way easier to debug with actual errors. :wrench:

5 Likes

How to use it to create my own VPN?

1 Like