diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9a9eb59..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: ci -on: - push: - branches: - - master - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - uses: actions/cache@v4 - with: - key: ${{ github.ref }} - path: .cache - - run: pip install -r requirements.txt - - run: mkdocs gh-deploy --force diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c086726..0000000 --- a/.gitignore +++ /dev/null @@ -1,170 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# UV -# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -#uv.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/latest/usage/project/#working-with-version-control -.pdm.toml -.pdm-python -.pdm-build/ - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ - -# PyPI configuration file -.pypirc diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..91d8d5a --- /dev/null +++ b/404.html @@ -0,0 +1,2134 @@ + + + +
+ + + + + + + + + + + + + + +Adding Two-Factor Authentication (2FA) to Cockpit increases the security of your server by requiring a time-based one-time password (TOTP) in addition to your regular credentials.
+The Web3 Pi team developed a plugin to easily enable 2FA in Cockpit using a graphical interface. Alternatively, you can manually configure 2FA using the libpam-google-authenticator package.
Navigate to the Web3 Pi Updater section in Cockpit and install Two Factor Authentication Plugin for Cockpit:

Alternatively, you can install the plugin manually by opening a terminal and running the following command:
+ +Note
+Cockpit will restart after the installation of the plugin, so you may need to refresh the page and log in again.
+After installing the plugin, navigate to the Web3 Pi 2FA section in Cockpit:

Click Enable Two-Factor Authentication to start the setup process.

Follow the on-screen instructions to set up 2FA:
+Note
+Scratch codes are one-time use only. If you lose access to your authenticator app, enter one of these codes to log in and recreate your 2FA setup.
+
To remove 2FA from Cockpit, navigate back to the Web3 Pi 2FA section and click Disable Two-Factor Authentication.

Open a terminal and run:
+ +This installs the PAM module for Google Authenticator.
+Run the following command to set up Google Authenticator with recommended options:
+ +Note
+-t use TOTP instead of HOTP (recommended).-d disable reuse of previously used TOTP tokens.-f disable confirmation before writing the ~/.google_authenticator file.-r 3 -R 30 limits the number of login attempts to 3 every 30 seconds.-W by default google-authenticator allows the use of codes that were generated a little before or a little after the current time. This option disables that feature (recommended for security).-Q UTF8 specifies the encoding for the QR code. Change to -Q ANSI if you're having issues with viewing the QR code.Note
+Scratch codes are one-time use only. If you lose access to your authenticator app, enter one of these codes to log in and recreate your 2FA setup.
+Use the following command to add the Google Authenticator PAM module to the Cockpit PAM configuration:
+ +This tells Cockpit to require a TOTP code during login.
+Note
+nullok option disables 2FA for users that do not have a ~/.google_authenticator file.Restart the Cockpit service to apply the changes:
+ +
To remove 2FA from Cockpit, simply delete the line you added to the PAM configuration:
+ +Then restart the Cockpit service:
+ +You can also remove the generated ~/.google_authenticator file and the installed packages if you no longer need 2FA:
There are two things that can be tweaked on the Raspberry Pi 5 to increase Ethereum Node performance.
+Note about PCIe generation settings
+This makes sense only if using a PCIe to m.2 adapter for storage.
+By default, the Raspberry Pi 5 CPU clock is set to 2.4 GHz, but it is relatively easy to overclock. An overclocked CPU with a significant load will require an active cooling solution or a high-quality cooling case.
+The maximum stable clock that can be achieved depends on a particular device.
+Safe for all devices is 2.6 GHz. +The reasonable top is 3.0 GHz.
+The Raspberry Pi has enough power to handle an Ethereum node without OC, so our recommendation is to keep stable settings like 2.6 GHz.
+[pi5] section, almost at the end of the file. Look for this comment:
+ Ctrl+x and save the changes.It should output 2600000
If the procedure is successful, the device should be up and running with the updated OC settings.
+For more information about overclocking the Raspberry Pi 5, please visit:
+https://www.jeffgeerling.com/blog/2023/overclocking-and-underclocking-raspberry-pi-5
+The Raspberry Pi by default uses PCIe gen 2. But the Broadcom BCM2712 offers PCIe generation 3, which is twice as fast. +By default, it is set to gen 2 because of compatibility reasons with different adapters. +In most cases, you can safely set it to gen 3, which can double the performance of the NVMe drive.
+[pi5] section, almost at the end of the file. Look for this comment:
+ Ctrl+x and save the changes.For more information, please visit: https://www.jeffgeerling.com/blog/2023/nvme-ssd-boot-raspberry-pi-5
+To overclock the Raspberry Pi 4, you need to edit the config.txt file located in the /boot/firmware/ directory.
+Access the File:
+Open a terminal on your Raspberry Pi.
+config.txt file using a text editor such as nano.Add Overclocking Settings:
+Uncomment the following lines near the end of the config.txt file. Adjust the values based on your desired overclock settings and the stability of your system.
Explanation:
+over_voltage=6: Increases the core voltage. Values range from 0 to 8. Higher values increase stability but also generate more heat.arm_freq=1800: Sets the CPU frequency to 1800 MHz (1.8 GHz).gpu_freq=600: Sets the GPU frequency to 600 MHz.
Save and Reboot:
+Save the file (Ctrl+O and Enter in nano) and exit the text editor (Ctrl+X in nano).
Overclocking the Raspberry Pi Compute Module 4 (CM4) is similar to overclocking the Raspberry Pi 4, but there are a few key differences to consider due to the form factor and intended use cases of the CM4.
+config.txt file located in the /boot directory for overclocking settings.Overclocking Parameters:
+Parameters such as over_voltage, arm_freq, and gpu_freq are used in the same way to adjust voltage, CPU frequency, and GPU frequency.
Monitoring and Testing:
+Form Factor and Cooling:
+The CM4 is designed to be used with custom carrier boards, which may affect cooling solutions. Ensure your carrier board design allows for adequate cooling, especially when overclocking.
+Power Supply:
+Monitor Temperatures
+Use tools like vcgencmd to monitor the temperature of your Raspberry Pi.
Ideally, temperatures should remain below 85°C. If temperatures are higher, consider improving your cooling solution.
+Stress Test
+Run stress tests to ensure stability. The stress tool can be used for this purpose.
Check for Throttling
+Use vcgencmd to check if the Raspberry Pi is throttling due to high temperatures or insufficient power.
0x0 indicates no throttling.Overclocking the Raspberry Pi can provide significant performance improvements, making it more capable for an Ethereum node. However, it is crucial to approach overclocking with caution, ensuring adequate cooling and power supply, and thoroughly testing for stability. By following these guidelines, you can safely and effectively overclock your Raspberry Pi to meet your performance needs.
+ + + + + + + + + + + + + +Web3 Pi utilizes a central configuration file, /boot/firmware/config.txt, to manage both its own settings (like which clients to run and network selection) and the underlying Raspberry Pi hardware configuration (like boot options, hardware interfaces, and overclocking).
This file is read by the Raspberry Pi firmware during the early boot process.
+For most users, the default settings generated by the Web3 Pi Imager are sufficient and should not need modification. This page is intended for advanced users who understand the implications of changing these parameters.
+⚠️ WARNING: Incorrectly editing /boot/firmware/config.txt can prevent your Raspberry Pi from booting correctly or cause your Ethereum node clients to malfunction. Always back up the file before making changes.
The configuration file is located at:
+/boot/firmware/config.txt
You will need root privileges to edit this file. Connect via SSH and use a text editor like nano:
# First, create a backup
+sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.backup
+
+# Then, edit the file
+sudo nano /boot/firmware/config.txt
+After saving changes, you must reboot your Raspberry Pi for them to take effect:
+ +These sections control the behavior of the Web3 Pi software suite.
+geth=true|false: Enables or disables the Geth execution client service (w3p_geth).nimbus=true|false: Enables or disables the Nimbus consensus client service (w3p_nimbus-beacon).lighthouse=true|false: Enables or disables the Lighthouse consensus client service (w3p_lighthouse-beacon). (Note: Typically, only one consensus client should be enabled).influxdb=true|false: Enables or disables the InfluxDB time-series database service (for monitoring).grafana=true|false: Enables or disables the Grafana dashboard service (for monitoring).bsm=true|false: Enables or disables the Basic System Monitor service.bnm=true|false: Enables or disables the Basic Eth2 Node Monitor service.exec_url=http://localhost:8551: Specifies the URL the consensus client uses to connect to the execution client's Engine API. The default assumes both clients are on the same machine.eth_network=mainnet|sepolia|hoodi|...: Crucially, sets the target Ethereum network for all clients. Must match the network you intend to sync.geth_port=30303: Sets the P2P port Geth uses for peer discovery and communication.nimbus_port=9000: Sets the P2P port Nimbus uses.lighthouse_port=9000: Sets the P2P port Lighthouse uses.Make sure to update the UFW Firewall after changing these ports.
+The rest of the config.txt file contains standard Raspberry Pi configuration directives, grouped under conditional filters like [all], [pi4], [pi5], [cm4], etc. These control hardware aspects:
+kernel, cmdline, initramfs) Defines how the Linux kernel is loaded.dtparam=audio, i2c_arm, spi, enable_uart) Enables or disables onboard hardware like audio, I2C, SPI, and serial ports.disable_overscan, hdmi_drive, hdmi_force_hotplug, display_auto_detect) Configures HDMI output behavior.dtoverlay=vc4-kms-v3d) Configures the graphics driver.camera_auto_detect) Auto-detects connected cameras.dtoverlay=dwc2, usb_max_current_enable) Configures USB ports, including enabling higher current output on Pi 5.dtparam=pciex1, dtparam=pciex1_gen=3) Important for NVMe drives. Enables the PCIe interface and sets its speed (Gen 2 or Gen 3). Web3 Pi typically enables Gen 3 for better NVMe performance.For an exhaustive explanation of all standard Raspberry Pi config.txt options, refer to the official documentation:
+ +Remember to exercise caution when editing this file. Stick to the defaults unless you have a specific need and understand the parameter you are changing.
+ + + + + + + + + + + + + +This section provides advanced setup guides for your Web3 Pi node that aim to optimize your node's performance and reliability. None of these steps are required, but they can help you achieve better uptime and reduce maintenance burden.
+Power over Ethernet (PoE) is a networking feature that allows network cables to carry electrical power in addition to data. By using PoE, you can power your Web3 Pi Raspberry Pi using the same Ethernet cable that provides its network connection, eliminating the need for a separate USB-C power adapter.
+This can simplify cable management and potentially allow for centralized power backup if your network switch is connected to a UPS.
+Web3 Pi includes and enables UFW (Uncomplicated Firewall) by default to provide a baseline level of network security for your node. UFW is a user-friendly frontend for managing the underlying iptables firewall rules on Linux systems like Ubuntu.
Its primary purpose is to control incoming and outgoing network traffic, ensuring that only necessary connections are allowed, thus reducing the potential attack surface of your device.
+DENY - All incoming connections are blocked unless explicitly allowed by a specific rule.ALLOW - All outgoing connections initiated by the Raspberry Pi are permitted.The Web3 Pi installation script configures UFW to allow incoming traffic on the specific ports required for node operation, management, and monitoring based on your configuration choices during setup. The standard ports opened are:
+| Port | +Protocol | +Service | +Purpose | +
|---|---|---|---|
22 |
+TCP | +SSH | +Secure remote command-line access | +
80 |
+TCP | +Installation Monitor / Status Page | +Viewing setup progress and basic status | +
3000 |
+TCP | +Grafana Dashboard | +Viewing node performance and health | +
5353 |
+UDP | +mDNS (Avahi Daemon) | +Hostname discovery (e.g., web3pi.local) |
+
7197 |
+TCP | +Basic System Monitor JSON API | +Programmatic access to monitoring data | +
8545 |
+TCP | +Execution Client JSON-RPC (Geth) | +Wallet connections | +
8546 |
+TCP | +Execution Client WebSocket RPC (Geth) | +WebSocket connections for dApps/tools | +
8551 |
+TCP | +Execution Client Engine API (Geth) | +Communication between EL & CL clients | +
9090 |
+TCP | +Cockpit System Dashboard | +Web-based system management | +
9000 (default) |
+TCP & UDP | +Consensus Client P2P (Lighthouse/Nimbus) | +Peer discovery and communication | +
30303 (default) |
+TCP & UDP | +Execution Client P2P (Geth) | +Peer discovery and communication | +
You can view the current UFW status and the list of active rules by connecting via SSH and running the following commands:
+ +To add a new port, use the ufw allow command. For example, to allow incoming TPC traffic on port 12345, run the following command:
To remove a port, use the ufw delete command. It's recommended to use the ufw status numbered command to identify the rule number before deleting it. For example, to delete the rule with the number 100, run the following command:
Running a full Ethereum node on Raspberry Pi, especially in projects like Web3 Pi, requires consistent and stable power. A power outage or fluctuation can result in corrupted data since the node continuously writes to storage. In addition, even if you live in a region with seemingly stable electricity, brief voltage dips or surges can occur unnoticed, potentially causing instability, freezing, or unexpected reboots of your Raspberry Pi.
+For optimal reliability, power backup systems should ideally cover not just the Raspberry Pi but the entire network path (e.g., routers and switches). However, even just powering the Raspberry Pi can significantly enhance stability.
+
+
+
There are two primary solutions for providing backup power to Raspberry Pi:
+Geekworm X1200 2-Cell 18650 5.1V 5A UPS HAT
+The installation and configuration processes for these UPS devices are detailed on their respective product pages. Refer to the manufacturer's guides for precise instructions.
+We highly recommend using a power backup solution to enhance the stability of your Ethereum node and reduce potential problems caused by power interruptions.
+For Ethereum Solo Staking, power backup is critical. A reliable power supply minimizes downtime, ensures data integrity, and helps avoid penalties related to missed attestations or blocks.
+ + + + + + + + + + + + + +