---
title: "التثبيت على Debian وUbuntu | Wantastic Docs"
description: "ثبّت wantasticd على Debian وUbuntu وMint وProxmox في دقيقتين: أمر واحد، وامسح رمز QR، وانقر Claim Device."
url: "https://wantastic.app/ar/docs/install-debian-ubuntu"
category: "Install wantasticd"
reading_time: "3 دقائق"
---

# التثبيت على Debian وUbuntu

ثبّت wantasticd على Debian وUbuntu وMint وProxmox في دقيقتين: أمر واحد، وامسح رمز QR، وانقر Claim Device.

> **Outcome:** يعمل wantasticd كخدمة على جهاز Debian/Ubuntu، ويبدأ عند الإقلاع، ويحدّث نفسه، ويظهر الجهاز بحالة Online في وحدة التحكم.

## Before you start

- Debian 10+ أو Ubuntu 18.04+ (وكذلك Linux Mint وPop!_OS ومضيفات Proxmox VE). لجهاز Raspberry Pi، استخدم دليل Raspberry Pi.
- مستخدم لديه صلاحيات sudo.
- اتصال بالإنترنت من الجهاز.
- هاتف أو متصفح لتسجيل الدخول إلى وحدة تحكم Wantastic.

## التثبيت السريع (دقيقتان)

أمر واحد يثبّت wantasticd ويعرض رمز QR. تطالب بالجهاز من هاتفك. لا حاجة إلى رمز.

1. انسخ الأمر أدناه والصقه في طرفية على الجهاز. اكتب كلمة مرورك إذا طلبها sudo.
2. يطبع الجهاز Claim URL ورمز QR. امسح رمز QR بهاتفك، أو افتح Claim URL في متصفح.
3. سجّل الدخول إلى وحدة تحكم Wantastic. تُفتح نافذة Claim Wantastic Device والمفتاح معبأ مسبقًا. انقر Claim Device.
4. تطبع الطرفية "Device claimed". اضغط Ctrl+C، ثم شغّل أمر إعادة التشغيل أدناه.
5. افتح Devices في وحدة التحكم. يظهر الجهاز بحالة Online.

التثبيت والمطالبة بالجهاز:

```bash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
```

بعد "Device claimed": اضغط Ctrl+C، ثم أعد تشغيل الخدمة:

```bash
sudo systemctl restart wantasticd
```

*التثبيت والمطالبة بالجهاز: يطبع genkey رابط Claim URL ورمز QR، ثم ينتظر. بعد أن تنقر Claim Device في وحدة التحكم، يطبع "Device claimed". اضغط بعدها Ctrl+C وأعد تشغيل الخدمة.*

```
$ $ curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
…
Skipping login. Run 'wantasticd login' to authenticate.
…
Generated device claim key: /etc/wantastic/device-claim-key.json
Public key: Vd3hK1oQ7mR2sT9uW4xY6zA8bC0dE2fG4hJ6kL8mN0P=
Server URL: https://console.wantastic.app
Claim URL: https://console.wantastic.app/#desktop?claim_public_key=Vd3hK1oQ…%3D&wantastic_server=https%3A%2F%2Fconsole.wantastic.app

█▀▀▀▀▀█ ▄▀▄ ▀█▄ █▀▀▀▀▀█
█ ███ █ ▀█▄▀▄█ █ ███ █
█ ▀▀▀ █ ▄▀█ ▀▄ █ ▀▀▀ █
▀▀▀▀▀▀▀ ▀ ▀ █ ▀ ▀▀▀▀▀▀▀
▀█▄▀▄▀▀█▀▄█▀▄▀▀▄█▀▄▀█▄
█▀▀▀▀▀█ █▄▀▄▀█ ▀▄█ ▄▀
▀▀▀▀▀▀▀ ▀▀ ▀▀▀ ▀▀▀ ▀▀▀

2026/10/29 09:14:03 Waiting for claim. Press Ctrl+C to stop.
2026/10/29 09:15:12 Device claimed. Configuration saved to /etc/wantastic/config.conf
^C
$ $ sudo systemctl restart wantasticd
```

*Console: Claim Wantastic Device. يملأ Claim URL ورمز QR المفتاح نيابةً عنك. كل ما عليك هو النقر على Claim Device.*

1. Claim public key معبأ مسبقًا
2. اترك Wantastic server كما هو
3. انقر Claim Device

> **Tip:** لا يوجد هاتف في متناولك؟ انسخ Claim URL من الطرفية وافتحه على أي حاسوب.

> **Operational note:** قبل ظهور رمز QR، قد يطبع المثبّت "Skipping login" أو خطأً في الخدمة. هذا طبيعي على جهاز جديد. تعمل الخدمة بعد المطالبة وإعادة التشغيل.

## تحقق من أنه يعمل

1. شغّل wantasticd status. يعرض Status: Connected وعنوان VPN IP.
2. افتح Devices في وحدة التحكم. يظهر الجهاز بحالة Online.

التحقق:

```bash
wantasticd status
```

*wantasticd status: تعني Status: Connected ووجود VPN IP أن النفق يعمل.*

```
$ $ wantasticd status
Status:        Connected
Version:       v1.0.54+377f3c0
Mode:          TUN (wantastic0)
VPN IPs:       10.200.0.14/32
Public key:    q7ZkV3m1yH0dTn8pXo2bLwR4sE6uJ9cA1fG5hK8iN0M=
Server:        wg.wantastic.app:51820
Exit node:     false
Local access:  false
Auto update:   true
Traffic:       ↓ 18.4 KiB  ↑ 9.2 KiB
Peers:         2 (direct 1, relay 1)
Uptime:        4m12s
```

*Console: نافذة Devices: يظهر الجهاز الجديد باسمه ويتحول إلى Online خلال ثوانٍ.*

1. البحث بالاسم
2. الحالة Online
3. يطابق Overlay IP ما يعرضه wantasticd status
4. يستمر Last seen في التحديث

## إدارة الخدمة

wantasticd خدمة systemd عادية. تبدأ عند الإقلاع وتعيد تشغيل نفسها بعد التعطل.

systemctl وjournalctl:

```bash
sudo systemctl status wantasticd     # is it running?
sudo systemctl restart wantasticd    # restart
sudo systemctl stop wantasticd       # stop the tunnel
sudo journalctl -u wantasticd -f     # live logs
```

## طرق أخرى للتثبيت

تحتاج إلى هذا للأتمتة أو الحالات الخاصة فقط. التثبيت السريع أعلاه هو الطريقة الأسهل.

### باستخدام رمز (أجهزة كثيرة)

استخدم رمزًا عندما تثبّت أجهزة كثيرة بسكربت، أو عندما لا يستطيع أحد مسح رمز QR. أنشئ الرمز مرة واحدة في وحدة التحكم: Account → Secrets → + New Secret → Generate. ضعه مكان <TOKEN>.

التثبيت بالرمز:

```bash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh -s -- --token <TOKEN>
```

> تعامل مع الرمز ككلمة مرور. يستطيع أي شخص يملكه إضافة أجهزة إلى حسابك حتى تنتهي صلاحيته.

### سكربت وحدة التحكم

في وحدة التحكم، افتح Show Config لأي جهاز → تبويب UNIX وانقر Copy. الصق السكربت في طرفية الجهاز. يحتوي السكربت على رمز مسبقًا.

### التثبيت اليدوي

للمعالجات غير المعتادة أو الأجهزة غير المتصلة بالإنترنت أو ملفات الخدمة الخاصة بك، اتبع دليل التثبيت اليدوي من الأرشيف.

*Console: Account → Secrets → + New Secret. قيمة السر هي الرمز.*

1. افتح تبويب Secrets
2. انقر + New Secret
3. امنحه اسمًا
4. انقر Generate
5. انسخ السر الجديد

## معلومات مفيدة على Debian/Ubuntu

- لا حاجة إلى أي منفذ وارد. يحتاج الجهاز إلى TCP 443 الصادر وUDP 51820 الصادر.
- يحدّث wantasticd نفسه كل ساعة. لا يتدخل فيه مدير الحزم.
- قد يسجّل Ubuntu الرسالة "DNS: tunnel DNS not written (…)". هذه معلومة فقط. النفق يعمل.
- Proxmox VE: ثبّته على المضيف للوصول إلى المضيف. أما للجهاز الافتراضي أو حاوية LXC، فثبّته داخل الضيف.
- WSL2: يُفضَّل تثبيت وكيل Windows بدلًا من ذلك.

## Verify the result

- يعرض wantasticd status القيمة Status: Connected مع VPN IP.
- يظهر الجهاز بحالة Online في نافذة Devices بوحدة التحكم.
- بعد sudo reboot، يعود الجهاز إلى Online تلقائيًا.

## Common issues

### يفشل أمر السطر الواحد فورًا بخطأ في الصلاحيات.

```
Error: /usr/local/bin is not writable, but / is already read-write. Run this installer as root.
```

- **Where:** install.sh
- **Likely cause:** sudo مفقود. يحتاج المثبّت إلى صلاحيات root.
- **Fix:** استخدم الأمر أدناه كما هو تمامًا. يوضع sudo قبل sh، وليس قبل curl.

الأمر الصحيح:

```bash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
```

### يتوقف أمر السطر الواحد فورًا.

```
curl: command not found
```

- **Where:** الصدفة
- **Likely cause:** تأتي الصور المصغّرة بدون curl.
- **Fix:** ثبّت curl باستخدام apt، ثم شغّل التثبيت السريع مرة أخرى.

تثبيت curl (apt):

```bash
sudo apt update && sudo apt install -y curl ca-certificates
```

### لا تبدأ الخدمة، أو تعيد التشغيل مرارًا.

```
Failed to load configuration: validate config: private key required
```

- **Where:** journalctl -u wantasticd
- **Likely cause:** wantasticd مثبّت لكن لم تتم المطالبة بالجهاز بعد، لذا ملف إعداداته فارغ.
- **Fix:** طالب بالجهاز، ثم أعد تشغيل الخدمة.

المطالبة وإعادة التشغيل:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** يعرض wantasticd status القيمة Status: Connected.

### يطبع المثبّت خطأ systemd في النهاية.

```
Error: systemd service did not start
```

- **Where:** install.sh
- **Likely cause:** لم تتم المطالبة بالجهاز بعد، لذا لا تجد الخدمة ما تبدأ به. هذا متوقع على جهاز جديد.
- **Fix:** طالب بالجهاز، ثم أعد تشغيل الخدمة.

المطالبة وإعادة التشغيل:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** يطبع systemctl is-active wantasticd القيمة active.

### تعرض وحدة التحكم الجهاز على أنه مُطالَب به، لكن الخدمة لا تزال لا تتصل.

- **Where:** wantasticd genkey
- **Likely cause:** شُغّل genkey بدون sudo، فحفظ الإعدادات في مجلد المنزل (~/.config/wantastic)، والخدمة لا تقرأ هذا المجلد.
- **Fix:** شغّل genkey مرة أخرى باستخدام sudo وطالب بالمفتاح الجديد. ثم احذف إدخال الجهاز القديم غير المستخدم في Devices.

المطالبة بصلاحيات root:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

### نقرت Claim Device، لكن الطرفية لا تطبع "Device claimed" أبدًا.

```
Claim polling not ready: claim config rejected (401): invalid signature or timestamp out of window
```

- **Where:** wantasticd genkey
- **Likely cause:** ساعة الجهاز غير صحيحة. لا تنجح المطالبة إلا إذا كانت الساعة ضمن 30 ثانية من الوقت الفعلي.
- **Fix:** اضبط الساعة. يظل genkey في الانتظار ويُكمل من تلقاء نفسه.

فعّل وقت الشبكة:

```bash
sudo timedatectl set-ntp true
date
```

### تظهر واجهة ثانية (wantastic1)، أو يُظهر السجل تعارضًا في المنفذ.

```
Port 51820 in use, using random port
```

- **Where:** سجل الخدمة
- **Likely cause:** لا يزال genkey يعمل في الطرفية بينما تعمل الخدمة أيضًا. تتنافس الآن نسختان.
- **Fix:** اضغط Ctrl+C في طرفية genkey، ثم أعد تشغيل الخدمة.

إعادة التشغيل:

```bash
sudo systemctl restart wantasticd
```

### يطبع wantasticd status القيمة Offline.

```
Status: Offline — daemon not running (start: sudo systemctl start wantasticd (OpenWrt: /etc/init.d/wantasticd start))
```

- **Where:** wantasticd status
- **Likely cause:** الخدمة الخلفية متوقفة أو متعطلة أو لا تزال تبدأ. أمر الحالة لا يشغّلها.
- **Fix:** شغّل الخدمة.

تشغيل الخدمة:

```bash
sudo systemctl start wantasticd
```

### تعرض الحالة Running (tunnel down)، أو يعرض peers القيمة HANDSHAKE never لـ (server).

```
Device health check failed: …
```

- **Where:** سجل الخدمة
- **Likely cause:** تحظر الشبكة منفذ UDP الصادر 51820 إلى المحور (wg.wantastic.app)، أو أن DNS لا يعمل.
- **Fix:** اسمح بحركة UDP 51820 الصادرة في جدار الحماية، ثم أعد تشغيل الخدمة.

اختبار DNS وإعادة التشغيل:

```bash
nslookup wg.wantastic.app
sudo systemctl restart wantasticd
```

- **Verify:** يعرض wantasticd peers مصافحة حديثة (مثل "8s ago") لـ (server).

### تبدأ الخدمة وتتوقف فورًا.

```
Failed to start agent: create device: create tun: CreateTUN("wantastic0") failed; /dev/net/tun does not exist
```

- **Where:** سجل الخدمة
- **Likely cause:** تعريف TUN في النواة غير محمّل.
- **Fix:** حمّل تعريف TUN، ثم أعد تشغيل الخدمة.

تحميل TUN:

```bash
sudo modprobe tun
sudo systemctl restart wantasticd
```

- **Verify:** يُظهر ls -l /dev/net/tun الجهاز.

### تريد نقل الجهاز إلى حساب آخر، أو البدء من جديد بمطالبة جديدة.

```
Config already exists at /etc/wantastic/config.conf — skipping login.
```

- **Where:** install.sh
- **Likely cause:** يحتفظ الجهاز بإعداداته حتى عند إعادة تشغيل المثبّت. يجب أن تزيل الإعدادات القديمة أولًا.
- **Fix:** انقل الإعدادات القديمة جانبًا، ثم طالب بالجهاز مجددًا بمفتاح جديد.

البدء من جديد:

```bash
sudo mv "/etc/wantastic/config.conf" "/etc/wantastic/config.conf.bak"
sudo wantasticd genkey --force
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** يظهر الجهاز في الحساب الجديد ويعرض wantasticd status القيمة Connected.

### يفشل التثبيت بالرمز مباشرةً بعد التنزيل.

```
Login failed: registration rejected (401): invalid or expired login token
```

- **Where:** install.sh / wantasticd login
- **Likely cause:** الرمز خاطئ، أو منتهي الصلاحية، أو مستنفد (بلغ Max Uses)، أو محذوف.
- **Fix:** تخطَّ الرمز. وطالب بالجهاز بدلًا من ذلك.

المطالبة بدلًا من ذلك:

```bash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
```

- **Verify:** يظهر الجهاز في Devices بحالة Online.

### تُرفض المطالبة أو تسجيل الدخول.

```
Login failed: account has reached its device limit — upgrade your plan or remove an existing device
```

- **Where:** wantasticd login / وحدة التحكم
- **Likely cause:** اكتمل عدد الأجهزة في خطتك. تعرض وحدة التحكم "You have reached the maximum number of devices for your plan."
- **Fix:** احذف جهازًا غير مستخدم في Devices (الصف → Delete) أو رقِّ خطتك. ثم طالب بالجهاز مجددًا.

### يفشل التثبيت في خطوة الخدمة داخل حاوية LXC أو Docker.

```
System has not been booted with systemd as init system (PID 1). Can't operate.
```

- **Where:** install.sh (systemctl)
- **Likely cause:** تحتوي الحاوية على systemctl، لكن systemd لا يعمل.
- **Fix:** ثبّته على المضيف بدلًا من ذلك، أو اتبع دليل Docker.

## Continue with

- [Choose your install method](https://wantastic.app/ar/docs/install-overview): Find your device in one table and copy one command. Most devices install in 2 minutes: install, scan a QR code, click Claim Device.
- [wantasticd CLI reference and operations](https://wantastic.app/ar/docs/wantasticd): The most used wantasticd commands first, then every command and flag, environment variables, config and state paths per OS, log lines, local access, exit node, and the claim flow (genkey / --wait-claim).
- [Update, roll back and uninstall](https://wantastic.app/ar/docs/update-and-uninstall): Update or uninstall wantasticd with one line per OS. Also: how auto-update works, turning it off, rolling back to the previous binary, and purging all data.
- [Installer errors (install.sh and install.ps1)](https://wantastic.app/ar/docs/errors-installer): Every message the Wantastic installers print when they stop, what it means and the easiest fix.
- [Login, token and claim errors](https://wantastic.app/ar/docs/errors-login-claim): Fix claim problems (genkey, QR code, Claim Device), "Login failed: …" messages and token errors.
- [Connect and runtime errors](https://wantastic.app/ar/docs/errors-connect-runtime): Fix service start failures, config errors, TUN problems, missing handshakes and DNS warnings.
- [Enrollment secrets](https://wantastic.app/ar/docs/enrollment-secrets): Tokens for automation, Windows and mass rollouts: create, limit and delete them.
- [WebSSH sessions](https://wantastic.app/ar/docs/webssh): Open an SSH terminal in the browser through the tunnel. Port 22 stays closed to the internet.
