Upgrading from a previous version
How to upgrade Erigon to the latest release
Note: Always make sure to check the Release Page for specific upgrade notes or potential migration steps between versions, as certain updates might require additional steps or caution.
MacOS and Linux
To upgrade Erigon to a newer version when you've originally installed it via Git and manual compilation, you should follow these steps without needing to delete the entire folder:
Terminate your Erigon session by pressing
CTRL+C
Navigate to your Erigon directory: Open your terminal and change to the directory containing your Erigon installation. If you followed the original instructions, this should simply be:
Fetch the latest changes from the repository: You need to make sure your local repository is up-to-date with the main GitHub repository. Run:
Check out the latest version and switch to it using:
Replace
<new_version_tag>
with the version tag of the new release, for example:Rebuild Erigon: Since the codebase has changed, you need to compile the new version. Run:
This process updates your installation to the latest version you specify, while maintaining your existing data and configuration settings in the Erigon folder. You're essentially just replacing the executable with a newer version.
Homebrew
If you used Homebrew for installation simply run the following command to update to the latest release:
This command will handle all the necessary updates automatically.
Docker
If you're using Docker to run Erigon, the process to upgrade to a newer version of the software is straightforward and revolves around pulling the latest Docker image and then running it. Here's how you can upgrade Erigon using Docker:
Pull the Latest Docker Image: First, find out the tag of the new release from the Erigon Docker Hub page. Avoid using the
latest
andstable
tags since they may not always point to the most reliable versions. Once you know the tag, pull the new image:Replace
<new_version_tag>
with the actual version tag you wish to use. For example:List Your Docker Images: Check your downloaded images to confirm the new image is there and get the new image ID:
Stop the Running Erigon Container: If you have a currently running Erigon container, you'll need to stop it before you can start the new version. First, find the container ID by listing the running containers:
Then stop the container using:
Replace
<container_id>
with the actual ID of the container running Erigon.Remove the Old Container: (Optional) If you want to clean up, you can remove the old container after stopping it:
Run the New Image: Now you can start a new container with the new Erigon version using the new image ID:
You can append additional options to the command as required, for example:
Verify Operation: Ensure that Erigon starts correctly and connects to the desired network, verifying the logs for any initial errors.
By following these steps, you'll keep your Docker setup clean and up-to-date with the latest Erigon version without needing to manually clean up or reconfigure your environment. Docker's ability to encapsulate software in containers simplifies upgrades and reduces conflicts with existing software on your machine.
Last updated