<!doctype html><htmllang=enclass=no-js><head><metacharset=utf-8><metaname=viewportcontent="width=device-width,initial-scale=1"><metaname=descriptioncontent="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><linkhref=https://wgportal.org/master/documentation/upgrade/v1/rel=canonical><linkhref=../../configuration/examples/rel=prev><linkhref=../../monitoring/prometheus/rel=next><linkrel=iconhref=../../../assets/images/favicon-large.png><metaname=generatorcontent="mkdocs-1.6.1, mkdocs-material-9.6.11"><title>Upgrade - WireGuard Portal</title><linkrel=stylesheethref=../../../assets/stylesheets/main.4af4bdda.min.css><linkrel=stylesheethref=../../../assets/stylesheets/palette.06af60db.min.css><linkrel=stylesheethref=../../../stylesheets/extra.css><script>__md_scope=newURL("../../..",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><metaproperty=og:typecontent=website><metaproperty=og:titlecontent="Upgrade - WireGuard Portal"><metaproperty=og:descriptioncontent="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><metaproperty=og:imagecontent=https://wgportal.org/master/assets/images/social/documentation/upgrade/v1.png><metaproperty=og:image:typecontent=image/png><metaproperty=og:image:widthcontent=1200><metaproperty=og:image:heightcontent=630><metacontent=https://wgportal.org/master/documentation/upgrade/v1/property=og:url><metaname=twitter:cardcontent=summary_large_image><metaname=twitter:titlecontent="Upgrade - WireGuard Portal"><metaname=twitter:descriptioncontent="Manage WireGuard Peers and Interface using a beautiful and simple web UI."><metaname=twitter:imagecontent=https://wgportal.org/master/assets/images/social/documentation/upgrade/v1.png></head><bodydir=ltrdata-md-color-scheme=defaultdata-md-color-primary=whitedata-md-color-accent=indigo><inputclass=md-toggledata-md-toggle=drawertype=checkboxid=__drawerautocomplete=off><inputclass=md-toggledata-md-toggle=searchtype=checkboxid=__searchautocomplete=off><labelclass=md-overlayfor=__drawer></label><divdata-md-component=skip><ahref=#upgrade-from-v1-to-v2class=md-skip> Skip to content </a></div><divdata-md-component=announce></div><divdata-md-color-scheme=defaultdata-md-component=outdatedhidden></div><headerclass=md-headerdata-md-component=header><navclass="md-header__inner md-grid"aria-label=Header><ahref=../../..title="WireGuard Portal"class="md-header__button md-logo"aria-label="WireGuard Portal"data-md-component=logo><imgsrc=../../../assets/images/logo.svgalt=logo></a><labelclass="md-header__button md-icon"for=__drawer><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg></label><divclass=md-header__titledata-md-component=header-title><divclass=md-header__ellipsis><divclass=md-header__topic><spanclass=md-ellipsis> WireGuard Portal </span></div><divclass=md-header__topicdata-md-component=header-topic><spanclass=md-ellipsis> Upgrade </span></div></div></div><labelclass="md-header__button md-icon"for=__search><svgxmlns=http://www.w3.org/2000/svgviewbox="0 0 24 24"><pathd="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"/></svg></label><divclass=md-searchdata-md-component=searchrole=dialog><labelclass=md-search__overlayfor=__search></label><divclass=md-search__innerrole=search><formclass=md-search__formname=search><inputtype=textclass=md-search__inputname=queryaria-label=Searchplaceholder=Searchautocapitalize=offautocorrect=offautocomplete=offspellcheck=falsedata-md-component=search-queryrequired><labelclass="md-search__icon md-icon"
</code></pre></div><p>You can also specify the database type using the parameter <strong>-migrateFromType</strong>, supported types: mysql, mssql, postgres or sqlite. For example:</p><divclass=highlight><pre><span></span><code>./wg-portal-amd64<spanclass=w></span>-migrateFromType<spanclass=o>=</span>mysql<spanclass=w></span>-migrateFrom<spanclass=o>=</span><spanclass=s1>'user:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local'</span>
</code></pre></div><p>The upgrade will transform the old, existing database and store the values in the new database specified in the <strong>config.yml</strong> configuration file. Ensure that the new database does not contain any data!</p><p>If you are using Docker, you can adapt the docker-compose.yml file to start the upgrade process:</p><divclass=highlight><pre><span></span><code><spanclass=nt>services</span><spanclass=p>:</span>