Skip to content
 
 

Latest commit

 

History

22,763 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Lotus Logo

Project Lotus - 莲


Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the Filecoin Spec.

Building & Documentation

Note

The default master branch is the dev branch, please use with caution. For the latest stable version, checkout the latest release.

For complete instructions on how to build, install and setup lotus, please visit https://lotus.filecoin.io. Basic build instructions can be found further down in this readme.

Reporting a Vulnerability

Please send an email to security@filecoin.org. See our security policy for more details.

Related packages

These repos are independent and reusable modules, but are tightly integrated into Lotus to make up a fully featured Filecoin implementation:

Contributing

We welcome contributions to Lotus! Please see our Contributing Guide for more details on how to get started.

Basic Build Instructions

System-specific Software Dependencies:

Building Lotus requires some system dependencies, usually provided by your distribution.

Ubuntu/Debian:

sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y

Fedora:

sudo dnf -y install gcc make git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc hwloc-devel

For other distributions you can find the required dependencies here. For instructions specific to macOS, you can find them here.

Go

To build Lotus, you need a working installation of Go 1.25.7 or higher:

wget -c https://golang.org/dl/go1.25.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

TIP: You'll need to add /usr/local/go/bin to your path. For most Linux distributions you can run something like:

echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc && source ~/.bashrc

See the official Golang installation instructions if you get stuck.

Build and install Lotus

Once all the dependencies are installed, you can build and install the Lotus suite (lotus, lotus-miner, and lotus-worker).

  1. Clone the repository:

    git clone https://github.com/filecoin-project/lotus.git
    cd lotus/

Note: The default branch master is the dev branch where the latest new features, bug fixes and improvement are in. However, if you want to run lotus on Filecoin mainnet and want to run a production-ready lotus, get the latest release.

  1. To join mainnet, checkout the latest release.

    If you are changing networks from a previous Lotus installation or there has been a network reset, read the Switch networks guide before proceeding.

    For networks other than mainnet, look up the current branch or tag/commit for the network you want to join in the Filecoin networks dashboard, then build Lotus for your specific network below.

    git checkout <tag_or_branch>
    # For example:
    git checkout <vX.X.X> # tag for a release

    Currently, the latest code on the master branch corresponds to mainnet.

  2. If you are in China, see "Lotus: tips when running in China".

  3. This build instruction uses the prebuilt proofs binaries. If you want to build the proof binaries from source check the complete instructions. Note, if you are building the proof binaries from source, installing rustup is also needed.

  4. Build and install Lotus:

    make clean all #mainnet
    
    # Or to join a testnet or devnet:
    make clean calibnet # Calibration with min 32GiB sectors
    
    sudo make install

    This will put lotus, lotus-miner and lotus-worker in /usr/local/bin.

    lotus will use the $HOME/.lotus folder by default for storage (configuration, chain data, wallets, etc). See advanced options for information on how to customize the Lotus folder.

  5. You should now have Lotus installed. You can now start the Lotus daemon and sync the chain.

  6. (Optional) Follow the Setting Up Prometheus and Grafana guide for detailed instructions on setting up a working monitoring system running against a local running lotus node.

License

Dual-licensed under MIT + Apache 2.0


Bitquery ops — resource footprint (mainnet, archival)

Measured on our mainnet full-archive nodes (filecoin-node role, docker-compose, EnableSplitstore = false). Examples: filecoin-mainnet-4 (ph270), filecoin-mainnet-5 (ph203). Bootstrapped from a ChainSafe forest lite snapshot via DOCKER_LOTUS_IMPORT_SNAPSHOT.

Steady state (synced, serving the ETL)

resource value notes
CPU ~5 cores ~8–9% of a 64-core host; budget ~6–8 cores
RAM ~24–27 GiB RSS budget ≥32 GiB
Disk (datastore) ~2.7 TB, +~1.6 TB/yr archival badger, splitstore off → grows continuously (no GC)
Disk read IO ~1.9 GB/s sustained avg badger read-amplification on the archive → NVMe required; SATA/HDD will lag the ETL
Disk write IO ~0.4 MB/s avg
Network ~2 Mbit/s in / ~3 Mbit/s out (~18 / 29 GB per day) libp2p gossip
shm 4 GB compose shm_size

Bootstrap / first sync (from a same-day forest snapshot)

phase measured notes
paramfetch ~2 GB pulled minutes; from proofs.filecoin.io
snapshot download ~49 GB network-in forest lite snapshot (.car.zst)
snapshot import ~227 GB badger writes → ~74 GB on disk write-heavy burst
header validation fetches ~6.3M headers back toward genesis the long pole
RAM during bootstrap ~17 GiB
time to working state ~2–6 h forward catch-up is negligible when the snapshot is current; time is dominated by import + header validation

State availability after a lite-snapshot bootstrap: queryable state (StateGetActor / StateReplay / StateCompute) exists from ~(snapshot_height − 2000 epochs) forward. Older blocks retain chain/messages but no state — deep historical re-processing must go to an archival RPC peer (e.g. Glif) or a datastore seeded from an existing archive node.

Host guidance

  • NVMe for the datastore (not HDD/SATA) — the ~GB/s read amplification dominates.
  • ≥6 TB free → ~2.5 yr archival runway (2.7 TB + ~1.6 TB/yr).
  • ≥32 GiB RAM, ~8 cores.
  • To cap disk instead of running full-archive, enable splitstore + discard-cold (keeps a bounded hot window; loses deep re-processing → falls back to archival RPC).

About

Implementation of the Filecoin protocol, written in Go

Resources

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages