How to start lotus #7352
Locked
de-authority
started this conversation in
Tutorials
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How to start the program
You can run lotus in any way you are familiar with, such as screen, tmux, nohup, systemd, but it is important to make it easy to operate and to keep a good log for debugging purposes.
The following are two of the more commonly used methods,Let's take the example of running lotus-miner and explain how to run the program
1. nohup
You can run lotus via nohup and redirect the logs to a file. Before running this command you need to configure your environment variables
Here's a little tip:
When you have finished running the program, try to exit by typing exit instead of closing the terminal. Some community members have reported that closing the terminal directly causes lotus-worker to exit (assuming you run lotus-worker this way) . You can see this discussion
2. systemd
Related docs here , you can install service (in the lotus source code directory) by run
But you need to modify the service file according to the following tips.
Tip 1:
Always specify the running user in the service file.And the system will not read the user's environment variables, so you have to configure all the environment variables in the service file for the application to run.
You can either configure it directly in the service file or have the service file read the environment variable file. And remember to import the program runtime environment variables into the user environment variables.
Usually you can import to ~/.bashrc /etc/profile
Tip 2:
You need to create the log directory manually, usually /var/log/lotus, and specify the owner of the directory as the user running the service
examples
content of ~/filecoin/miner.env
Beta Was this translation helpful? Give feedback.
All reactions