# 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/tr/help/remote-control.html) (from any phone or computer on your network), the browser extension pointed at it, or its command line.

> **Yeni:** sunucu modu bu sürümde yenidir. Lütfen [nasıl gittiğini bize bildirin](https://github.com/mikailhossenimran/voltdownloadmanager/issues).

## Docker ile

0.6.0 sürümünden itibaren, yayımlanmış imajı GitHub Container Registry'den çekin (şimdilik yalnızca x86-64 için):

```
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>
```

(Görüntüyü kendiniz oluşturduysanız `ghcr.io/mikailhossenimran/voltdownloadmanager:<version>` yerine `voltdownloadmanager` kullanın.)

- `/config`listeyi, ayarları, sertifikayı ve eşleştirilmiş cihazları tutar.
- `/downloads`dosyaların indiği yerdir: her kategorinin içinde kendi klasörü vardır (`Music`, `Video`, `Torrents`…). Doğrudan üzerine indirmek için oraya bir ağ paylaşımı bağlayın.
- `--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 Compose ile aynı şeyi yapar.

## Telefonunuzu eşleştirin

`docker logs vdm`açılacak adresi ve hiçbir cihaz eşleştirilmemişken, bir QR kodu ile eşleştirme kodunu gösterir:

```
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/tr/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.

## Unraid'de

[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`.

## Docker olmadan

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

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

| Bayrak | Veya değişken | Ne ayarlar |
|---|---|---|
| `--data <folder>` | `VDM_DATA_DIR` | liste, ayarlar, sertifika ve eşleştirilmiş cihazlar |
| `--downloads <folder>` | `VDM_DOWNLOADS` | indirmelerin gittiği yer (her kategorinin içindeki klasör) |
| `--port <number>` | `VDM_REMOTE_PORT` | uzaktan kumandanın portu (8463) |
| `--listen <address>` | `VDM_REMOTE_LISTEN` | dinlediği yer: verilmediyse her yerel ağ adresi |
| `--hosts <names>` | `VDM_REMOTE_HOSTS` | sayfanın açılabileceği adresleri dışındaki adlar |
|  | `VDM_REMOTE_URL` | eşleştirme koduyla gösterilen, açtığınız sayfanın adresi |

Bu modda uzaktan kumanda açıktır (`VDM_REMOTE=off` onu kapatır). Sistem durdurduğunda (`docker stop`, systemd, Ctrl+C) listesini kaydederek temiz bir şekilde durur. Windows ve macOS'ta da aynı şekilde çalışır.

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`.

## İndirmeleri tarayıcınızdan gönderin

Tarayıcı uzantısının menüsünde, **İndirmeleri şuraya gönder** altında:

- 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).
- Uzantı eşleştirilmiş sunucuları hatırlar: yeniden eşleştirmeye gerek kalmadan tek bir tıklamayla herhangi bir eşleştirilmiş sunucu ile **Bu bilgisayar** arasında geçiş yapın. Geri geçiş yapmak tarayıcıyı eşleştirilmiş durumda bırakır; bir sunucunun yanındaki **×** işaretine tıklayarak her iki tarafta da eşleştirmeyi kaldırın ve unutun.
- 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.

## Bir sunucunun yapmadıkları

- Video sayfaları (yt-dlp) ve resim galerileri, görüntünün içermediği yardımcılarına ihtiyaç duyar.
- Hiçbir şey bir pencere açmaz: bir soru soracak bir indirme (bir kopya, zaten orada olan dosyalar) ayarlarda belirlenen seçeneği alır veya eklenmez.
- Bağlantı noktasını internette yayınlamayın; bunun yerine bir VPN aracılığıyla ev ağınıza ulaşın.

## İlgili

- [İndirme ekleme](https://vdm.mikaillab.com/tr/help/adding-downloads.html)
- [Bağlantı yakalayıcı ve arşivler](https://vdm.mikaillab.com/tr/help/link-grabber.html)
- [Tarayıcı entegrasyonu](https://vdm.mikaillab.com/tr/help/browser-integration.html)
- [Control VDM from your phone](https://vdm.mikaillab.com/tr/help/remote-control.html)

[Bu sayfayı GitHub'da düzenle](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/server.md) [Bu sayfayla ilgili bir sorun bildir](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) [Sayfa geçmişi](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/server.md)

Ücretsiz, açık kaynak, reklamsız, deneme sürümü yok.

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