= Snap setup
Mona Bärenfänger <mona@lightcurve.io>
:description: How to install a Lisk Core node via Snap.
// Settings
// External URLs
:url_snapcraft: https://snapcraft.io/
:url_canonical: https://canonical.com/
// Project URLs
:url_run_logging: ROOT::run-blockchain/logging.adoc
:url_devnet_passphrase: https://github.com/LiskHQ/lisk-core/blob/development/config/devnet/passphrase.json
:fn: footnote:hdd[These recommendations are derived from the log level settings, in the event that the user needs to increase storage to prevent limited memory access and potential memory-related problems with a node. Furthermore, as more transactions are processed and added to the blockchain, the size of the blockchain increases over time and this directly affects the HDD storage requirements for a blockchain node. Hence, adhering to the above listed requirements is highly recommended.]

How to set up a Lisk Core node via Snap.

== Pre-installation

=== Supported Platforms
* Ubuntu 20.04 (LTS) x86_64
* Ubuntu 22.04 (LTS) x86_64

The following platforms are not officially supported but should still function as intended: ::
* Any Linux system running systemd and AppArmor.

=== Hardware requirements

The following system requirements are recommended:

Memory::
* Machines with a minimum of 4 GB RAM for the Mainnet.

* Machines with a minimum of 2 GB RAM for the Testnet.

Storage::
* Machines with a minimum of 40 GB HDD{fn}.

== Snap

{url_snapcraft}[Snap^] is a software package management system created by {url_canonical}[Canonical^]. Snaps are sandboxed, self-contained applications.

include::partial$create-a-new-user.adoc[]

== Installation

Install Lisk Core as a snap:

[source,bash]
----
snap install lisk-core
----

== Start

After successful installation, start the node with the following command:

[tabs]
====
Mainnet::
+
--
[source,bash]
----
lisk-core start --network mainnet
----

[NOTE]
=====
The default log levels for Mainnet are:

[source,json]
----
"logger": {
    "fileLogLevel": "error",
    "consoleLogLevel": "none"
},
----

So if you start the node, it won't show any logs in the console.
This is the recommended setting for reducing the number of logs for a running node.
However, to verify that the node started correctly, update the log levels in the config to `info` or lower.

Alternatively, start the node with the following flag:

[source,bash]
----
lisk-core start --network mainnet --console-log=info
----

See the xref:{url_run_logging}[] guide for more information about logging.
=====
--
Testnet::
+
--
[source,bash]
----
lisk-core start --network testnet
----
--
Devnet::
+
--
[source,bash]
----
lisk-core start --network devnet
----
--
NOTE: The passphrase for the genesis account(s) can be found here in the Lisk Core GitHub repository under the following path: {url_devnet_passphrase}[config/devnet/passphrase.json].
====

