File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change 88</ button >
99< button id =buttonColorMode class ="btn btn-link mx-auto nav-link p-0 ms-lg-2 me-lg-1 " type =button aria-label ="Toggle theme "> < svg data-bs-theme-value ="dark " class ="icon icon-tabler icon-tabler-moon " width ="24 " height ="24 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentcolor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "/> < path d ="M12 3c.132.0.263.0.393.0a7.5 7.5.0 007.92 12.446A9 9 0 1112 2.992z "/> </ svg > < svg data-bs-theme-value ="light " class ="icon icon-tabler icon-tabler-sun " width ="24 " height ="24 " viewBox ="0 0 24 24 " stroke-width ="2 " stroke ="currentcolor " fill ="none " stroke-linecap ="round " stroke-linejoin ="round "> < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "/> < path d ="M12 12m-4 0a4 4 0 108 0 4 4 0 10-8 0m-5 0h1m8-9v1m8 8h1m-9 8v1M5.6 5.6l.7.7m12.1-.7-.7.7m0 11.4.7.7m-12.1-.7-.7.7 "/> </ svg > </ button > < ul id =socialMenu class ="nav mx-auto flex-row order-lg-4 "> < li class =nav-item > < a class ="nav-link social-link " href =https://github.com/devlikeapro/waha > < svg width ="20 " height ="20 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentcolor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round " class ="feather feather-github "> < path d ="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22 "/> </ svg > < small class ="ms-2 visually-hidden "> GitHub</ small > </ a > </ li > </ ul > < a class ="btn btn-primary rounded-pill mt-2 btn-block d-lg-none " href =/docs/overview/introduction/ role =button > Get Started</ a > </ div > </ div > < a class ="btn btn-primary rounded-pill ms-3 me-2 px-4 order-lg-3 d-none d-lg-block " href =/docs/overview/introduction/ role =button > Get Started</ a > </ div > </ header > </ div > < div class ="wrap container-lg " role =document > < div class =content > < div class ="row flex-xl-nowrap "> < div class ="col-lg-5 col-xl-4 docs-sidebar d-none d-lg-block "> < nav class ="section-nav docs-links "> < ul class =list-unstyled > < li > < details > < summary > 📄 Overview</ summary > < ul class ="list-unstyled list-nested "> < li > < a href =/docs/overview/introduction/ > 📖 Introduction</ a > </ li > < li > < a href =/docs/overview/quick-start/ > ⚡ Quick Start</ a > </ li > < li > < a href =/docs/overview/%EF%B8%8F-how-to-avoid-blocking/ > ⚠️ How to Avoid Blocking</ a > </ li > < li > < a href =/docs/overview/faq/ > ❓ FAQ</ a > </ li > < li > < a href =/docs/overview/changelog/ > 🆕 Changelog</ a > </ li > </ ul > </ details > </ li > < li > < details open > < summary > 🔍 How-to guides</ summary > < ul class ="list-unstyled list-nested "> < li > < a href =/docs/how-to/install/ > 🔧 Install & Update</ a > </ li > < li > < a href =/docs/how-to/dashboard/ > 📊 Dashboard</ a > </ li > < li > < a href =/docs/how-to/swagger/ > 📚 Swagger (OpenAPI)</ a > </ li > < li > < a href =/docs/how-to/sessions/ > 🖥️ Sessions</ a > </ li > < li > < a href =/docs/how-to/send-messages/ > 📤 Send messages</ a > </ li > < li > < a href =/docs/how-to/receive-messages/ > 📥 Receive messages</ a > </ li > < li > < a href =/docs/how-to/events/ > 🔄 Events</ a > </ li > < li > < a href =/docs/how-to/profile/ > 🆔 Profile</ a > </ li > < li > < a href =/docs/how-to/proxy/ > 🌐 Proxy</ a > </ li > < li > < a href =/docs/how-to/polls/ > 📶 Polls</ a > </ li > < li > < a href =/docs/how-to/chats/ > 💬 Chats</ a > </ li > < li > < a href =/docs/how-to/contacts/ > 👤 Contacts</ a > </ li > < li > < a href =/docs/how-to/channels/ > 📢 Channels</ a > </ li > < li > < a href =/docs/how-to/status/ > 🟢 Status</ a > </ li > < li > < a href =/docs/how-to/groups/ > 👥 Groups</ a > </ li > < li > < a href =/docs/how-to/presence/ > ✅ Presence</ a > </ li > < li > < a href =/docs/how-to/labels/ > 🏷️ Labels</ a > </ li > < li > < a href =/docs/how-to/event-message/ > 📅 Event Message</ a > </ li > < li > < a href =/docs/how-to/calls/ > 📞 Calls</ a > </ li > < li > < a href =/docs/how-to/engines/ > 🏭 Engines</ a > </ li > < li > < a href =/docs/how-to/config/ > ⚙️ Configuration</ a > </ li > < li > < a href =/docs/how-to/observability/ > 🔍 Observability</ a > </ li > < li class =active > < a aria-current =page href =/docs/how-to/security/ > 🔒 Security</ a > </ li > < li > < a href =/docs/how-to/storages/ > 🗄️ Storages</ a > </ li > < li > < a href =/docs/how-to/waha-plus/ > ➕ WAHA Plus</ a > </ li > </ ul > </ details > </ li > < li > < details > < summary > 🧩 Apps</ summary > < ul class ="list-unstyled list-nested "> < li > < a href =/docs/apps/about/ > Apps</ a > </ li > < li > < a href =/docs/apps/chatwoot/ > Chatwoot</ a > </ li > </ ul > </ details > </ li > < li > < details > < summary > 🏭 Engines</ summary > < ul class ="list-unstyled list-nested "> < li > < a href =/docs/engines/webjs/ > WEBJS</ a > </ li > < li > < a href =/docs/engines/gows/ > GOWS</ a > </ li > < li > < a href =/docs/engines/noweb/ > NOWEB</ a > </ li > < li > < a href =/docs/engines/venom/ > VENOM</ a > </ li > </ ul > </ details > </ li > < li > < details > < summary > 🔌 Integrations</ summary > < ul class ="list-unstyled list-nested "> < li > < a href =/docs/integrations/about/ > Integrations</ a > </ li > < li > < a href =/docs/integrations/n8n/ > n8n</ a > </ li > < li > < a href =/docs/integrations/typebot/ > Typebot</ a > </ li > < li > < a href =/docs/integrations/chatwoot/ > ChatWoot</ a > </ li > < li > < a href =/docs/integrations/live-helper-chat/ > Live Helper Chat</ a > </ li > < li > < a href =/docs/integrations/uptime-kuma/ > Uptime Kuma</ a > </ li > < li > < a href =/docs/integrations/csharp/ > WAHA + C#</ a > </ li > < li > < a href =/docs/integrations/go/ > WAHA + Go</ a > </ li > < li > < a href =/docs/integrations/java/ > WAHA + Java</ a > </ li > < li > < a href =/docs/integrations/javascript/ > WAHA + JS/TS</ a > </ li > < li > < a href =/docs/integrations/kotlin/ > WAHA + Kotlin</ a > </ li > < li > < a href =/docs/integrations/php/ > WAHA + PHP</ a > </ li > < li > < a href =/docs/integrations/python/ > WAHA + Python</ a > </ li > </ ul > </ details > </ li > </ ul > </ nav > </ div > < nav class ="docs-toc d-none d-xl-block col-xl-3 " aria-label ="Secondary navigation "> < div class =page-links > < h3 > On this page</ h3 > < nav id =toc > < ul > < li > < a href =#tldr > TLDR</ a > </ li > < li > < a href =#api-security > API security</ a > < ul > < li > < a href =#generate-and-hash-api-key > Generate and Hash Api-Key</ a > </ li > < li > < a href =#set-api-key-hash > Set Api-Key Hash</ a > </ li > < li > < a href =#use-api-key-in-dashboard > Use Api-Key in Dashboard</ a > </ li > < li > < a href =#use-api-key-in-swagger > Use Api-Key in Swagger</ a > </ li > < li > < a href =#use-x-api-key-in-http-request > Use X-Api-Key in HTTP request</ a > </ li > < li > < a href =#exclude-endpoints > Exclude endpoints</ a > </ li > </ ul > </ li > < li > < a href =#swagger-security > Swagger Security</ a > </ li > < li > < a href =#dashboard-security > Dashboard Security</ a > </ li > < li > < a href =#webhook-security > Webhook security</ a > </ li > < li > < a href =#https > HTTPS</ a > </ li > < li > < a href =#faq > FAQ</ a > < ul > < li > < a href =#how-to-disable-security > How To Disable Security?</ a > </ li > </ ul > </ li > </ ul > </ nav > </ div > </ nav > < main class ="docs-content col-lg-11 col-xl-9 mx-xl-auto "> < h1 > 🔒 Security</ h1 > < nav class ="toc-mobile d-xl-none " aria-label ="Quaternary navigation "> < details > < summary > On this page</ summary > < div class =page-links > < nav id =TableOfContents > < ul > < li > < a href =#tldr > TLDR</ a > </ li > < li > < a href =#api-security > API security</ a > < ul > < li > < a href =#generate-and-hash-api-key > Generate and Hash Api-Key</ a > </ li > < li > < a href =#set-api-key-hash > Set Api-Key Hash</ a > </ li > < li > < a href =#use-api-key-in-dashboard > Use Api-Key in Dashboard</ a > </ li > < li > < a href =#use-api-key-in-swagger > Use Api-Key in Swagger</ a > </ li > < li > < a href =#use-x-api-key-in-http-request > Use X-Api-Key in HTTP request</ a > </ li > < li > < a href =#exclude-endpoints > Exclude endpoints</ a > </ li > </ ul > </ li > < li > < a href =#swagger-security > Swagger Security</ a > </ li > < li > < a href =#dashboard-security > Dashboard Security</ a > </ li > < li > < a href =#webhook-security > Webhook security</ a > </ li > < li > < a href =#https > HTTPS</ a > </ li > < li > < a href =#faq > FAQ</ a > < ul > < li > < a href =#how-to-disable-security > How To Disable Security?</ a > </ li > </ ul > </ li > </ ul > </ nav > </ div > </ details > </ nav > < div class ="callout callout-caution d-flex flex-row mt-4 mb-4 pt-4 pe-4 pb-2 ps-3 "> < svg width ="24 " height ="24 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentcolor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round " class ="outline/shield-check svg-inline callout-icon me-2 mb-3 " id ="svg-shield-check " role ="img "> < path stroke ="none " d ="M0 0h24v24H0z " fill ="none "/> < path d ="M11.46 20.846A12 12 0 013.5 6 12 12 0 0012 3a12 12 0 008.5 3 12 12 0 01-.09 7.06 "/> < path d ="M15 19l2 2 4-4 "/> </ svg > < div class =callout-content > < div class =callout-title > < p > Do not expose WhatsApp API on public networks!</ p > </ div > < div class =callout-body > < p > We do not recommend exposing the API on any public networks!</ p > < p > Always protect the API with < a href =#api-security > < strong > Api Key</ strong > </ a > and deny access by using firewalls.</ p > </ div > </ div > </ div > < h2 id =tldr > TLDR< a href =#tldr class =anchor aria-hidden =true > #</ a > </ h2 > < p > Set those or WAHA generates < strong > random secrets</ strong > on startup (check logs):</ p > < div class =expressive-code > < figure class ="frame is-terminal has-title not-content "> < figcaption class =header > < span class =title > Setup Security Environment Variables</ span > </ figcaption > < div class =highlight title ="Setup Security Environment Variables "> < pre tabindex =0 class =chroma > < code class =language-bash data-lang =bash > < span class =line > < span class =cl > < span class =c1 > # Generate random long secrets using</ span >
1010</ span > </ span > < span class =line > < span class =cl > $ uuidgen < span class =p > |</ span > tr -d < span class =s1 > '-'</ span >
11+ </ span > </ span > < span class =line > < span class =cl > > 6c35dcbf31914c65a90f29e2ca1840d2
1112</ span > </ span > < span class =line > < span class =cl >
1213</ span > </ span > < span class =line > < span class =cl > < span class =c1 > # Enable Api Key protection </ span >
1314</ span > </ span > < span class =line > < span class =cl > < span class =c1 > # Send "X-Api-Key" in all HTTP requests</ span >
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments