Documentationالتوثيق

Everything from an empty machine to a URL you can send to a client. كل شيء من جهاز فارغ إلى رابط ترسله لعميلك.

What linko isما هو linko

linko is a command-line tool that gives a locally running service a public HTTPS address on a domain you own. You type one command; anyone in the world can then open your work in a browser. ‏linko أداة سطر أوامر تمنح خدمة تعمل على جهازك عنوانًا عامًا بـ HTTPS على دومين تملكه أنت. تكتب أمرًا واحدًا، فيستطيع أي شخص في العالم فتح عملك في متصفحه.

$ npm run dev          # your app is on :3000
$ linko 3000           # in another terminal

✓ Tunnel connected
  Public URL  https://x92ka.example.com

It does this by driving Cloudflare Tunnel for you. What you would otherwise do by hand — create a DNS record, configure a reverse proxy, obtain a certificate, open a port on your router — linko does through the Cloudflare API in about two seconds, and undoes just as cleanly. يفعل ذلك بقيادة Cloudflare Tunnel نيابةً عنك. ما كنت ستفعله يدويًا — إنشاء سجل DNS، وإعداد reverse proxy، والحصول على شهادة، وفتح منفذ في الراوتر — يقوم به linko عبر واجهة Cloudflare في ثانيتين تقريبًا، ويتراجع عنه بنفس النظافة.

What it is notما ليس هو

Running a home server with no public IP? عندك خادم منزلي بلا IP عام؟ That is the case this was built for. A machine behind CGNAT or a dynamic address cannot accept an inbound connection at all — but linko never needs one. cloudflared dials out from your side, so your Raspberry Pi, old laptop or NAS gets a real HTTPS URL on your own domain without touching the router, and every project on that machine joins the same tunnel. هذه هي الحالة التي بُني لها. الجهاز خلف CGNAT أو عنوان متغيّر لا يستطيع قبول أي اتصال وارد أصلًا — وlinko لا يحتاج واحدًا. يتصل cloudflared من جهتك إلى الخارج، فيحصل الـ Raspberry Pi أو اللابتوب القديم أو الـ NAS على رابط HTTPS حقيقي على دومينك دون لمس الراوتر، وكل مشروع على ذلك الجهاز ينضم إلى النفق نفسه.

Requirementsالمتطلبات

Requiredمطلوب؟ Notesملاحظات
Cloudflare accountحساب Cloudflare✅ Free plan is enough — sign up الخطة المجانية تكفي — أنشئ حسابًا
A domain you ownدومين تملكه✅ Bought anywhere — Namecheap, GoDaddy, anywhere من أي مكان اشتريته
Its DNS managed by Cloudflare إدارة DNS عند Cloudflare✅ Free, and you keep your registrar — how مجاني، وتبقى مسجّلًا عند بائعك — الطريقة
curl + tar✅ Present on every modern desktop install موجودان في أي تثبيت مكتبي حديث
cloudflared❌ Downloaded automatically on first use يُنزَّل تلقائيًا عند أول استخدام
Go❌ Only if you build from source فقط إن أردت البناء من المصدر
Node, Python, DockerNode أو Python أو Docker❌ Not used at allغير مستخدمة إطلاقًا
Owning a domain is not enoughامتلاك الدومين وحده لا يكفي Its nameservers must point at Cloudflare, because linko creates DNS records through the Cloudflare API. This is free and takes about ten minutes, most of it waiting. يجب أن تشير nameservers الخاصة به إلى Cloudflare، لأن linko يُنشئ سجلات DNS عبر واجهة Cloudflare. العملية مجانية وتستغرق عشر دقائق معظمها انتظار.

Moving DNS to Cloudflareنقل DNS إلى Cloudflare

You are not transferring ownership. The domain stays registered where you bought it, you keep paying the same registrar, and you can undo this at any time. Only the nameservers change. أنت لا تنقل ملكية الدومين. يبقى مسجّلًا حيث اشتريته، وتستمر بالدفع لنفس الجهة، ويمكنك التراجع في أي وقت. الذي يتغيّر هو nameservers فقط.

  1. Create a free accountأنشئ حسابًا مجانيًا dash.cloudflare.com/sign-up
  2. Add your domainأضف دومينك Add a site → type example.com → choose the Free plan. اضغط Add a site ← اكتب example.com ← اختر خطة Free.
  3. Let it scan your recordsدع Cloudflare تفحص سجلاتك Cloudflare copies your existing DNS automatically. Compare the list against your current provider — especially MX records if you use email on that domain, or your mail will stop. ستنسخ سجلاتك الحالية تلقائيًا. قارن القائمة بمزوّدك الحالي — خصوصًا سجلات MX إن كان لديك بريد على هذا الدومين، وإلا توقّف بريدك.
  4. Copy the two nameserversانسخ الـ nameservers
    dana.ns.cloudflare.com
    rick.ns.cloudflare.com
  5. Paste them at your registrarضعهما عند بائع الدومين Find Nameservers / DNS settings / Custom DNS, remove what is there, and put Cloudflare's two in. ابحث عن Nameservers أو DNS settings أو Custom DNS، واحذف الموجود وضع اللذين نسختهما.
    Namecheap · GoDaddy · Google / Squarespace · Hostinger
  6. Wait for "Active"انتظر حتى تصبح Active Usually under an hour, occasionally up to 24. Verify it yourself: عادة أقل من ساعة، وقد تصل إلى ٢٤. للتحقق بنفسك:
    dig NS example.com +short   # → *.ns.cloudflare.com
No domain yet?ليس لديك دومين أصلًا؟ Cloudflare sells them at cost with DNS already set up — nothing to move. ‏Cloudflare تبيع الدومينات بسعر التكلفة مع إدارة DNS جاهزة — فلا تحتاج لنقل أي شيء.

Installالتثبيت

macOS, Linux, and Windows via Git Bash ‏macOS ولينكس وويندوز عبر Git Bash

curl -fsSL https://raw.githubusercontent.com/Devehab/linko/main/install.sh | bash

The script detects your platform, downloads the matching binary, and places it in a directory that is already on your PATH. If it has to fall back to ~/.local/bin, it adds that line to your shell profile for you. يكتشف السكربت نظامك، وينزّل الملف المناسب، ويضعه في مجلد موجود في مسارك أصلًا. وإن اضطر لاستخدام ~/.local/bin فسيضيف السطر إلى ملف الشِل بنفسه.

linko --version
Verified weekly on twelve clean systems مُتحقَّق منه أسبوعيًا على اثني عشر نظامًا نظيفًا ubuntu · macOS · Windows Git Bash · debian 11 and 12 · ubuntu 22.04 and 24.04 · alpine · fedora · rocky 9 · arch · openSUSE leap — each with nothing preinstalled. ‏ubuntu وmacOS وويندوز عبر Git Bash، وdebian 11 و12، وubuntu 22.04 و24.04، وalpine وfedora وrocky 9 وarch وopenSUSE leap — كلها بلا أي شيء مثبّت مسبقًا.

Other waysطرق أخرى

# with Go 1.23+
go install github.com/Devehab/linko@latest

# Go not installed?
brew install go                 # macOS
sudo apt install golang-go      # Debian / Ubuntu
sudo dnf install golang         # Fedora

# pin a version or a directory
LINKO_VERSION=v0.3.0 LINKO_INSTALL="$HOME/bin" \
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/Devehab/linko/main/install.sh)"

Windows without Git Bash: download the .zip from the releases page and put linko.exe on your PATH. PowerShell and CMD cannot run a curl … | bash line. ويندوز بلا Git Bash: نزّل ملف .zip من صفحة الإصدارات وضع linko.exe في مجلد ضمن PATH. ‏PowerShell وCMD لا يشغّلان سطر curl … | bash.

The Cloudflare API tokenتوكن Cloudflare

One token, both permissions.توكن واحد، صلاحيتان معًا. Not one token for DNS and another for the tunnel — a single token carrying both rows. And both must be Edit, not Read. ليس توكنًا للـ DNS وآخر للنفق — بل توكن واحد يحمل السطرين. وكلتاهما Edit لا Read.
  1. Open the tokens pageافتح صفحة الرموز dash.cloudflare.com/profile/api-tokens → Create Token → Create Custom Token
  2. Add both permission rowsأضف السطرين في Permissions Press + Add more for the second row. اضغط + Add more لإضافة السطر الثاني.
    #123
    1ZoneDNSEdit
    2AccountCloudflare TunnelEdit
  3. Scope the resourcesحدّد الموارد Account Resources → your account.
    Zone Resources → Include → Specific zone → your domain.
    Account Resources ← اختر حسابك.
    Zone Resources ← Include → Specific zone → دومينك.
    Leaving Zone Resources empty produces a token that authenticates successfully but sees no domains at all — you will get no zone named …. This is the single most common setup mistake. ترك Zone Resources فارغًا ينتج توكنًا يتصل بنجاح لكنه لا يرى أي دومين — وستحصل على no zone named …. هذا أشيع خطأ في الإعداد كله.
  4. Copy the tokenانسخ الرمز It is shown exactly once.يُعرض مرة واحدة فقط.

Forgot the steps later? linko docs prints them in your terminal. نسيت الخطوات لاحقًا؟ اكتب linko docs فتظهر في طرفيتك.

First-time setupالإعداد الأول

linko init

Paste the token, then pick a domain by number. linko lists the domains your token can actually see, so there is nothing to type and nothing to misspell. الصق التوكن، ثم اختر دومينك برقم. يعرض لك linko الدومينات التي يراها توكنك فعلًا، فلا شيء تكتبه ولا شيء تخطئ في كتابته.

Cloudflare credentials
Cloudflare API token: ················
✓ Cloudflare connected

Domain
Which domain should linko use?
  1. example.com
  2. another.dev
  3. staging.io  (pending)
Choose: 1
✓ URLs will look like https://abc12.example.com

Tunnel
Tunnel name: [example-linko-tunnel]
✓ Tunnel created
✓ Configuration saved to ~/.linko/config.json
✓ cloudflared installed

You're ready.
There is no second question about a base لا سؤال ثانٍ عن الأساس The domain you pick is the base. That is what keeps every URL one label deep, which is all a free Cloudflare certificate covers — see the one-level rule. --base still exists for anyone with Advanced Certificate Manager who wants the extra depth. الدومين الذي تختاره هو الأساس. وهذا ما يبقي كل رابط على عمق مستوى واحد، وهو كل ما تغطيه شهادة Cloudflare المجانية — انظر قاعدة المستوى الواحد. ويبقى --base لمن يملك Advanced Certificate Manager ويريد عمقًا أكبر.

Non-interactive, for CI or a fresh machine بلا تفاعل — لـ CI أو جهاز جديد

export LINKO_API_TOKEN='cfut_…'
linko init --yes --domain example.com

A port keeps its URLالمنفذ يحتفظ برابطه

The behaviour that makes linko pleasant to live with. السلوك الذي يجعل استخدام linko مريحًا يومًا بعد يوم.

linko 3000     # first run  → https://x92ka.example.com
# Ctrl+C
linko 3000     # next run   → https://x92ka.example.com  (the same one)

A link you already shared keeps working across restarts, and your DNS does not fill up with dead records. When you do want to change it: الرابط الذي أرسلته يبقى يعمل بعد كل إعادة تشغيل، ولا تتراكم سجلات DNS ميتة في حسابك. وحين تريد التغيير فعلًا:

Commandالأمر What happensماذا يحدث
linko 3000 --new Mint a fresh random URL and retire the old one رابط عشوائي جديد، ويحذف القديم
linko 3000 --name crm Choose the name yourself → crm.example.com اسم تختاره أنت ← crm.example.com
linko 3000 --temp Throwaway: the URL and its DNS record are deleted when you quit مؤقت: يُحذف الرابط وسجل الـ DNS عند الإيقاف

Command referenceمرجع الأوامر

linko <port> · linko start

Flagالخيار Effectالأثر
-n, --name Subdomain to use (default: reuse this port's URL) الاسم المطلوب (الافتراضي: رابط هذا المنفذ الحالي)
-r, --new Mint a new random subdomain, retiring the current one رابط عشوائي جديد بدل الحالي
--temp Delete the hostname when the tunnel stops يُحذف الاسم عند إيقاف النفق
-d, --detach Run in the background, return to the prompt يعمل بالخلفية ويرجعك للسطر
-o, --open Open the browser once the URL actually answers يفتح المتصفح حين يصبح الرابط جاهزًا فعلًا
--replace Replace the hostname if it points somewhere else استبدال الاسم إن كان يشير لمكان آخر
-v, --verbose Stream cloudflared logsعرض سجلات cloudflared
--loglevel debug · info · warn · error · fatal

Accepted targetsصيغ المنفذ المقبولة

You typeما تكتبه It meansما يعنيه
linko 3000http://localhost:3000
linko :3000http://localhost:3000
linko 127.0.0.1:8080 a specific addressعنوان محدد
linko https://localhost:8443 an origin that speaks HTTPSأصل يعمل بـ HTTPS
linko tcp://localhost:22 a raw TCP serviceخدمة TCP خام

linko init

--tokenCloudflare API token (or LINKO_API_TOKEN) توكن Cloudflare (أو LINKO_API_TOKEN)
--domainSkip the picker and use this domain تخطَّ القائمة واستخدم هذا الدومين
--basePublish under a deeper subdomain — needs a paid certificate انشر تحت subdomain أعمق — يحتاج شهادة مدفوعة
--tunnelTunnel nameاسم النفق
--forceOverwrite an existing configuration إعادة الإعداد فوق إعداد موجود
-y, --yesFail instead of prompting يفشل بدل أن يسأل

Everything elseبقية الأوامر

linko listWhat you have published (--remote reads Cloudflare) ما نشرته (--remote يقرأ من Cloudflare)
linko statusTunnel health, live edge connections, routes حالة النفق والاتصالات الحيّة والمسارات
linko psBackground tunnels that are running الأنفاق العاملة بالخلفية
linko stop <name>Stop one, or --all إيقاف واحد أو --all
linko remove <name>Delete route + DNS record + local entry حذف المسار وسجل DNS والسطر المحلي
linko doctorEight checks; --fix repairs ثمانية فحوص؛ و--fix يصلح
linko domainChange the domain you publish to — see below تغيير الدومين الذي تنشر عليه — بالأسفل
linko tokenReplace the API token — see below استبدال توكن الـ API — بالأسفل
linko uninstallRemove linko and its Cloudflare traces إزالة linko وآثاره من Cloudflare
linko docsThis guide in the terminal (--open) هذا الدليل في الطرفية (--open)

Changing things laterالتغيير لاحقًا

Nothing you chose during setup is permanent, and none of it needs a config file edit. لا شيء اخترته في الإعداد دائم، ولا شيء منه يحتاج تعديل ملف إعداد يدويًا.

linko domain

Switch to another of your domains, from the same numbered list. انتقل إلى دومين آخر من دوميناتك، من نفس القائمة المرقّمة.

$ linko domain

Currently publishing to example.com

Which domain should linko publish to?
  1. example.com  (current)
  2. another.dev
Choose: 2

! You have 2 URLs on example.com:
    https://web.example.com -> http://localhost:3000
    https://api.example.com -> http://localhost:8080

Delete them before switching? [Y/n] y
✓ Removed web.example.com
✓ Removed api.example.com

✓ Now publishing to another.dev
linko domain another.dev Switch straight to one, no menu الانتقال مباشرة بلا قائمة
--list Show the domains this token can see, then exit اعرض الدومينات التي يراها التوكن ثم اخرج
-y, --yes Switch without askingبدّل بلا أسئلة

If the new domain lives in a different Cloudflare account, linko sets up a tunnel there for you. وإن كان الدومين الجديد في حساب Cloudflare آخر، يهيّئ linko نفقًا هناك.

linko token

Replace the stored API token after a rotation, an expiry, or a permission fix. استبدل التوكن المحفوظ بعد تدويره أو انتهائه أو تصحيح صلاحياته.

$ linko token

New Cloudflare API token: ················
✓ Token updated and saved to ~/.linko/config.json

✓ Can reach example.com
✓ Can reach the tunnel example-linko-tunnel

All good.
Checked before it is savedيُفحص قبل حفظه Cloudflare verifies the new token first, so a typo cannot lock you out of your own configuration. linko then re-checks that it can still reach your domain and your tunnel — a replacement token often has different permissions, and it is better to hear that now than at the next linko 3000. يتحقق Cloudflare من التوكن الجديد أولًا، فلا يمكن لخطأ مطبعي أن يقفل عليك إعدادك. ثم يعيد linko التأكد من وصوله إلى دومينك ونفقك — فالتوكن البديل غالبًا بصلاحيات مختلفة، وسماع ذلك الآن أفضل من سماعه عند أول linko 3000.

linko uninstall

Remove linko from the machine, and its traces from Cloudflare, in order: يزيل linko من الجهاز، وآثاره من Cloudflare، بهذا الترتيب:

  1. stop tunnels running in the background يوقف الأنفاق العاملة بالخلفية
  2. remove the services that start them at login يزيل الخدمات التي تشغّلها عند تسجيل الدخول
  3. delete your published URLs and their DNS records يحذف روابطك المنشورة وسجلات DNS الخاصة بها
  4. delete the tunnel from your Cloudflare account يحذف النفق من حساب Cloudflare
  5. delete ~/.linko — config, logs, the cloudflared copy يحذف ~/.linko — الإعداد والسجلات ونسخة cloudflared
  6. delete the linko binary itself يحذف ملف linko التنفيذي نفسه
-y, --yes Do not ask for confirmationبلا سؤال تأكيد
--keep-cloud Leave the URLs, DNS records and tunnel on Cloudflare اترك الروابط وسجلات DNS والنفق على Cloudflare
--keep-binary Leave the binary in placeاترك الملف التنفيذي مكانه

Your Cloudflare account, your domain and your API token are never touched — revoke the token yourself at the tokens page if you no longer want it. حسابك في Cloudflare ودومينك وتوكنك لا يُمسّون — ألغِ التوكن بنفسك من صفحة التوكنات إن لم تعد تريده.

Background and bootالخلفية والإقلاع

Close the terminal and the tunnel keeps running: أغلق الطرفية ويبقى النفق شغالًا:

linko 3000 -d      # detach, return to the prompt
linko ps           # what is running
linko stop web     # stop one
linko stop --all   # stop everything

Logs land in ~/.linko/logs/<name>.log. To survive a reboot: السجلات في ~/.linko/logs/<name>.log. وللبقاء بعد إعادة التشغيل:

linko service install 3000 --name crm
linko service list
linko service uninstall crm

A launchd agent on macOS, a systemd user unit on Linux, both restarting automatically if the tunnel ever stops. وكيل launchd على macOS، ووحدة systemd --user على لينكس، وكلاهما يعيد التشغيل تلقائيًا إن توقف النفق.

Cookbookوصفات عملية

Show a client your work in progressتُري عميلًا عملك الحالي

linko 3000 --name preview --open

Two services at once, one tunnelخدمتان معًا في نفق واحد

linko 3000 -n web   # terminal 1
linko 8080 -n api   # terminal 2

A webhook endpoint you leave running all week نقطة webhooks تعمل طوال الأسبوع

linko 4000 -n hooks -d

A staging box that survives reboots بيئة تجريبية تصمد بعد إعادة التشغيل

linko service install 8080 --name staging

A one-off link that cleans up after itself رابط لمرة واحدة ينظّف نفسه

linko 5173 --temp

Your app binds the loopback only تطبيقك يستمع على الـ loopback فقط

linko 127.0.0.1:3000

Rotate a URL you shared too widely تدوير رابط انتشر أكثر مما ينبغي

linko 3000 --new

The one-level ruleقاعدة المستوى الواحد

Cloudflare's free Universal SSL covers exactly two names: شهادة Cloudflare المجانية تغطي اسمين اثنين بالضبط:

example.com        ← the apex
*.example.com      ← one level

A wildcard in a certificate does not cross a dot: و* في الشهادات لا تعبر النقطة:

URLWorks?يعمل؟
demo.example.com✅ *.example.com
demo.app.example.com ❌ two levels — nothing covers it مستويان — لا شيء يغطيه
The hardest failure to diagnose in the whole system أصعب عطل في النظام كله DNS is correct, the tunnel is connected, and linko doctor is entirely green — yet the browser refuses with ERR_SSL_VERSION_OR_CIPHER_MISMATCH, because the rejection happens before any request reaches your tunnel. linko init warns you up front. الـ DNS صحيح، والنفق متصل، وlinko doctor أخضر بالكامل — ومع ذلك يرفض المتصفح بـ ERR_SSL_VERSION_OR_CIPHER_MISMATCH، لأن الرفض يحدث قبل وصول أي طلب إلى نفقك. لهذا يحذّرك linko init مسبقًا.
Simplest free answerأبسط حل مجاني Put the distinction in the name itself: myapp-dev.example.com rather than myapp.dev.example.com. Two levels require Cloudflare Advanced Certificate Manager ($10/month per zone) plus Total TLS. اجعل التمييز في الاسم نفسه: myapp-dev.example.com بدل myapp.dev.example.com. المستويان يحتاجان Advanced Certificate Manager (‏١٠ دولارات شهريًا للدومين) مع تفعيل Total TLS.

When things change behind your back حين يتغيّر شيء من خلفك

Tokens expire. People delete tunnels from the dashboard. DNS records get removed by hand. linko notices all three, says so in plain terms, and repairs them. التوكنات تنتهي صلاحيتها، والأنفاق تُحذف من اللوحة، وسجلات DNS تُمسح يدويًا. يكتشف linko الثلاثة، ويقول لك ما حدث بوضوح، ثم يصلحه.

The token stopped workingالتوكن توقّف عن العمل

$ linko 3000

✗ Cloudflare is no longer accepting the stored API token.
· It was most likely deleted, edited, or it expired.

  Create a Cloudflare API token
  1. https://dash.cloudflare.com/profile/api-tokens
  2. Add both permission rows (+ Add more):
       Zone     →  DNS               →  Edit
       Account  →  Cloudflare Tunnel →  Edit

New Cloudflare API token: ················
✓ Token updated and saved to ~/.linko/config.json
✓ Tunnel connected

The new token is verified against Cloudflare before it is saved, so a typo cannot lock you out of your own configuration. يتحقق من التوكن الجديد قبل حفظه، فلا يمكن لخطأ مطبعي أن يقفل عليك إعدادك.

The tunnel was deletedالنفق حُذف

linko recreates it — or adopts one of the same name — fetches a fresh tunnel token, re-points every DNS record at the new tunnel (a new tunnel is a new CNAME target), and restores every route. يعيد linko إنشاءه — أو يتبنّى واحدًا بنفس الاسم — ويجلب توكنًا جديدًا، ويعيد توجيه كل سجلات DNS إلى النفق الجديد (لأن النفق الجديد يعني هدف CNAME جديدًا)، ويستعيد كل المسارات.

Everything at onceكل شيء دفعة واحدة

linko doctor --fix

Repairs a dead token, a deleted tunnel, missing DNS records and missing routes, then re-runs the full check. Add --yes to skip the confirmations. يصلح التوكن الميت والنفق المحذوف وسجلات DNS والمسارات الناقصة، ثم يعيد الفحص كاملًا. أضف --yes لتخطّي التأكيدات.

Files and variablesالملفات والمتغيرات

~/.linko/
├── config.json      credentials and routes  (mode 0600)
├── bin/cloudflared  private copy, downloaded on first use
├── run/<name>.pid   one per background tunnel
└── logs/<name>.log  one per background tunnel
Variableالمتغير Effectالأثر
LINKO_API_TOKEN Overrides the stored Cloudflare token يتجاوز التوكن المحفوظ
LINKO_HOME Configuration directory (default ~/.linko) مجلد الإعدادات (الافتراضي ~/.linko)
NO_COLOR Disable coloured outputتعطيل الألوان

Troubleshootingحل المشاكل

Every message below is a real error this project hit, with its actual cause. كل رسالة أدناه خطأ حقيقي واجهه هذا المشروع، وهذا سببها الفعلي.

Error: no zone named "example.com" on this account
Cause: the token is missing the Zone permission, or its Zone Resources are empty.
Fix: add Zone → DNS → Edit and include your domain. linko lists the zones the token can see, so you know immediately.
السبب: التوكن ينقصه صلاحية Zone، أو أن Zone Resources فارغة.
الحل: أضف Zone → DNS → Edit مع تضمين دومينك. يعرض linko النطاقات التي يراها التوكن فتعرف فورًا أين الخلل.
✗ Cloudflare refused to create the DNS record. Authentication error (code 10000)
Cause: the DNS permission is Read, not Edit. Finding the zone needs only read access, so setup passes completely and the first write fails.
Fix: switch that dropdown to Edit.
السبب: صلاحية DNS على Read بدل Edit. العثور على الـ zone يحتاج قراءة فقط، لذلك يمر الإعداد كاملًا ثم يفشل عند أول كتابة.
الحل: غيّر القائمة المنسدلة إلى Edit.
✗ Could not create the tunnel Authentication error (code 10000)
Cause: the token covers DNS but not tunnels.
Fix: add Account → Cloudflare Tunnel → Edit to the same token.
السبب: التوكن يغطي DNS ولا يغطي الأنفاق.
الحل: أضف Account → Cloudflare Tunnel → Edit على نفس التوكن.
This site can't provide a secure connection ERR_SSL_VERSION_OR_CIPHER_MISMATCH
Cause: the hostname is two levels deep.
Fix: linko init --force and pick the domain itself, or buy ACM.
السبب: الرابط بعمق مستويين.
الحل: linko init --force واختر الدومين نفسه، أو اشترِ ACM.
HTTP 502 · Error 1033
Cause: the tunnel is up but nothing is listening on the port.
Fix: check curl http://localhost:3000. If your app binds the loopback only, use linko 127.0.0.1:3000.
السبب: النفق يعمل لكن لا شيء يستمع على المنفذ.
الحل: تحقق بـ curl http://localhost:3000. وإن كان تطبيقك يستمع على الـ loopback فقط، استخدم linko 127.0.0.1:3000.
zsh: command not found: linko
Cause: the install directory is not on your PATH.
Fix: reopen the terminal, or run exec $SHELL. The installer adds the line for you.
السبب: مجلد التثبيت ليس في مسارك.
الحل: أعد فتح الطرفية أو نفّذ exec $SHELL. المثبّت يضيف السطر تلقائيًا.

When in doubtعند الشك

linko doctor

Eight checks in order, from cloudflared being present to live edge connections. It tells you exactly where things stop, and exits non-zero so it works inside scripts. ثمانية فحوص بالترتيب، من وجود cloudflared إلى الاتصالات الحيّة. يقول لك أين توقّف بالضبط، ويخرج برمز غير صفري فيصلح داخل السكربتات.

Start completely freshبداية نظيفة تمامًا

linko remove --all --yes
rm -rf ~/.linko
linko init

To remove the tool itself — background tunnels, login services, URLs, tunnel and binary — use linko uninstall. ولإزالة الأداة نفسها — الأنفاق والخدمات والروابط والنفق والملف التنفيذي — استخدم linko uninstall.

Securityالأمان