80 lines
26 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html class="no-js" lang="en"> <head><meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="Manage WireGuard Peers and Interface using a beautiful and simple web UI." name="description"/><link href="https://wgportal.org/master/documentation/getting-started/docker/" rel="canonical"/><link href="../building/" rel="prev"/><link href="../upgrade/" rel="next"/><link href="../../../assets/images/favicon-large.png" rel="icon"/><meta content="mkdocs-1.6.1, mkdocs-material-9.5.50" name="generator"/><title>Docker Container - WireGuard Portal</title><link href="../../../assets/stylesheets/main.a40c8224.min.css" rel="stylesheet"/><link href="../../../assets/stylesheets/palette.06af60db.min.css" rel="stylesheet"/><link href="../../../stylesheets/extra.css" rel="stylesheet"/><script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script><meta content="website" property="og:type"/><meta content="Docker Container - WireGuard Portal" property="og:title"/><meta content="Manage WireGuard Peers and Interface using a beautiful and simple web UI." property="og:description"/><meta content="https://wgportal.org/master/assets/images/social/documentation/getting-started/docker.png" property="og:image"/><meta content="image/png" property="og:image:type"/><meta content="1200" property="og:image:width"/><meta content="630" property="og:image:height"/><meta content="https://wgportal.org/master/documentation/getting-started/docker/" property="og:url"/><meta content="summary_large_image" name="twitter:card"/><meta content="Docker Container - WireGuard Portal" name="twitter:title"/><meta content="Manage WireGuard Peers and Interface using a beautiful and simple web UI." name="twitter:description"/><meta content="https://wgportal.org/master/assets/images/social/documentation/getting-started/docker.png" name="twitter:image"/></head> <body data-md-color-accent="indigo" data-md-color-primary="white" data-md-color-scheme="default" dir="ltr"> <input autocomplete="off" class="md-toggle" data-md-toggle="drawer" id="__drawer" type="checkbox"/> <input autocomplete="off" class="md-toggle" data-md-toggle="search" id="__search" type="checkbox"/> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a class="md-skip" href="#image-usage"> Skip to content </a> </div> <div data-md-component="announce"> </div> <div data-md-color-scheme="default" data-md-component="outdated" hidden=""> </div> <header class="md-header" data-md-component="header"> <nav aria-label="Header" class="md-header__inner md-grid"> <a aria-label="WireGuard Portal" class="md-header__button md-logo" data-md-component="logo" href="../../.." title="WireGuard Portal"> <img alt="logo" src="../../../assets/images/logo.svg"/> </a> <label class="md-header__button md-icon" for="__drawer"> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"></path></svg> </label> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__topic"> <span class="md-ellipsis"> WireGuard Portal </span> </div> <div class="md-header__topic" data-md-component="header-topic"> <span class="md-ellipsis"> Docker Container </span> </div> </div> </div> <label class="md-header__button md-icon" for="__search"> <svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"></path></svg> </label> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="
<span class="nt">services</span><span class="p">:</span>
<span class="w"> </span><span class="nt">wg-portal</span><span class="p">:</span>
<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">wgportal/wg-portal:latest</span>
<span class="w"> </span><span class="nt">restart</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">unless-stopped</span>
<span class="w"> </span><span class="nt">cap_add</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">NET_ADMIN</span>
<span class="w"> </span><span class="nt">network_mode</span><span class="p">:</span><span class="w"> </span><span class="s">"host"</span>
<span class="w"> </span><span class="nt">ports</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">"8888:8888"</span>
<span class="w"> </span><span class="nt">volumes</span><span class="p">:</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">/etc/wireguard:/etc/wireguard</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./data:/app/data</span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./config:/app/config</span>
</code></pre></div> <p>By default, the webserver is listening on port <strong>8888</strong>.</p> <p>Volumes for <code>/app/data</code> and <code>/app/config</code> should be used ensure data persistence across container restarts.</p> <h2 id="image-versioning">Image Versioning</h2> <p>All images are hosted on Docker Hub at <a href="https://hub.docker.com/r/wgportal/wg-portal">https://hub.docker.com/r/wgportal/wg-portal</a>. There are three types of tags in the repository:</p> <h4 id="semantic-versioned-tags">Semantic versioned tags</h4> <p>For example, <code>1.0.19</code>.</p> <p>These are official releases of WireGuard Portal. They correspond to the GitHub tags that we make, and you can see the release notes for them here: <a href="https://github.com/h44z/wg-portal/releases">https://github.com/h44z/wg-portal/releases</a>.</p> <p>Once these tags show up in this repository, they will never change.</p> <p>For production deployments of WireGuard Portal, we strongly recommend using one of these tags, e.g. <strong>wgportal/wg-portal:1.0.19</strong>, instead of the latest or canary tags.</p> <p>If you only want to stay at the same major or major+minor version, use either <code>v[MAJOR]</code> or <code>[MAJOR].[MINOR]</code> tags. For example <code>v1</code> or <code>1.0</code>.</p> <p>Version <strong>1</strong> is currently <strong>stable</strong>, version <strong>2</strong> is in <strong>development</strong>.</p> <h4 id="latest">latest</h4> <p>This is the most recent build to master! It changes a lot and is very unstable.</p> <p>We recommend that you don't use it except for development purposes.</p> <h4 id="branch-tags">Branch tags</h4> <p>For each commit in the master and the stable branch, a corresponding Docker image is build. These images use the <code>master</code> or <code>stable</code> tags.</p> <h2 id="configuration">Configuration</h2> <p>You can configure WireGuard Portal using a yaml configuration file. The filepath of the yaml configuration file defaults to <code>/app/config/config.yml</code>. It is possible to override the configuration filepath using the environment variable <strong>WG_PORTAL_CONFIG</strong>.</p> <p>By default, WireGuard Portal uses a SQLite database. The database is stored in <code>/app/data/sqlite.db</code>.</p> <p>You should mount those directories as a volume: - /app/data - /app/config</p> <p>A detailed description of the configuration options can be found <a href="../../configuration/overview/">here</a>.</p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> </main> <!-- Application footer --> <footer class="md-footer"> <!-- Further information --> <div class="md-footer-meta md-typeset" style="background-color: #fff;"> <div class="md-footer-meta__inner md-grid" style="background-color: #fff;"> <!-- Copyright and theme information --> <div class="md-footer-copyright"> <div class="md-footer-copyright__highlight" style="color: rgb(38, 38, 38);"> Copyright © 2023-2025 WireGuard Portal Project </div> <div style="color: rgb(38, 38, 38);"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" rel="noopener" style="color: black;" target="_blank"> Material for MkDocs </a> </div> </div> <!-- Social links --> <div class="md-social"> <a class="md-social__link" href="https://github.com/h44z/wg-portal" rel="noopener" target="_blank" title="github.com"> <svg viewbox="0 0 480 512" xmlns="http://www.w3.org/2000/svg"><!-- Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1M480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27
window.update_swagger_ui_iframe_height = function (id) {
var iFrameID = document.getElementById(id);
if (iFrameID) {
full_height = (iFrameID.contentWindow.document.body.scrollHeight + 80) + "px";
iFrameID.height = full_height;
iFrameID.style.height = full_height;
}
}
let iframe_id_list = []
var iframes = document.getElementsByClassName("swagger-ui-iframe");
for (var i = 0; i < iframes.length; i++) {
iframe_id_list.push(iframes[i].getAttribute("id"))
}
let ticking = true;
document.addEventListener('scroll', function(e) {
if (!ticking) {
window.requestAnimationFrame(()=> {
let half_vh = window.innerHeight/2;
for(var i = 0; i < iframe_id_list.length; i++) {
let element = document.getElementById(iframe_id_list[i])
if(element==null){
return
}
let diff = element.getBoundingClientRect().top
if(element.contentWindow.update_top_val){
element.contentWindow.update_top_val(half_vh - diff)
}
}
ticking = false;
});
ticking = true;
}
});
const dark_scheme_name = "slate"
window.scheme = document.body.getAttribute("data-md-color-scheme")
const options = {
attributeFilter: ['data-md-color-scheme'],
};
function color_scheme_callback(mutations) {
for (let mutation of mutations) {
if (mutation.attributeName === "data-md-color-scheme") {
scheme = document.body.getAttribute("data-md-color-scheme")
var iframe_list = document.getElementsByClassName("swagger-ui-iframe")
for(var i = 0; i < iframe_list.length; i++) {
var ele = iframe_list.item(i);
if (ele) {
if (scheme === dark_scheme_name) {
ele.contentWindow.enable_dark_mode();
} else {
ele.contentWindow.disable_dark_mode();
}
}
}
}
}
}
observer = new MutationObserver(color_scheme_callback);
observer.observe(document.body, options);
})</script></body> </html>