/
snap
/
lxd
/
35210
/
share
/
lxd-documentation
/
howto
/
snap
/
File Upload :
llllll
Current File: //snap/lxd/35210/share/lxd-documentation/howto/snap/index.html
<!doctype html> <html class="no-js" lang="en" data-content_root="../../"> <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" /> <meta property="og:title" content="How to manage the LXD snap" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://documentation.ubuntu.com/lxd/latest/howto/snap/" /> <meta property="og:site_name" content="LXD documentation" /> <meta property="og:description" content="The recommended way to manage LXD is its snap package. For the installation guide, see: Install the LXD snap package. For details about the LXD snap, including its channels, tracks, and release pro..." /> <meta property="og:image" content="https://documentation.ubuntu.com/lxd/latest/_static/tag.png" /> <meta property="og:image:alt" content="LXD documentation" /> <meta name="description" content="The recommended way to manage LXD is its snap package. For the installation guide, see: Install the LXD snap package. For details about the LXD snap, including its channels, tracks, and release pro..." /> <link rel="index" title="Index" href="../../genindex/" /><link rel="search" title="Search" href="../../search/" /><link rel="next" title="Troubleshooting" href="../troubleshoot/" /><link rel="prev" title="How to recover instances in case of disaster" href="../disaster_recovery/" /> <link rel="canonical" href="https://documentation.ubuntu.com/lxd/howto/snap/" /> <link rel="shortcut icon" href="../../_static/favicon.ico"/><!-- Generated with Sphinx 8.2.3 and Furo 2025.07.19 --> <title>How to manage the LXD snap</title> <link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d111a655" /> <link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?v=25af2a20" /> <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" /> <link rel="stylesheet" type="text/css" href="../../_static/youtube.css" /> <link rel="stylesheet" type="text/css" href="../../_static/related-links.css" /> <link rel="stylesheet" type="text/css" href="../../_static/terminal-output.css" /> <link rel="stylesheet" type="text/css" href="../../_static/config-options.css" /> <link rel="stylesheet" type="text/css" href="../../_static/sphinx-design.min.css?v=95c83b7e" /> <link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?v=8dab3a3b" /> <link rel="stylesheet" type="text/css" href="../../_static/custom.css?v=66d86e9d" /> <link rel="stylesheet" type="text/css" href="../../_static/header.css?v=84f70f09" /> <link rel="stylesheet" type="text/css" href="../../_static/github_issue_links.css?v=af88fb93" /> <link rel="stylesheet" type="text/css" href="../../_static/furo_colors.css?v=c4ccdb8a" /> <link rel="stylesheet" type="text/css" href="../../_static/footer.css?v=bd05fc90" /> <link rel="stylesheet" type="text/css" href="../../_static/cookie-banner.css?v=b74831ab" /> </head> <body> <header id="header" class="p-navigation"> <script type="module" src="../../_static/js/bundle.js"> </script> <!-- Google Tag Manager --> <script> (function(w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0]; var j = d.createElement(s); var dl = ''; if (l != 'dataLayer') { dl = '&l=' + l; } j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-KNX3CJC'); </script> <div class="p-navigation__nav" role="menubar"> <ul class="p-navigation__links" role="menu"> <li> <a class="p-logo" href="https://canonical.com/lxd" aria-current="page"> <img src="../../_static/tag.png" alt="Logo" class="p-logo-image"> <div class="p-logo-text p-heading--4">LXD </div> </a> </li> <li class="nav-ubuntu-com"> <a href="https://canonical.com/lxd" class="p-navigation__link">canonical.com/lxd</a> </li> <li> <a href="#" class="p-navigation__link nav-more-links">More resources</a> <ul class="more-links-dropdown"> <li> <a href="https://ubuntu.com/lxd/install/" class="p-navigation__sub-link p-dropdown__link">Install LXD</a> </li> <li> <a href="https://ubuntu.com/lxd/manage/" class="p-navigation__sub-link p-dropdown__link">Manage LXD</a> </li> <li> <a href="https://discourse.ubuntu.com/c/lxd/" class="p-navigation__sub-link p-dropdown__link">Forum</a> </li> <li> <a href="https://github.com/canonical/lxd" class="p-navigation__sub-link p-dropdown__link">GitHub</a> </li> </ul> </li> </ul> </div> </header> <script> document.body.dataset.theme = localStorage.getItem("theme") || "auto"; </script> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-toc" viewBox="0 0 24 24"> <title>Contents</title> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line> <line x1="3" y1="6" x2="21" y2="6"></line> <line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24"> <title>Light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24"> <title>Dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> </svg> </symbol> <symbol id="svg-sun-with-moon" viewBox="0 0 24 24"> <title>Auto light/dark, in light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/> <line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/> <line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/> <line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/> <line x1="19" y1="14.05" x2="20.414" y2="15.464"/> <line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/> <line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/> <line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/> <line x1="19" y1="5.05" x2="20.414" y2="3.636"/> <circle cx="14.5" cy="9.55" r="3.6"/> </svg> </symbol> <symbol id="svg-moon-with-sun" viewBox="0 0 24 24"> <title>Auto light/dark, in dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/> <line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/> <line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/> <line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/> <line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/> <line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/> <line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/> <line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/> <line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/> <circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/> </svg> </symbol> <symbol id="svg-pencil" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code"> <path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" /> <path d="M13.5 6.5l4 4" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> <symbol id="svg-eye" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /> <path d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> </svg> <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> <label class="overlay sidebar-overlay" for="__navigation"> <div class="visually-hidden">Hide navigation sidebar</div> </label> <label class="overlay toc-overlay" for="__toc"> <div class="visually-hidden">Hide table of contents sidebar</div> </label> <a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a> <div class="page"> <header class="mobile-header"> <div class="header-left"> <label class="nav-overlay-icon" for="__navigation"> <div class="visually-hidden">Toggle site navigation sidebar</div> <i class="icon"><svg><use href="#svg-menu"></use></svg></i> </label> </div> <div class="header-center"> <a href="../../"><div class="brand">LXD</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> </header> <aside class="sidebar-drawer"> <div class="sidebar-container"> <div class="sidebar-sticky"><a class="sidebar-brand" href="../../"> </a><form class="sidebar-search-container" method="get" action="../../search/" role="search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input type="submit" value="Go"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form> <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../../">LXD</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../../tutorial/">Tutorials</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Tutorials</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../../tutorial/first_steps/">First steps with LXD</a></li> <li class="toctree-l2"><a class="reference internal" href="../../tutorial/ui/">Getting started with the UI</a></li> </ul> </li> <li class="toctree-l1 current has-children"><a class="reference internal" href="../">How-to guides</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of How-to guides</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2 has-children"><a class="reference internal" href="../../getting_started/">Getting started</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Getting started</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../installing/">Install LXD</a></li> <li class="toctree-l3"><a class="reference internal" href="../initialize/">Initialize LXD</a></li> <li class="toctree-l3"><a class="reference internal" href="../access_ui/">Access the UI</a></li> <li class="toctree-l3"><a class="reference internal" href="../access_documentation/">Access documentation locally</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../operation/">LXD server and client</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of LXD server and client</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../server_expose/">Expose LXD to the network</a></li> <li class="toctree-l3"><a class="reference internal" href="../server_configure/">Configure the LXD server</a></li> <li class="toctree-l3"><a class="reference internal" href="../oidc_auth0/">Configure OIDC authentication with Auth0</a></li> <li class="toctree-l3"><a class="reference internal" href="../oidc_ory/">Configure OIDC authentication with Ory Hydra</a></li> <li class="toctree-l3"><a class="reference internal" href="../oidc_keycloak/">Configure OIDC authentication with Keycloak</a></li> <li class="toctree-l3"><a class="reference internal" href="../oidc_entra_id/">Configure OIDC authentication with Microsoft Entra ID</a></li> <li class="toctree-l3"><a class="reference internal" href="../../remotes/">Add remote servers</a></li> <li class="toctree-l3"><a class="reference internal" href="../lxc_alias/">Add command aliases</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../instances/">Instances</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of Instances</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../instances_create/">Create instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_configure/">Configure instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_manage/">Manage instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../../profiles/">Use profiles</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_troubleshoot/">Troubleshoot errors</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_ubuntu_pro_attach/">Auto attach Ubuntu Pro</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_access_files/">Access files</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_console/">Access the console</a></li> <li class="toctree-l3"><a class="reference internal" href="../../instance-exec/">Run commands</a></li> <li class="toctree-l3"><a class="reference internal" href="../../cloud-init/">Use cloud-init</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_routed_nic_vm/">Add a routed NIC to a VM</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_backup/">Back up instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_migrate/">Migrate instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../import_machines_to_instances/">Import existing machines</a></li> <li class="toctree-l3"><a class="reference internal" href="../container_gpu_passthrough_with_docker/">Pass NVIDIA GPUs</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../images/">Images</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of Images</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../images_remote/">Use remote images</a></li> <li class="toctree-l3"><a class="reference internal" href="../images_manage/">Manage images</a></li> <li class="toctree-l3"><a class="reference internal" href="../images_profiles/">Associate profiles</a></li> <li class="toctree-l3"><a class="reference internal" href="../images_copy/">Copy and import images</a></li> <li class="toctree-l3"><a class="reference internal" href="../images_create/">Create images</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../projects/">Projects</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of Projects</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../projects_create/">Create and configure</a></li> <li class="toctree-l3"><a class="reference internal" href="../projects_work/">Work with projects</a></li> <li class="toctree-l3"><a class="reference internal" href="../projects_confine/">Confine users to projects</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../storage/">Storage</a><input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of Storage</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../storage_pools/">Manage pools</a></li> <li class="toctree-l3"><a class="reference internal" href="../storage_volumes/">Manage volumes</a></li> <li class="toctree-l3"><a class="reference internal" href="../storage_buckets/">Manage buckets</a></li> <li class="toctree-l3"><a class="reference internal" href="../storage_create_instance/">Create an instance in a pool</a></li> <li class="toctree-l3"><a class="reference internal" href="../storage_backup_volume/">Back up a volume</a></li> <li class="toctree-l3"><a class="reference internal" href="../storage_move_volume/">Move or copy a volume</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../networks/">Networking</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of Networking</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../network_create/">Create a network</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_configure/">Configure a network</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_bgp/">Configure as BGP server</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_acls/">Configure network ACLs</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_forwards/">Configure forwards</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_zones/">Configure network zones</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_bridge_firewalld/">Configure your firewall</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_bridge_resolved/">Integrate with resolved</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_ovn_setup/">Set up OVN</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_load_balancers/">Configure load balancers</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_ovn_peers/">Configure peer routing</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_ipam/">Display IPAM information</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../clustering/">Clustering</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of Clustering</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../cluster_form/">Form a cluster</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_manage/">Manage a cluster</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_config_networks/">Configure networks</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_config_storage/">Configure storage</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_manage_instance/">Manage instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_groups/">Set up cluster groups</a></li> <li class="toctree-l3"><a class="reference internal" href="../cluster_recover/">Recover a cluster</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../production-setup/">Production setup</a><input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of Production setup</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../benchmark_performance/">Benchmark performance</a></li> <li class="toctree-l3"><a class="reference internal" href="../network_increase_bandwidth/">Increase bandwidth</a></li> <li class="toctree-l3"><a class="reference internal" href="../../metrics/">Monitor metrics</a></li> <li class="toctree-l3"><a class="reference internal" href="../logs_loki/">Send logs to Loki</a></li> <li class="toctree-l3"><a class="reference internal" href="../grafana/">Set up Grafana</a></li> <li class="toctree-l3"><a class="reference internal" href="../../backup/">Back up a server</a></li> <li class="toctree-l3"><a class="reference internal" href="../disaster_recovery/">Recover instances</a></li> </ul> </li> <li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Manage the snap</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../troubleshoot/">Troubleshooting</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of Troubleshooting</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../network_bridge_firewalld/">Configure your firewall</a></li> <li class="toctree-l3"><a class="reference internal" href="../instances_troubleshoot/">Troubleshoot instances</a></li> <li class="toctree-l3"><a class="reference internal" href="../dqlite_troubleshoot/">Troubleshoot Dqlite</a></li> <li class="toctree-l3"><a class="reference internal" href="../../debugging/">Debug LXD</a></li> <li class="toctree-l3"><a class="reference internal" href="../../faq/">Frequently asked</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../../support/">Get support</a></li> <li class="toctree-l2"><a class="reference internal" href="../../contributing/">Contribute to LXD</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../../explanation/">Explanation</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of Explanation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../../explanation/lxd_lxc/"><code class="docutils literal notranslate"><span class="pre">lxd</span></code> and <code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/instances/">Containers and VMs</a></li> <li class="toctree-l2"><a class="reference internal" href="../../image-handling/">Local and remote images</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/storage/">Storage pools, volumes, and buckets</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/networks/">Networking setups</a></li> <li class="toctree-l2"><a class="reference internal" href="../../database/">The LXD Dqlite database</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/lxc_show_info/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code> <code class="docutils literal notranslate"><span class="pre">show</span></code> and <code class="docutils literal notranslate"><span class="pre">info</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="../../authentication/">Remote API authentication</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/authorization/">Remote API authorization</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/projects/">Instances grouping with projects</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/clusters/">Clusters</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/performance_tuning/">Performance tuning</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/security/">Security</a></li> <li class="toctree-l2"><a class="reference internal" href="../../explanation/bpf/">Privilege delegation using BPF Token</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../../reference/">Reference</a><input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><div class="visually-hidden">Toggle navigation of Reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../../requirements/">Requirements</a></li> <li class="toctree-l2"><a class="reference internal" href="../../architectures/">Architectures</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/releases-snap/">Releases and snap</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/remote_image_servers/">Remote image servers</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/image_format/">Image format</a></li> <li class="toctree-l2"><a class="reference internal" href="../../guest-os-compatibility/">Guest OS compatibility</a></li> <li class="toctree-l2"><a class="reference internal" href="../../container-environment/">Container environment</a></li> <li class="toctree-l2"><a class="reference internal" href="../../config-options/">Configuration option index</a></li> <li class="toctree-l2"><a class="reference internal" href="../../server/">Server configuration</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../explanation/instance_config/">Instance configuration</a><input class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" role="switch" type="checkbox"/><label for="toctree-checkbox-15"><div class="visually-hidden">Toggle navigation of Instance configuration</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../reference/instance_properties/">Instance properties</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/instance_options/">Instance options</a></li> <li class="toctree-l3 has-children"><a class="reference internal" href="../../reference/devices/">Devices</a><input class="toctree-checkbox" id="toctree-checkbox-16" name="toctree-checkbox-16" role="switch" type="checkbox"/><label for="toctree-checkbox-16"><div class="visually-hidden">Toggle navigation of Devices</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l4"><a class="reference internal" href="../../reference/standard_devices/">Standard devices</a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_none/">Type: <code class="docutils literal notranslate"><span class="pre">none</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_nic/">Type: <code class="docutils literal notranslate"><span class="pre">nic</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_disk/">Type: <code class="docutils literal notranslate"><span class="pre">disk</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_unix_char/">Type: <code class="docutils literal notranslate"><span class="pre">unix-char</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_unix_block/">Type: <code class="docutils literal notranslate"><span class="pre">unix-block</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_usb/">Type: <code class="docutils literal notranslate"><span class="pre">usb</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_gpu/">Type: <code class="docutils literal notranslate"><span class="pre">gpu</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_infiniband/">Type: <code class="docutils literal notranslate"><span class="pre">infiniband</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_proxy/">Type: <code class="docutils literal notranslate"><span class="pre">proxy</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_unix_hotplug/">Type: <code class="docutils literal notranslate"><span class="pre">unix-hotplug</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_tpm/">Type: <code class="docutils literal notranslate"><span class="pre">tpm</span></code></a></li> <li class="toctree-l4"><a class="reference internal" href="../../reference/devices_pci/">Type: <code class="docutils literal notranslate"><span class="pre">pci</span></code></a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="../../reference/instance_units/">Units for storage and network limits</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../../reference/preseed_yaml_fields/">Preseed YAML file fields</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/projects/">Project configuration</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../reference/storage_drivers/">Storage drivers</a><input class="toctree-checkbox" id="toctree-checkbox-17" name="toctree-checkbox-17" role="switch" type="checkbox"/><label for="toctree-checkbox-17"><div class="visually-hidden">Toggle navigation of Storage drivers</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_btrfs/">Btrfs - <code class="docutils literal notranslate"><span class="pre">btrfs</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_cephfs/">CephFS - <code class="docutils literal notranslate"><span class="pre">cephfs</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_cephobject/">Ceph Object - <code class="docutils literal notranslate"><span class="pre">cephobject</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_ceph/">Ceph RBD - <code class="docutils literal notranslate"><span class="pre">ceph</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_powerflex/">Dell PowerFlex - <code class="docutils literal notranslate"><span class="pre">powerflex</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_pure/">Pure Storage - <code class="docutils literal notranslate"><span class="pre">pure</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_dir/">Directory - <code class="docutils literal notranslate"><span class="pre">dir</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_lvm/">LVM - <code class="docutils literal notranslate"><span class="pre">lvm</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/storage_zfs/">ZFS - <code class="docutils literal notranslate"><span class="pre">zfs</span></code></a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../reference/networks/">Networks</a><input class="toctree-checkbox" id="toctree-checkbox-18" name="toctree-checkbox-18" role="switch" type="checkbox"/><label for="toctree-checkbox-18"><div class="visually-hidden">Toggle navigation of Networks</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../reference/network_bridge/">Bridge network</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/network_ovn/">OVN network</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/network_macvlan/">Macvlan network</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/network_physical/">Physical network</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/network_sriov/">SR-IOV network</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../../reference/cluster_member_config/">Cluster configuration</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/server_settings/">Production server settings</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/provided_metrics/">Provided metrics</a></li> <li class="toctree-l2"><a class="reference internal" href="../../reference/permissions/">Permissions</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../restapi_landing/">REST API</a><input class="toctree-checkbox" id="toctree-checkbox-19" name="toctree-checkbox-19" role="switch" type="checkbox"/><label for="toctree-checkbox-19"><div class="visually-hidden">Toggle navigation of REST API</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../rest-api/">Main API documentation</a></li> <li class="toctree-l3"><a class="reference internal" href="../../api/">Main API specification</a></li> <li class="toctree-l3"><a class="reference internal" href="../../api-extensions/">Main API extensions</a></li> <li class="toctree-l3"><a class="reference internal" href="../../events/">Events API documentation</a></li> <li class="toctree-l3"><a class="reference internal" href="../../dev-lxd/">Instance API</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../reference/manpages/">Man pages</a><input class="toctree-checkbox" id="toctree-checkbox-20" name="toctree-checkbox-20" role="switch" type="checkbox"/><label for="toctree-checkbox-20"><div class="visually-hidden">Toggle navigation of Man pages</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../reference/manpages/lxc/"><code class="docutils literal notranslate"><span class="pre">lxc</span></code></a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../../internals/">Internals</a><input class="toctree-checkbox" id="toctree-checkbox-21" name="toctree-checkbox-21" role="switch" type="checkbox"/><label for="toctree-checkbox-21"><div class="visually-hidden">Toggle navigation of Internals</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../../environment/">Environment variables</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/uefi_variables/">UEFI variables for VMs</a></li> <li class="toctree-l3"><a class="reference internal" href="../../daemon-behavior/">Daemon behavior</a></li> <li class="toctree-l3"><a class="reference internal" href="../../syscall-interception/">System call interception</a></li> <li class="toctree-l3"><a class="reference internal" href="../../userns-idmap/">User namespace setup</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/ovn-internals/">OVN implementation</a></li> <li class="toctree-l3"><a class="reference internal" href="../../reference/vm_live_migration_internals/">VM live migration implementation</a></li> </ul> </li> <li class="toctree-l2"><a class="reference external" href="https://github.com/canonical/lxd">Project repository</a></li> <li class="toctree-l2"><a class="reference external" href="https://images.lxd.canonical.com">Image server</a></li> </ul> </li> </ul> </div> </div> </div> </div> </aside> <div class="main"> <div class="content"> <div class="article-container"> <a href="#" class="back-to-top muted-link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> </svg> <span>Back to top</span> </a> <div class="content-icon-container"> <div class="view-this-page"> <a class="muted-link" href="../../_sources/howto/snap.md.txt" title="View this page"> <svg><use href="#svg-eye"></use></svg> <span class="visually-hidden">View this page</span> </a> </div> <div class="theme-toggle-container theme-toggle-content"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-content-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> <article role="main" id="furo-main-content"> <section id="how-to-manage-the-lxd-snap"> <span id="howto-snap"></span><h1>How to manage the LXD snap<a class="headerlink" href="#how-to-manage-the-lxd-snap" title="Link to this heading">¶</a></h1> <p>The recommended way to manage LXD is its <a class="reference external" href="https://snapcraft.io/lxd">snap package</a>.</p> <p>For the installation guide, see: <a class="reference internal" href="../../installing/#installing-snap-package"><span class="std std-ref">Install the LXD snap package</span></a>. For details about the LXD snap, including its <a class="reference internal" href="../../reference/releases-snap/#ref-snap-channels"><span class="std std-ref">channels</span></a>, <a class="reference internal" href="../../reference/releases-snap/#ref-snap-tracks"><span class="std std-ref">tracks</span></a>, and <a class="reference internal" href="../../reference/releases-snap/#ref-releases"><span class="std std-ref">release processes</span></a>, see: <a class="reference internal" href="../../reference/releases-snap/#ref-releases-snap"><span class="std std-ref">Releases and snap</span></a>.</p> <section id="view-snap-information"> <span id="howto-snap-info"></span><h2>View snap information<a class="headerlink" href="#view-snap-information" title="Link to this heading">¶</a></h2> <p>To view information about the LXD snap, including the available channels and installed version, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>snap<span class="w"> </span>info<span class="w"> </span>lxd </pre></div> </div> <p>To view information about the installed version only, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>snap<span class="w"> </span>list<span class="w"> </span>lxd </pre></div> </div> <p>Sample output:</p> <div class="terminal docutils container"> <div class="input docutils container"> <code class="prompt docutils literal notranslate"><span class="pre">root@instance:~#</span> </code><code class="command docutils literal notranslate"><span class="pre">snap</span> <span class="pre">list</span> <span class="pre">lxd</span></code></div> <code class="output docutils literal notranslate"><span class="pre">Name</span>  <span class="pre">Version</span>         <span class="pre">Rev</span>    <span class="pre">Tracking</span>     <span class="pre">Publisher</span>   <span class="pre">Notes</span></code><code class="output docutils literal notranslate"><span class="pre">lxd</span>   <span class="pre">5.21.3-c5ae129</span>  <span class="pre">33110</span>  <span class="pre">5.21/stable</span>  <span class="pre">canonical✓</span>  <span class="pre">-</span></code></div> <p>The first part of the version string corresponds to the LXD release (in this sample, <code class="docutils literal notranslate"><span class="pre">5.21.3</span></code>).</p> </section> <section id="manage-updates"> <span id="howto-snap-updates"></span><h2>Manage updates<a class="headerlink" href="#manage-updates" title="Link to this heading">¶</a></h2> <p>When LXD is <a class="reference internal" href="../../installing/#installing-snap-package"><span class="std std-ref">installed as a snap</span></a>, it begins tracking the specified snap channel, or the most recent stable LTS track if not specified. Whenever a new version is published to that channel, the LXD version on your system automatically updates.</p> <p>For control over the update schedule, use either of the following approaches:</p> <ul class="simple"> <li><p><a class="reference internal" href="#howto-snap-updates-schedule"><span class="std std-ref">Schedule updates with the refresh timer</span></a>.</p></li> <li><p><a class="reference internal" href="#howto-snap-updates-hold"><span class="std std-ref">Hold updates</span></a> and perform <a class="reference internal" href="#howto-snap-updates-manual"><span class="std std-ref">Manual updates</span></a> as needed.</p></li> </ul> <p>For clustered LXD installations, also follow the instructions below to <a class="reference internal" href="#howto-snap-updates-sync"><span class="std std-ref">synchronize updates for cluster members</span></a>.</p> <p>For more information about snap updates in general, see the Snap documentation: <a class="reference external" href="https://snapcraft.io/docs/managing-updates">Managing updates</a>.</p> <section id="schedule-updates-with-the-refresh-timer"> <span id="howto-snap-updates-schedule"></span><h3>Schedule updates with the refresh timer<a class="headerlink" href="#schedule-updates-with-the-refresh-timer" title="Link to this heading">¶</a></h3> <p>Set the <a class="reference external" href="https://snapcraft.io/docs/managing-updates#p-32248-refreshtimer">snaps refresh timer</a> to regularly update snaps at specific times. This enables you to schedule automatic updates during times that don’t disturb normal operation. The refresh timer is set system-wide; you cannot set it for the LXD snap only. It does not apply to snaps that are held indefinitely.</p> <p>For example, to configure your system to update snaps only between 8:00 am and 9:00 am on Mondays, set the following option:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span>sudo<span class="w"> </span>snap<span class="w"> </span><span class="nb">set</span><span class="w"> </span>system<span class="w"> </span>refresh.timer<span class="o">=</span>mon,8:00-9:00 </pre></div> </div> <p>You can also use the <a class="reference external" href="https://snapcraft.io/docs/managing-updates#p-32248-refreshhold">refresh.hold</a> setting to hold all snap updates for up to 90 days, after which they automatically update. See <a class="reference external" href="https://snapcraft.io/docs/managing-updates#heading--refresh-hold">Control updates with system options</a> in the snap documentation for details.</p> </section> <section id="hold-updates"> <span id="howto-snap-updates-hold"></span><h3>Hold updates<a class="headerlink" href="#hold-updates" title="Link to this heading">¶</a></h3> <p>You can hold snap updates for the LXD snap, either indefinitely or for a specific duration. If you want to fully control updates to your LXD snap, you should set up an indefinite hold.</p> <p>To indefinitely hold updates, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>--hold<span class="w"> </span>lxd </pre></div> </div> <p>Then you can perform <a class="reference internal" href="#howto-snap-updates-manual"><span class="std std-ref">manual updates</span></a> on a schedule that you control.</p> <p>For detailed information about holds, including how to hold snaps for a specific duration rather than indefinitely, see: <a class="reference external" href="https://snapcraft.io/docs/managing-updates#p-32248-pause-or-stop-automatic-updates">Pause or stop automatic updates</a> in the Snap documentation.</p> </section> <section id="manual-updates"> <span id="howto-snap-updates-manual"></span><h3>Manual updates<a class="headerlink" href="#manual-updates" title="Link to this heading">¶</a></h3> <p>For an LXD snap installed as part of a cluster, see the section on <a class="reference internal" href="#howto-snap-updates-sync"><span class="std std-ref">synchronizing cluster updates</span></a> below.</p> <p>Otherwise, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>lxd </pre></div> </div> <p>This updates your LXD snap to the latest release within its channel.</p> </section> <section id="synchronize-updates-for-a-lxd-cluster-cohort"> <span id="howto-snap-updates-sync"></span><h3>Synchronize updates for a LXD cluster cohort<a class="headerlink" href="#synchronize-updates-for-a-lxd-cluster-cohort" title="Link to this heading">¶</a></h3> <p>All <a class="reference internal" href="../../explanation/clusters/#exp-clusters"><span class="std std-ref">LXD cluster members</span></a> must run the same LXD version. Even if you apply updates manually, versions can fall out of sync; see <a class="reference internal" href="../../reference/releases-snap/#ref-snap-updates-cluster"><span class="std std-ref">Updates on clusters</span></a> for details.</p> <p>To ensure synchronized updates, set the <code class="docutils literal notranslate"><span class="pre">--cohort="+"</span></code> flag on all cluster members. You only need to set this flag once per LXD snap. This can occur during <a class="reference internal" href="../../installing/#installing-snap-package"><span class="std std-ref">installation</span></a>, or the first time you <a class="reference internal" href="#howto-snap-updates-manual"><span class="std std-ref">perform a manual update</span></a>.</p> <p>To set this flag during installation:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>install<span class="w"> </span>lxd<span class="w"> </span>--cohort<span class="o">=</span><span class="s2">"+"</span> </pre></div> </div> <p>To set this flag later, during a manual update:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>lxd<span class="w"> </span>--cohort<span class="o">=</span><span class="s2">"+"</span> </pre></div> </div> <p>After you set this flag, <code class="docutils literal notranslate"><span class="pre">snap</span> <span class="pre">list</span> <span class="pre">lxd</span></code> shows <code class="docutils literal notranslate"><span class="pre">in-cohort</span></code> in the <code class="docutils literal notranslate"><span class="pre">Notes</span></code> column. Example:</p> <div class="terminal docutils container"> <div class="input docutils container"> <code class="prompt docutils literal notranslate"><span class="pre">root@instance:~#</span> </code><code class="command docutils literal notranslate"><span class="pre">snap</span> <span class="pre">list</span> <span class="pre">lxd</span></code></div> <code class="output docutils literal notranslate"><span class="pre">Name</span>  <span class="pre">Version</span>         <span class="pre">Rev</span>    <span class="pre">Tracking</span>     <span class="pre">Publisher</span>   <span class="pre">Notes</span></code><code class="output docutils literal notranslate"><span class="pre">lxd</span>   <span class="pre">5.21.3-c5ae129</span>  <span class="pre">33110</span>  <span class="pre">5.21/stable</span>  <span class="pre">canonical✓</span>  <span class="pre">in-cohort</span></code></div> <p>Subsequent updates to this snap automatically use the <code class="docutils literal notranslate"><span class="pre">--cohort="+"</span></code> flag, even if you <a class="reference internal" href="#howto-snap-change"><span class="std std-ref">change its channel</span></a> or use automated or <a class="reference internal" href="#howto-snap-updates-schedule"><span class="std std-ref">scheduled</span></a> updates. Thus, once the snap is <code class="docutils literal notranslate"><span class="pre">in-cohort</span></code>, you can omit that flag for future updates.</p> <div class="tip admonition"> <p class="admonition-title">Workaround if the cohort flag malfunctions</p> <p>If for some reason, the <code class="docutils literal notranslate"><span class="pre">--cohort="+"</span></code> flag does not work as expected, you can update using a matching revision on all cluster members manually:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>lxd<span class="w"> </span>--revision<span class="o">=</span><revision_number> </pre></div> </div> <p>Example:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>lxd<span class="w"> </span>--revision<span class="o">=</span><span class="m">33110</span> </pre></div> </div> </div> </section> <section id="manage-updates-with-an-enterprise-store-proxy"> <h3>Manage updates with an Enterprise Store proxy<a class="headerlink" href="#manage-updates-with-an-enterprise-store-proxy" title="Link to this heading">¶</a></h3> <div class="tip admonition"> <p class="admonition-title">For Snap Store Proxy users</p> <p>If you previously used the Snap Store Proxy, see the <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/how-to/migrate">migration guide</a> in the Enterprise Store documentation for instructions on transitioning to the Enterprise Store.</p> </div> <p>If you manage a large LXD cluster and require absolute control over when updates are applied, consider using the <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/">Enterprise Store</a>. This proxy application sits between your machines’ snap clients and the Snap Store, giving you control over which snap revisions are available for installation.</p> <p>To get started, follow the Enterprise Store documentation to <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/how-to/install/">install</a> and <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/how-to/register/">register</a> the service. Once it’s running, configure all cluster members to use the proxy; see <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/how-to/devices/">Configure devices</a> for instructions. You can then <a class="reference external" href="https://documentation.ubuntu.com/enterprise-store/main/how-to/overrides/">override the revision</a> for the LXD snap to control which version is installed:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>enterprise-store<span class="w"> </span>override<span class="w"> </span>lxd<span class="w"> </span><channel><span class="o">=</span><revision> </pre></div> </div> <p>Example:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>enterprise-store<span class="w"> </span>override<span class="w"> </span>lxd<span class="w"> </span><span class="nv">stable</span><span class="o">=</span><span class="m">25846</span> </pre></div> </div> </section> </section> <section id="configure-the-snap"> <span id="howto-snap-configure"></span><h2>Configure the snap<a class="headerlink" href="#configure-the-snap" title="Link to this heading">¶</a></h2> <p>The LXD snap has several configuration options that control the behavior of the installed LXD server. For example, you can define a LXD user group to achieve a multi-user environment for LXD. For more information, see: <a class="reference internal" href="../projects_confine/#projects-confine-users"><span class="std std-ref">Confine users to specific LXD projects via Unix socket</span></a>.</p> <p>See the <a class="reference external" href="https://snapcraft.io/lxd">LXD snap page</a> for a list of available configuration options.</p> <p>To set any of these options, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span><span class="nb">set</span><span class="w"> </span>lxd<span class="w"> </span><key><span class="o">=</span><value> </pre></div> </div> <p>Example:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span><span class="nb">set</span><span class="w"> </span>lxd<span class="w"> </span>daemon.user.group<span class="o">=</span>lxd-users </pre></div> </div> <p>To see all configuration options that are explicitly set on the snap, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>get<span class="w"> </span>lxd </pre></div> </div> <p>For more information about snap configuration options, visit <a class="reference external" href="https://snapcraft.io/docs/configuration-in-snaps">Configure snaps</a> in the Snap documentation.</p> </section> <section id="change-the-snap-channel"> <span id="howto-snap-change"></span><h2>Change the snap channel<a class="headerlink" href="#change-the-snap-channel" title="Link to this heading">¶</a></h2> <p>While it is possible to change the channel used at installation, proceed with caution.</p> <p>You can upgrade (move to a newer <a class="reference internal" href="../../reference/releases-snap/#ref-snap-tracks"><span class="std std-ref">track</span></a>, such as from 5.21 to 6), as well as move to different <a class="reference internal" href="../../reference/releases-snap/#ref-snap-risk"><span class="std std-ref">risk level</span></a> with the same track. However, downgrading (moving to a channel with an older track, such as from 6 to 5.21) is neither recommended nor supported, as breaking changes can exist between major versions.</p> <p>To change the channel, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>refresh<span class="w"> </span>lxd<span class="w"> </span>--channel<span class="o">=</span><target<span class="w"> </span>channel> </pre></div> </div> <p>This command immediately updates the installed snap version.</p> </section> <section id="manage-the-lxd-daemon"> <span id="howto-snap-daemon"></span><h2>Manage the LXD daemon<a class="headerlink" href="#manage-the-lxd-daemon" title="Link to this heading">¶</a></h2> <p>Installing LXD as a snap creates the LXD daemon as a <a class="reference external" href="https://snapcraft.io/docs/service-management">snap service</a>. Use the following <code class="docutils literal notranslate"><span class="pre">snap</span></code> commands to manage this daemon.</p> <p>To view the status of the daemon, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>snap<span class="w"> </span>services<span class="w"> </span>lxd </pre></div> </div> <p>To stop the daemon, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>stop<span class="w"> </span>lxd </pre></div> </div> <p>Stopping the daemon also stops all running LXD instances.</p> <p>To start the LXD daemon, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>start<span class="w"> </span>lxd </pre></div> </div> <p>Starting the daemon also starts all previously running LXD instances.</p> <p>To restart the daemon, run:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>restart<span class="w"> </span>lxd </pre></div> </div> <p>This also stops and starts all running LXD instances. To keep the instances running as you restart the daemon, use the <code class="docutils literal notranslate"><span class="pre">--reload</span></code> flag:</p> <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo<span class="w"> </span>snap<span class="w"> </span>restart<span class="w"> </span>--reload<span class="w"> </span>lxd </pre></div> </div> <p>For more information about managing snap services, visit <a class="reference external" href="https://snapcraft.io/docs/service-management">Service management</a> in the Snap documentation.</p> </section> <section id="related-topics"> <h2>Related topics<a class="headerlink" href="#related-topics" title="Link to this heading">¶</a></h2> <p>How-to guide:</p> <ul class="simple"> <li><p><a class="reference internal" href="../../installing/#installing-snap-package"><span class="std std-ref">Install the LXD snap package</span></a></p></li> </ul> <p>Reference:</p> <ul class="simple"> <li><p><a class="reference internal" href="../../reference/releases-snap/#ref-releases-snap"><span class="std std-ref">Releases and snap</span></a></p></li> </ul> </section> </section> </article> </div> <footer> <div class="related-pages"> <a class="next-page" href="../troubleshoot/"> <div class="page-info"> <div class="context"> <span>Next</span> </div> <div class="title">Troubleshooting</div> </div> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> </a> <a class="prev-page" href="../disaster_recovery/"> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> <div class="title">How to recover instances in case of disaster</div> </div> </a> </div> <div class="bottom-of-page"> <div class="left-details"> <div class="copyright"> Copyright © 2014-2025 LXD contributors </div> <div class="last-updated"> Last updated on Aug 12, 2025</div> <div class="show-source"> <a class="muted-link" href="../../_sources/howto/snap.md.txt" rel="nofollow">Show source</a> </div> </div> <div> <a class="display-contributors">Thanks to the 5 contributors!</a> <div id="overlay"></div> <ul class="all-contributors"> <li> <a href="https://github.com/canonical/lxd/commit/7ad312dc3447b99e29a6eea8af808e0976e5c3ad" class="contributor">Gabriel Mougard</a> </li> <li> <a href="https://github.com/canonical/lxd/commit/2314da7bc555315512a7f398737db476cb8826f1" class="contributor">Minae Lee</a> </li> <li> <a href="https://github.com/canonical/lxd/commit/9f858920d54c40d09e59acf46dfc0cadfae9eef2" class="contributor">Ruth Fuchss</a> </li> <li> <a href="https://github.com/canonical/lxd/commit/d0ef03c8547f0260d54bdfa7976ab62c4a52a665" class="contributor">Simon Deziel</a> </li> <li> <a href="https://github.com/canonical/lxd/commit/679e789e8710d30ca7ec3a065277585701816ace" class="contributor">Tom Parrott</a> </li> </ul> </div> <div class="right-details"> <div class="ask-discourse"> <a class="muted-link" href="https://discourse.ubuntu.com/c/lxd/">Ask a question on Discourse</a> </div> <div class="ask-matrix"> <a class="muted-link" href="https://matrix.to/#/#documentation:ubuntu.com">Ask a question on Matrix</a> </div> <div class="issue-github"> <a class="muted-link" href="https://github.com/canonical/lxd/issues/new?title=doc%3A+ADD+A+TITLE&body=DESCRIBE+THE+ISSUE%0A%0A---%0ADocument: howto/snap.md">Open a GitHub issue for this page</a> </div> <div class="edit-github"> <a class="muted-link" href="https://github.com/canonical/lxd/edit/main/doc/howto/snap.md">Edit this page on GitHub</a> </div> </div> </div> </div> </footer> </div> <aside class="toc-drawer"> <div class="toc-sticky toc-scroll"> <div class="toc-title-container"> <span class="toc-title"> Contents </span> </div> <div class="toc-tree-container"> <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">How to manage the LXD snap</a><ul> <li><a class="reference internal" href="#view-snap-information">View snap information</a></li> <li><a class="reference internal" href="#manage-updates">Manage updates</a><ul> <li><a class="reference internal" href="#schedule-updates-with-the-refresh-timer">Schedule updates with the refresh timer</a></li> <li><a class="reference internal" href="#hold-updates">Hold updates</a></li> <li><a class="reference internal" href="#manual-updates">Manual updates</a></li> <li><a class="reference internal" href="#synchronize-updates-for-a-lxd-cluster-cohort">Synchronize updates for a LXD cluster cohort</a></li> <li><a class="reference internal" href="#manage-updates-with-an-enterprise-store-proxy">Manage updates with an Enterprise Store proxy</a></li> </ul> </li> <li><a class="reference internal" href="#configure-the-snap">Configure the snap</a></li> <li><a class="reference internal" href="#change-the-snap-channel">Change the snap channel</a></li> <li><a class="reference internal" href="#manage-the-lxd-daemon">Manage the LXD daemon</a></li> <li><a class="reference internal" href="#related-topics">Related topics</a></li> </ul> </li> </ul> </div> </div> <div class="relatedlinks-title-container"> <span class="relatedlinks-title"> Related links </span> </div> <div class="relatedlinks-container"> <div class="relatedlinks"> <ul><li><a href="https://discourse.ubuntu.com/t/37214" target="_blank">Discourse: Managing the LXD snap package</a></li></ul> </div> </div> </div> </aside> </div> </div><script src="../../_static/jquery.js?v=5d32c60e"></script> <script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> <script src="../../_static/documentation_options.js?v=187304be"></script> <script src="../../_static/doctools.js?v=9bcbadda"></script> <script src="../../_static/sphinx_highlight.js?v=dc90522c"></script> <script src="../../_static/scripts/furo.js?v=46bd48cc"></script> <script src="../../_static/clipboard.min.js?v=a7894cd8"></script> <script src="../../_static/copybutton.js?v=f281be69"></script> <script src="../../_static/config-options.js"></script> <script src="../../_static/design-tabs.js?v=f930bc37"></script> <script src="../../_static/header-nav.js?v=e117ad08"></script> <script src="../../_static/footer.js?v=5acea47a"></script> <script src="../../_static/github_issue_links.js?v=32bb732f"></script> <script src="../../_static/js/bundle.js?v=a4d88309"></script> <script> const github_url = "https://github.com/canonical/lxd"; </script> </body> </html>
Copyright ©2k19 -
Hexid
|
Tex7ure