2025-07-26 20:29:26 +00:00
<!doctype html> < html lang = en class = no-js > < head > < meta charset = utf-8 > < meta name = viewport content = "width=device-width,initial-scale=1" > < meta name = description content = "Manage WireGuard Peers and Interface using a beautiful and simple web UI." > < link href = https://wgportal.org/master/documentation/upgrade/v1/ rel = canonical > < link href = ../../rest-api/api-doc/ rel = prev > < link href = ../../monitoring/prometheus/ rel = next > < link rel = icon href = ../../../assets/images/favicon-large.png > < meta name = generator content = "mkdocs-1.6.1, mkdocs-material-9.6.16" > < title > Upgrade - WireGuard Portal< / title > < link rel = stylesheet href = ../../../assets/stylesheets/main.7e37652d.min.css > < link rel = stylesheet href = ../../../assets/stylesheets/palette.06af60db.min.css > < link rel = stylesheet href = ../../../stylesheets/extra.css > < 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 property = og:type content = website > < meta property = og:title content = "Upgrade - WireGuard Portal" > < meta property = og:description content = "Manage WireGuard Peers and Interface using a beautiful and simple web UI." > < meta property = og:image content = https://wgportal.org/master/assets/images/social/documentation/upgrade/v1.png > < meta property = og:image:type content = image/png > < meta property = og:image:width content = 1200 > < meta property = og:image:height content = 630 > < meta content = https://wgportal.org/master/documentation/upgrade/v1/ property = og:url > < meta name = twitter:card content = summary_large_image > < meta name = twitter:title content = "Upgrade - WireGuard Portal" > < meta name = twitter:description content = "Manage WireGuard Peers and Interface using a beautiful and simple web UI." > < meta name = twitter:image content = https://wgportal.org/master/assets/images/social/documentation/upgrade/v1.png > < / head > < body dir = ltr data-md-color-scheme = default data-md-color-primary = white data-md-color-accent = indigo > < input class = md-toggle data-md-toggle = drawer type = checkbox id = __drawer autocomplete = off > < input class = md-toggle data-md-toggle = search type = checkbox id = __search autocomplete = off > < label class = md-overlay for = __drawer > < / label > < div data-md-component = skip > < a href = #upgrade-from-v1-to-v2 class = md-skip > 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 class = "md-header__inner md-grid" aria-label = Header > < a href = ../../.. title = "WireGuard Portal" class = "md-header__button md-logo" aria-label = "WireGuard Portal" data-md-component = logo > < img src = ../../../assets/images/logo.svg alt = logo > < / a > < label class = "md-header__button md-icon" for = __drawer > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 24 24" > < path d = "M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z" / > < / 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 > Upgrade < / span > < / div > < / div > < / div > < label class = "md-header__button md-icon" for = __search > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 24 24" > < 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" / > < / 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 = search > < input type = text class = md-search__input name = query aria-label = Search placeholder = Search autocapitalize = off autocorrect = off autocomplete = off spellcheck = false data-md-component = search-query required > < label class = "md-search__icon md-icon" for = __
2025-05-04 18:20:11 +00:00
< / code > < / pre > < / div > < p > You can also specify the database type using the parameter < strong > -migrateFromType< / strong > . Supported database types: < code > mysql< / code > , < code > mssql< / code > , < code > postgres< / code > or < code > sqlite< / code > .< / p > < p > For example:< / p > < div class = highlight > < pre > < span > < / span > < code > ./wg-portal-amd64< span class = w > < / span > -migrateFromType< span class = o > =< / span > mysql< span class = w > < / span > -migrateFrom< span class = o > =< / span > < span class = s1 > ' user:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4& parseTime=True& loc=Local' < / span >
2025-05-03 20:22:32 +00:00
< / 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.yaml< / 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 > < div class = highlight > < pre > < span > < / span > < code > < span class = nt > services< / span > < span class = p > :< / span >
2025-04-07 16:31:58 +00:00
< span class = w > < / span > < span class = nt > wg-portal< / span > < span class = p > :< / span >
2025-05-04 18:20:11 +00:00
< 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:v2< / span >
2025-04-07 16:31:58 +00:00
< span class = w > < / span > < span class = c1 > # ... other settings< / 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" > no< / span >
2025-05-04 18:20:11 +00:00
< span class = w > < / span > < span class = nt > command< / span > < span class = p > :< / span > < span class = w > < / span > < span class = "p p-Indicator" > [< / span > < span class = s > " -migrateFrom=/app/data/old_wg_portal.db" < / span > < span class = "p p-Indicator" > ]< / span >
2025-07-26 20:29:26 +00:00
< / code > < / pre > < / div > < / 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/ target = _blank rel = noopener style = "color: black;" > Material for MkDocs < / a > < / div > < / div > <!-- Social links --> < div class = md-social > < a href = https://github.com/h44z/wg-portal target = _blank rel = noopener title = github.com class = md-social__link > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 512 512" > <!-- Font Awesome Free 7.0.0 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 2025 Fonticons, Inc. --> < path fill = currentColor d = "M202.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.1M496 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 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2m-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3m-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1" / > < / svg > < / a > < a href = https://hub.docker.com/r/wgportal/wg-portal target = _blank rel = noopener title = hub.docker.com class = md-social__link > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 640 512" > <!-- Font Awesome Free 7.0.0 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 2025 Fonticons, Inc. --> < path fill = currentColor d = "M349.9 236.3h-66.1v-59.4h66.1zm0-204.3h-66.1v60.7h66.1zm78.2 144.8H362v59.4h66.1zm-156.3-72.1h-66.1v60.1h66.1zm78.1 0h-66.1v60.1h66.1zm276.8 100c-14.4-9.7-47.6-13.2-73.1-8.4-3.3-24-16.7-44.9-41.1-63.7l-14-9.3-9.3 14c-18.4 27.8-23.4 73.6-3.7 103.8-8.7 4.7-25.8 11.1-48.4 10.7H2.4c-8.7 50.8 5.8 116.8 44 162.1 37.1 43.9 92.7 66.2 165.4 66.2 157.4 0 273.9-72.5 328.4-204.2 21.4.4 67.6.1 91.3-45.2 1.5-2.5 6.6-13.2 8.5-17.1zm-511.1-27.9h-66v59.4h66.1v-59.4zm78.1 0h-66.1v59.4h66.1zm78.1 0h-66.1v59.4h66.1zm-78.1-72.1h-66.1v60.1h66.1z" / > < / svg > < / a > < a href = https://twitter.com/chris_h44z target = _blank rel = noopener title = twitter.com class = md-social__link > < svg xmlns = http://www.w3.org/2000/svg viewbox = "0 0 512 512" > <!-- Font Awesome Free 7.0.0 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 2025 Fonticons, Inc. --> < path fill = currentColor d = "M459.4 151.7c.3 4.5.3 9.1.3 13.6 0 138.7-105.6 298.6-298.6 298.6-59.5 0-114.7-17.2-161.1-47.1 8.4 1 16.6 1.3 25.3 1.3 49.1 0 94.2-16.6 130.3-44.8-46.1-1-84.8-31.2-98.1-72.8 6.5 1 13 1.6 19.8 1.6 9.4 0 18.8-1.3 27.6-3.6-48.1-9.7-84.1-52-84.1-103v-1.3c14 7.8 30.2 12.7 47.4 13.3-28.3-18.8-46.8-51-46.8-87.4 0-19.5 5.2-37.4 14.3-53C87.4 130.8 165 172.4 252.1 176.9c-1.6-7.8-2.6-15.9-2.6-24C249.5 95.1 296.3 48 354.4 48c30.2 0 57.5 12.7 76.7 33.1 23.7-4.5 46.5-13.3 66.6-25.3-7.8 24.4-24.4 44.8-46.1 57.8 21.1-2.3 41.6-8.1 60.4-16.2-14.3 20.8-32.2 39.3-52.6 54.3" / > < / svg > < / a > < / div > < / div > < / div > < / footer > < / div > < div class = md-dialog data-md