How to Install Forge on Ubuntu

The following sections will show you how to install the Forge on a machine running Ubuntu (or a containerized environment running Ubuntu).


  • Ubuntu 16.04 (or later)

Step 1: Create a Sudo User

If you don't already have a sudo user, create one. In this tutorial, the user will be called arcblock, but you can use any name you'd like.

Add the user to the sudo group and remove its password:

Finally, use visudo so that you're never prompted for a password from this user:

Your new arcblock sudo user is ready and should be used to SSH to the host and install assets whenever necessary. If you've previously used the root account, you can switch to using the sudo user as follows:

Step 2: Install Node.js

The Forge CLI requires Node.js, so we recommend installing the latest distribution:

You can verify the version of Node.js you've installed by running node -v.

Install Yarn

While Node.js ships with the npm package manager, we recommend that you install the yarn package manager as well:

Step 3: Install OpenSSL

While OpenSSL ships with Ubuntu, the version included may not be sufficiently up-to-date. Update OpenSSL as follows:

Add the OpenSSL path to your $PATH variable:

You'll also need to append /usr/local/ssl/bin to /usr/local/bin:

At this point, you'll need to logout and login for the changes you've made to take affect. After doing so, you can check your OpenSSL configuration:

Step 4: Install Erlang crypto (Optional)

If you are using Ubuntu 16.04, you'll need to install Erlang crypto so that the Erlang releases work with OpenSSL:

Step 5: Install the Forge CLI

Using Yarn, install the Forge CLI:

Add a Non-Privileged User

We don't recommend running Forge using a sudo user, so create a new non-Privileged user (in this case, we'll call it forge) and remove its password:

Switch to this user with sudo su forgeand check if Forge CLI is installed successfully with forge -h:

🎉 Forge CLI has been installed successfully! Checkout Quickstart to launch your chain!