# Run VDM on a server

Run Volt Download Manager on a home server or a NAS (Docker, Unraid, any Linux machine) without a window, and send it downloads from your phone or your browser: the server downloads them into its own folders, such as a network share.

It is the same VDM as on a desktop: its list, categories, queues, Scheduler, speed limits and torrents. You control it with the [remote control's page](https://vdm.mikaillab.com/bn/help/remote-control.html) (from any phone or computer on your network), the browser extension pointed at it, or its command line.

> **নতুন:** সার্ভার মোড এই সংস্করণে নতুন। অনুগ্রহ করে [আমাদের জানান এটি কেমন চলছে](https://github.com/mikailhossenimran/voltdownloadmanager/issues)।

## ডকার দিয়ে

সংস্করণ 0.6.0 থেকে, GitHub কন্টেইনার রেজিস্ট্রি থেকে প্রকাশিত ইমেজটি পুল করুন (আপাতত শুধু x86-64-এর জন্য):

```
docker pull ghcr.io/mikailhossenimran/voltdownloadmanager:<version>
# or the latest release:
docker pull ghcr.io/mikailhossenimran/voltdownloadmanager:latest
```

Or build the image yourself from VDM's source:

```
git clone https://github.com/mikailhossenimran/voltdownloadmanager
cd voltdownloadmanager
docker build -t voltdownloadmanager .
```

The first build is long (up to an hour on a small server: the whole program is optimised as one). The image is small, about 175 MB: Debian's slim base, VDM's two programs and the certificates downloads are checked against. It needs no desktop libraries: VDM loads those only to open a window, which a server never does.

Then run it, with a folder for its settings and one for the downloads. Make both folders first, as the user VDM will run as: a folder Docker makes for you belongs to `root`, and VDM can't use it.

```
mkdir -p /srv/vdm-config /srv/downloads
docker run -d --name vdm --restart unless-stopped \
  -p 8463:8463 \
  -v /srv/vdm-config:/config \
  -v /srv/downloads:/downloads \
  --user "$(id -u):$(id -g)" \
  ghcr.io/mikailhossenimran/voltdownloadmanager:<version>
```

(যদি আপনি নিজেই ইমেজটি তৈরি করে থাকেন, তাহলে `ghcr.io/mikailhossenimran/voltdownloadmanager:<version>`-এর জায়গায় `voltdownloadmanager` ব্যবহার করুন।)

- `/config`তালিকা, সেটিংস, সার্টিফিকেট এবং পেয়ার করা ডিভাইসগুলি রাখে।
- `/downloads`যেখানে ফাইলগুলি ল্যান্ড করে: প্রতিটি বিভাগের নিজস্ব ফোল্ডার ভিতরে থাকে (`Music`, `Video`, `Torrents`…)। সরাসরি এটিতে ডাউনলোড করতে সেখানে একটি নেটওয়ার্ক শেয়ার মাউন্ট করুন।
- `--user`: the user that owns those folders (VDM runs as no particular user).

[docker/compose.yml](https://github.com/mikailhossenimran/voltdownloadmanager/blob/main/docker/compose.yml) ডকার কম্পোজ দিয়ে একই কাজ করে।

## আপনার ফোন জোড়া করুন

`docker logs vdm`খোলার ঠিকানা এবং, কোনো ডিভাইস পেয়ার করা না থাকলে, একটি QR কোড সহ একটি পেয়ারিং কোড দেখায়:

```
The remote control listens at: https://172.17.0.2:8463/
Its certificate's SHA-256 fingerprint: DE:26:7F:…
No device is paired yet. Open the address (or scan this) and enter the code 1037 1606 …
```

Inside a container, the address VDM finds is the container's own: give it the one you open, the **server's** address with the port you published, as `-e VDM_REMOTE_URL=https://192.168.1.10:8463/`, and the log and the QR code show that one. Then pair as [Control VDM from your phone](https://vdm.mikaillab.com/bn/help/remote-control.html#pair-your-phone) says. For another code, at any time:

```
docker exec vdm voltdownloadmanager-cli pair
```

To open the page by the server's name (`https://nas.local:8463/`), give VDM that name: `-e VDM_REMOTE_HOSTS=nas.local` (several: separated by commas). Other names are refused, so that no web page can reach VDM through a name of its own.

## আনরেইড-এ

[docker/unraid.xml](https://github.com/mikailhossenimran/voltdownloadmanager/blob/main/docker/unraid.xml) is a template: copy it to `/boot/config/plugins/dockerMan/templates-user/` on the flash drive, then **Docker → Add Container** and pick **voltdownloadmanager**. It maps `/config` to `appdata`, `/downloads` to a share, the port 8463, and runs as `nobody:users` (99:100), as Unraid's shares expect. The image must be built first (above), on the server or pushed to a registry you use. If the container's log says a folder belongs to another user, give it to `nobody:users` once: `chown -R 99:100 /mnt/user/appdata/voltdownloadmanager`.

## ডকার ছাড়া

On any Linux machine with VDM installed (the `.deb`, `.rpm`, AppImage or `tar.gz`):

```
voltdownloadmanager --headless --data ~/vdm-server --downloads /srv/downloads
```

| ফ্ল্যাগ | অথবা ভেরিয়েবল | এটি কী সেট করে |
|---|---|---|
| `--data <folder>` | `VDM_DATA_DIR` | তালিকা, সেটিংস, সার্টিফিকেট এবং পেয়ার করা ডিভাইস |
| `--downloads <folder>` | `VDM_DOWNLOADS` | যেখানে ডাউনলোডগুলি যায় (প্রতিটি বিভাগের ফোল্ডার ভিতরে) |
| `--port <number>` | `VDM_REMOTE_PORT` | রিমোট কন্ট্রোলের পোর্ট (8463) |
| `--listen <address>` | `VDM_REMOTE_LISTEN` | যেখানে এটি শোনে: দেওয়া না হলে প্রতিটি স্থানীয় নেটওয়ার্ক ঠিকানা |
| `--hosts <names>` | `VDM_REMOTE_HOSTS` | এর ঠিকানাগুলি ছাড়াও যে নামগুলি দ্বারা পৃষ্ঠাটি খোলা যেতে পারে |
|  | `VDM_REMOTE_URL` | আপনি এটি খোলার সময় পৃষ্ঠার ঠিকানা, পেয়ারিং কোড সহ দেখানো হয় |

এই মোডে রিমোট কন্ট্রোল চালু থাকে (`VDM_REMOTE=off` এটি বন্ধ করে)। সিস্টেম এটিকে বন্ধ করলে (`docker stop`, systemd, Ctrl+C) এটি তার তালিকা সংরক্ষণ করে পরিষ্কারভাবে বন্ধ হয়। এটি Windows এবং macOS এও একইভাবে কাজ করে।

The command line talks to it as to a desktop VDM, with the same data folder: `VDM_DATA_DIR=~/vdm-server voltdownloadmanager-cli status` (once `api on`), `pair`, and adding an address: `voltdownloadmanager /d https://example.com/file.zip`.

## আপনার ব্রাউজার থেকে ডাউনলোড পাঠান

ব্রাউজার এক্সটেনশনের মেনুতে, **ডাউনলোডগুলো এখানে পাঠান**-এর নিচে:

- Select **Another Volt Download Manager (a server)**: type the server's address, open it once in that browser to accept its certificate, then enter a pairing code (`pair` above).
- এক্সটেনশনটি পেয়ার করা সার্ভারগুলো মনে রাখে: যেকোনো পেয়ার করা সার্ভার এবং **এই কম্পিউটার**-এর মধ্যে এক ক্লিকেই পরিবর্তন করতে পারবেন, পুনরায় পেয়ার করার প্রয়োজন হবে না। ফিরে গেলে ব্রাউজারটি পেয়ার করা থাকবে; উভয় দিক থেকে আনপেয়ার করতে এবং ভুলে যেতে একটি সার্ভারের পাশে **×** ক্লিক করুন।
- Downloads the extension catches, **Download with Volt Download Manager** on a link, and **Download all links** / **Download selected links**, then go to the server instead of this computer. On the server, links are added and started right away (rather than opened in Link grabber). Only links matching the file types VDM catches (or its default types) are sent, capped at 100 links per batch; links beyond the cap or of other types are left out, and the toolbar button's badge and status notice report how many links were sent, refused, or left out. The browser's cookies are not sent to the server: a download that needs you to be signed in to a site stays with this computer.
- The **Download video** button over videos sends the server the video's page when you click it, and nothing before: whether it shows is up to this computer's VDM (its Options), and when there's no VDM on this computer, it shows on every site.

## একটি সার্ভার যা করে না

- ভিডিও পেজ (yt-dlp) এবং ইমেজ গ্যালারির জন্য তাদের সহায়ক প্রয়োজন, যা ইমেজে অন্তর্ভুক্ত নয়।
- কিছুই একটি উইন্ডো খোলে না: যে ডাউনলোড একটি প্রশ্ন জিজ্ঞাসা করবে (একটি ডুপ্লিকেট, ফাইলগুলি ইতিমধ্যেই আছে) সেটি সেটিংসে সেট করা পছন্দটি গ্রহণ করে, অথবা যোগ করা হয় না।
- ইন্টারনেটে পোর্ট প্রকাশ করবেন না; পরিবর্তে একটি VPN এর মাধ্যমে আপনার হোম নেটওয়ার্কে পৌঁছান।

## সম্পর্কিত

- [ডাউনলোড যোগ করা](https://vdm.mikaillab.com/bn/help/adding-downloads.html)
- [লিঙ্ক গ্র্যাবার এবং আর্কাইভ](https://vdm.mikaillab.com/bn/help/link-grabber.html)
- [ব্রাউজার ইন্টিগ্রেশন](https://vdm.mikaillab.com/bn/help/browser-integration.html)
- [Control VDM from your phone](https://vdm.mikaillab.com/bn/help/remote-control.html)

[GitHub-এ এই পৃষ্ঠাটি সম্পাদনা করুন](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/server.md) [এই পৃষ্ঠা নিয়ে একটি সমস্যা রিপোর্ট করুন](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20Run%20VDM%20on%20a%20server&page=https%3A//vdm.mikaillab.com/help/server.html) [পৃষ্ঠার ইতিহাস](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/server.md)

বিনামূল্যে, ওপেন সোর্স, কোনো বিজ্ঞাপন নেই, কোনো ট্রায়াল নেই।

[Download Volt Download Manager](https://vdm.mikaillab.com/bn/download.html)
