LitVM Watch

Independent · Community-run
LiteForge testnet · chain 4441 · live

← All stories

How to run your own Litecoin node

A complete walkthrough for Litecoin Core 0.21.5.6 on Linux — download, verify, configure, systemd, RPC, and every command you need.

Share on X

Running your own Litecoin Core node means you validate the chain yourself instead of trusting someone else's RPC. You get a private copy of the ledger, can query blocks and transactions with litecoin-cli, and you contribute a peer slot to the network.

This tutorial walks through a headless full node on Ubuntu or Debian (the usual server setup). Commands are copy-paste ready. The release used here is Litecoin Core 0.21.5.6 — check litecoin.org for a newer version and swap the version string in the URLs if one exists.

What you need

  • OS: 64-bit Linux (Ubuntu 22.04/24.04 or Debian 12 tested paths below). macOS notes at the end.
  • Disk: ~30 GB free for a full node (chain data grows over time). A pruned node needs far less (~2–5 GB) but stores only recent blocks.
  • RAM: 2 GB minimum; 4 GB+ comfortable during initial sync.
  • Network: stable broadband. Initial sync can take hours to a day+ depending on CPU, disk, and peers.
  • Ports: outbound internet required. Inbound TCP 9333 recommended so other nodes can connect to you (optional but helps the network).

You do not need a wallet on the server unless you want one. This guide keeps the wallet disabled on a dedicated node.

Step 1 — Install base packages

Update the system and install tools for download, verification, and extraction:

sudo apt update
sudo apt install -y curl gnupg ca-certificates tar bzip2

Step 2 — Download Litecoin Core

Pick the tarball that matches your CPU. Most VPS and desktop servers use x86_64:

cd /tmp
export LTC_VERSION=0.21.5.6
export LTC_TARBALL=litecoin-${LTC_VERSION}-x86_64-linux-gnu.tar.gz
export LTC_URL=https://download.litecoin.org/litecoin-${LTC_VERSION}/linux/${LTC_TARBALL}

curl -fsSLO "${LTC_URL}"
curl -fsSLO "https://download.litecoin.org/litecoin-${LTC_VERSION}/SHA256SUMS.asc"

For ARM64 (e.g. Raspberry Pi 4/5, Graviton), use litecoin-${LTC_VERSION}-aarch64-linux-gnu.tar.gz instead and adjust LTC_TARBALL.

Step 3 — Verify the release

Always verify binaries before running them. Litecoin publishes GPG verification instructions and signs SHA256SUMS.asc with release keys listed on each GitHub release.

Verify the checksums file signature:

gpg --verify SHA256SUMS.asc

If GPG reports an unknown key, import the key ID shown in the error message (or the keys listed on the release page), then run gpg --verify again until you see Good signature. A warning that the key is "not certified with a trusted signature" is normal unless you have marked the key as trusted locally.

Check the tarball hash matches the signed sums file:

grep "${LTC_TARBALL}" SHA256SUMS.asc | sha256sum -c

Expected output: ${LTC_TARBALL}: OK

Step 4 — Install binaries

Install under /opt/litecoin and symlink into /usr/local/bin:

sudo tar -xzf "${LTC_TARBALL}" -C /opt
sudo ln -sf /opt/litecoin-${LTC_VERSION}/bin/litecoind /usr/local/bin/litecoind
sudo ln -sf /opt/litecoin-${LTC_VERSION}/bin/litecoin-cli /usr/local/bin/litecoin-cli
sudo ln -sf /opt/litecoin-${LTC_VERSION}/bin/litecoin-tx /usr/local/bin/litecoin-tx

litecoind --version
litecoin-cli --version

Step 5 — Create a dedicated system user

Do not run the daemon as root:

sudo useradd --system --home /var/lib/litecoin --shell /usr/sbin/nologin litecoin
sudo mkdir -p /var/lib/litecoin /etc/litecoin
sudo chown -R litecoin:litecoin /var/lib/litecoin

Step 6 — Configure litecoin.conf

Create the config file. Replace change_me_to_a_long_random_string with a strong RPC password (only needed if you enable RPC):

sudo tee /etc/litecoin/litecoin.conf > /dev/null <<'EOF'
# Litecoin Core — headless full node
server=1
daemon=1

# Network
listen=1
maxconnections=40

# Reduce memory use on small VPS (optional)
dbcache=450

# Disable built-in wallet on a dedicated node (recommended)
disablewallet=1

# RPC — bind to localhost only; set a strong password before enabling apps
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
rpcuser=litecoinrpc
rpcpassword=change_me_to_a_long_random_string

# Logging
debug=0
EOF

sudo chown root:litecoin /etc/litecoin/litecoin.conf
sudo chmod 640 /etc/litecoin/litecoin.conf

Generate a random RPC password if you like:

openssl rand -hex 32

Paste the output into rpcpassword= in the config file.

Pruned node (less disk)

If disk space is tight, add this line before first start (cannot be changed later without re-sync):

prune=550

550 means keep roughly 550 MB of block data (minimum practical prune target in MiB). Remove or comment out prune for a full archival node.

Step 7 — First start (foreground test)

Run once as the litecoin user to confirm the binary starts and begins syncing:

sudo -u litecoin litecoind \
  -datadir=/var/lib/litecoin \
  -conf=/etc/litecoin/litecoin.conf \
  -printtoconsole

You should see log lines about loading the block index and connecting to peers. Let it run a minute, then stop with Ctrl+C.

Step 8 — Run as a systemd service

Create a unit file so the node starts on boot and restarts on failure:

sudo tee /etc/systemd/system/litecoind.service > /dev/null <<'EOF'
[Unit]
Description=Litecoin Core daemon
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/local/bin/litecoind \
  -datadir=/var/lib/litecoin \
  -conf=/etc/litecoin/litecoin.conf \
  -pid=/run/litecoin/litecoind.pid
PIDFile=/run/litecoin/litecoind.pid
RuntimeDirectory=litecoin
User=litecoin
Group=litecoin
Restart=on-failure
RestartSec=30
TimeoutStopSec=600

# Hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
ReadWritePaths=/var/lib/litecoin

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable litecoind
sudo systemctl start litecoind

Check status:

sudo systemctl status litecoind --no-pager

Follow live logs:

sudo journalctl -u litecoind -f

Step 9 — Monitor sync progress

Use litecoin-cli with the same datadir and conf:

sudo -u litecoin litecoin-cli \
  -datadir=/var/lib/litecoin \
  -conf=/etc/litecoin/litecoin.conf \
  getblockchaininfo

Important fields:

  • blocks — height your node has downloaded and validated.
  • headers — highest header chain seen. When blocks approaches headers, you are nearly caught up.
  • verificationprogress1.0 means fully synced.
  • initialblockdownloadtrue while still in IBD (initial block download).

Peer count:

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf getnetworkinfo | grep connections

Network and chain summary:

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf getnetworkinfo

Step 10 — Everyday litecoin-cli commands

Always pass -datadir and -conf if you are not running as the litecoin user with default paths.

Chain tip / block hash:

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf getbestblockhash

Block details (replace HASH):

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf getblock HASH 2

Mempool size:

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf getmempoolinfo

Stop the daemon cleanly:

sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf stop

Or via systemd:

sudo systemctl stop litecoind

Start again:

sudo systemctl start litecoind

Step 11 — Firewall (optional but recommended)

If you use ufw, allow SSH first, then Litecoin P2P:

sudo ufw allow OpenSSH
sudo ufw allow 9333/tcp comment 'Litecoin mainnet P2P'
sudo ufw enable
sudo ufw status

Port 9333 is the default mainnet P2P port. RPC stays on 127.0.0.1:9332 and should not be exposed to the public internet.

Step 12 — RPC from your own machine (SSH tunnel)

With rpcbind=127.0.0.1, RPC is only reachable on the server. From your laptop, tunnel port 9332:

ssh -L 9332:127.0.0.1:9332 user@your-server.example

Then on your laptop (with matching rpcuser / rpcpassword):

litecoin-cli -rpcconnect=127.0.0.1 -rpcport=9332 -rpcuser=litecoinrpc -rpcpassword=YOUR_PASSWORD getblockchaininfo

macOS quick path

1. Download Litecoin Core 0.21.5.6 for macOS from litecoin.org.

2. Open the .dmg, drag Litecoin Core to Applications.

3. For a headless node, use the bundled binaries in the app package, or build from source via Litecoin Core on GitHub.

4. Config file location: ~/Library/Application Support/Litecoin/litecoin.conf (create it if missing).

5. Run litecoind from the terminal or use the GUI Litecoin-Qt (runs a full node with wallet UI).

Same litecoin.conf keys apply (server=1, rpcuser, rpcpassword, optional prune).

Troubleshooting

Stuck at low block height / few peers

  • Confirm port 9333 is open outbound and optionally inbound.
  • Restart: sudo systemctl restart litecoind
  • Check bans: sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf listbanned
  • Unban if needed: sudo -u litecoin litecoin-cli -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf clearbanned

Error: Cannot obtain a lock on data directory

Another litecoind is already running. Use systemctl status litecoind or pgrep -a litecoind.

RPC connection refused

  • Ensure server=1 in config.
  • Ensure litecoind finished starting (journalctl -u litecoind -n 50).
  • Match rpcuser / rpcpassword exactly.

Disk full

  • Stop the node, free space, or reconfigure with prune=550 only after backing up and reindexing from scratch (prune cannot be enabled on an existing full chain without resync).

Reindex (corrupted or interrupted sync)

sudo systemctl stop litecoind
sudo -u litecoin litecoind -datadir=/var/lib/litecoin -conf=/etc/litecoin/litecoin.conf -reindex
# wait for completion, then use systemd again

Why this matters for LitVM

LitVM settles to Litecoin. Whether you are bridging, operating infrastructure, or simply want to verify L1 data yourself, a local LTC node is the reference client view of the base chain — independent of any third-party explorer or RPC provider.

Keep the node updated when new Litecoin Core releases ship security fixes (recent releases include important MWEB validation hardening). Upgrading is usually: stop service, replace binaries in /opt, start service.