20.4.1 • Published 6 days ago

@filecoin-station/core v20.4.1

Weekly downloads
-
License
(Apache-2.0 AND M...
Repository
github
Last release
6 days ago

Station Core is a headless version of Filecoin Station suitable for running on all kinds of servers.

CI

Deployment

Station Core supports different deployment options:

Installation

Note: Station Core requires Node.js, we recommend using the latest LTS version. You can install Node.js using your favorite package manager or get the official installer from Node.js downloads.

With Node.js installed, run npm to install Station Core.

$ npm install -g @filecoin-station/core

Usage

$ FIL_WALLET_ADDRESS=... PASSPHRASE=... station

Common Configuration

Station Core is configured using environment variables (see The Twelve-Factor App).

The following configuration options are shared by all Station commands:

  • $CACHE_ROOT (string; optional): Station stores temporary files (e.g. cached data) in this directory. Defaults to
    • Linux: ${XDG_CACHE_HOME:-~/.cache}/filecoin-station-core
    • macOS: ~/Library/Caches/app.filstation.core
    • Windows: %TEMP%/Filecoin Station Core
  • $STATE_ROOT (string; optional): Station stores logs and module state in this directory. Defaults to

    • Linux: ${XDG_STATE_HOME:-~/.local/state}/filecoin-station-core
    • macOS: ~/Library/Application Support/app.filstation.core
    • Windows: %LOCALAPPDATA%/Filecoin Station Core

    IMPORTANT: The$STATE_ROOT directory must be local to the computer running the Station. This directory must not be shared with other computers operated by the user, e.g. via Windows Domain profile or cloud storage like iCloud Drive, Dropbox and OneDrive.

Commands

$ station

Start a new Station process. The Station will run in foreground and can be terminated by pressing Ctrl+C.

This command has the following additional configuration in addition to common the configuration options described in Common Configuration:

  • FIL_WALLET_ADDRESS (string; required): Address of the Filecoin wallet that will receive rewards. The value must be a mainnet address starting with f410, 0x.

    f1 addresses currently are not supported. Rewards for Station operators are administered by a FEVM smart contract. It is currently technically complex to make payments to f1 addresses.

    If you just want to give core a quick spin, you can use the address 0x000000000000000000000000000000000000dEaD. Please note that any earnings sent there will be lost.

  • PASSPHRASE (string; optional): a passphrase to protect the Station instance private key stored in a file inside the STATE_ROOT directory.

  • MODULE_FILTER (string; optional): Run only the Zinnia module with the given name. Eg:

    • MODULE_FILTER=spark
    • MODULE_FILTER=voyager

This command outputs metrics and activity events:

$ station
{
  "totalJobsCompleted": 161,
  "rewardsScheduledForAddress": "0.041033208757289921"
}
[4/19/2023, 9:26:54 PM] INFO  Saturn Node will try to connect to the Saturn Orchestrator...
[4/19/2023, 9:26:54 PM] INFO  Saturn Node was able to connect to the Orchestrator and will now start connecting to the Saturn network...
...
$ station --json
{"type":"jobs-completed","total":161}
{"type":"activity:info","module":"Saturn","message":"Saturn Node will try to connect to the Saturn Orchestrator..."}
{"type":"activity:info","module":"Saturn","message":"Saturn Node was able to connect to the Orchestrator and will now start connecting to the Saturn network..."}
...

For the JSON output, the following event types exist:

  • jobs-completed
    • total
  • activity:info
    • module
    • message
  • activity:error
    • module
    • message

Set the flag --experimental to run modules not yet considered safe for production use. Run this at your own risk!

No modules currently in experimental mode.

$ station --help

Show help.

$ station --help
Usage: station [options]

Options:
  -j, --json          Output JSON                                      [boolean]
      --experimental  Also run experimental modules                    [boolean]
  -v, --version       Show version number                              [boolean]
  -h, --help          Show help                                        [boolean]

$ station --version

Show version number.

$ station --version
@filecoin-station/core: 1.0.1

Docker

Deploy Station with Docker. Please replace FIL_WALLET_ADDRESS.

$ docker run \
	--name station \
	--detach \
	--env FIL_WALLET_ADDRESS=0x000000000000000000000000000000000000dEaD \
	ghcr.io/filecoin-station/core

Manual Deployment (Ubuntu)

On a fresh Ubuntu machine:

# Install node.js
$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

# Install core
$ npm install -g @filecoin-station/core

# Create systemd service
# Don't forget to replace FIL_WALLET_ADDRESS and User
$ sudo tee /etc/systemd/system/station.service > /dev/null <<EOF
[Unit]
Description=Filecoin Station Core
Documentation=https://github.com/filecoin-station/core
After=network.target

[Service]
Environment=FIL_WALLET_ADDRESS=XYZ
Type=simple
User=XYZ
ExecStart=/usr/bin/station
Restart=always

[Install]
WantedBy=multi-user.target
EOF

# Start service
$ sudo systemctl daemon-reload
$ sudo systemctl start station
$ sudo systemctl status station

# Read logs
$ journalctl -u station.service

Disclaimer

The CLI uses Sentry for error tracking. InfluxDB is used for stats.

Development

Publish a new version:

$ npm run release
20.3.0

7 days ago

20.4.1

6 days ago

20.4.0

7 days ago

20.2.1

14 days ago

20.2.0

14 days ago

20.1.18

17 days ago

20.1.17

23 days ago

20.1.16

28 days ago

20.1.14

1 month ago

20.1.15

1 month ago

20.1.10

1 month ago

20.1.11

1 month ago

20.1.12

1 month ago

20.1.13

1 month ago

20.1.8

1 month ago

20.1.9

1 month ago

20.1.7

1 month ago

20.1.6

2 months ago

20.1.4

2 months ago

20.1.5

2 months ago

20.1.3

2 months ago

20.1.2

2 months ago

20.1.1

3 months ago

20.1.0

3 months ago

20.0.0

3 months ago

19.0.1

3 months ago

19.0.2

3 months ago

19.0.0

3 months ago

18.1.5

3 months ago

18.1.4

3 months ago

18.1.3

3 months ago

18.1.2

3 months ago

18.1.1

3 months ago

18.1.0

3 months ago

18.0.2

3 months ago

18.0.1

3 months ago

18.0.0

3 months ago

17.0.3

3 months ago

17.0.2

3 months ago

17.0.1

4 months ago

17.0.0

4 months ago

16.3.3

4 months ago

16.3.2

4 months ago

16.3.1

4 months ago

16.3.0

5 months ago

16.2.0

5 months ago

16.1.1

5 months ago

16.1.0

5 months ago

16.1.0-0

6 months ago

14.1.0

8 months ago

14.3.0

7 months ago

15.0.0

6 months ago

13.4.2

10 months ago

13.4.3

9 months ago

14.0.0

9 months ago

14.2.0

8 months ago

14.4.0

7 months ago

14.4.1

7 months ago

14.4.2

6 months ago

16.0.2

6 months ago

16.0.1

6 months ago

16.0.0

6 months ago

13.4.1

11 months ago

13.3.1

11 months ago

13.1.1

11 months ago

13.3.0

11 months ago

13.1.2

11 months ago

13.1.0

11 months ago

13.4.0

11 months ago

13.0.4

11 months ago

13.2.0

11 months ago

13.0.3

11 months ago

5.1.0

1 year ago

10.0.0

1 year ago

10.0.1

12 months ago

10.0.2

12 months ago

10.0.3

12 months ago

2.2.0

1 year ago

2.0.2

1 year ago

2.4.0

1 year ago

2.6.0

1 year ago

7.1.1

1 year ago

2.0.1

1 year ago

7.1.0

1 year ago

2.0.0

1 year ago

8.1.0

1 year ago

12.0.0

11 months ago

3.0.0

1 year ago

4.0.0

1 year ago

11.0.0

12 months ago

5.2.1

1 year ago

5.2.0

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

2.3.0

1 year ago

2.1.1

1 year ago

2.5.0

1 year ago

2.5.1

1 year ago

13.0.2

11 months ago

13.0.0

11 months ago

7.0.0

1 year ago

13.0.1

11 months ago

7.2.2

1 year ago

7.2.1

1 year ago

7.2.0

1 year ago

2.1.0

1 year ago

8.0.1

1 year ago

8.0.0

1 year ago

4.1.0

1 year ago

9.0.0

1 year ago

11.1.0

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago