How to Install Livebook on POP! OS Latest

Livebook is an open-source tool that provides an interactive environment for exploring and learning programming concepts in different languages. In this tutorial, we will guide you through the process of installing Livebook on POP! OS Latest.

Prerequisites

Before you start this tutorial, you'll need the following:

Step 1: Download and Install Erlang

Livebook requires Erlang to run. To install it, follow these steps:

  1. Open a terminal window.

  2. Add the Erlang Solutions repository to your system:

    $ wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
    
  3. Update the package list:

     $ sudo apt update
    
  4. Install the Erlang package:

    $ sudo apt install erlang
    

    The installation process may take a few minutes.

Step 2: Download and Install Livebook

After installing Erlang, follow these steps to install Livebook:

  1. Open a terminal window and clone the Livebook repository:

    $ git clone https://github.com/livebook-dev/livebook.git
    
  2. Change to the livebook directory:

    $ cd livebook
    
  3. Build the project using mix:

    $ mix deps.get
    $ mix compile
    

    This may take a while to complete.

  4. Install Node.js and npm:

    $ sudo apt install nodejs npm
    
  5. Install JavaScript dependencies:

    $ cd assets && npm install --prefix ./ && cd ..
    
  6. Generate a self-signed certificate for HTTPS:

    $ MIX_ENV=prod mix phx.gen.cert
    

    This generates a localhost.pem and localhost.key file in the priv directory.

  7. Start the Livebook server:

    $ SECRET_KEY_BASE=$(mix phx.gen.secret) 
    $ MIX_ENV=prod mix phx.server
    

Step 3: Access Livebook

You can access Livebook by opening a web browser and entering the following URL:

https://localhost:5000

You may get a security warning since the certificate being used is self-signed. Ignore the warning and continue to the website.

Conclusion

You have successfully installed Livebook on your system running POP! OS Latest. You can now explore the interactive programming environment for learning and experimenting with different languages.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!