<p>I'm afraid that there are more than 4 ways to setup an environment to follow the Plutus Pioneer Program, considering all the combinations of operating systems, virtualization options and application packaging.</p>
<p>The first thing to decide is if we're going to use some kind of virtualization technology to isolate the environment. In my experience this is highly recommended because:</p>
<ul>
<li>you avoid possible incompatibilities with your host operating system and any already installed software, specially on development systems with many package managers deployed.</li>
<li>it keeps your host clean so you can easily start over from a clean state if things go wrong.</li>
<li>it allows you to choose a base system that is known to work well independently from your host system.</li>
<li>it creates a certain degree of independence from the physical layer (depending on the technology used), to the point where you may decide to setup the exact same environment in the cloud as you don't have the free resources needed in your local computer.</li>
</ul>
<p>Now, you have two main options to virtualize the environment, a Docker container or a virtual machine.</p>
<ul>
<li><p>The Docker option requires that, after installing the software, you run an image that someone has previously built (quick and reproducible option), or that you build it yourself using a Dockerfile. In my opinion it may make sense if someone is maintaining images for each week's environment version, with everything already compiled, aiming to save some time, otherwise a virtual machine can offer more flexibility for this use case, persisting changes without much overhead, and allowing to experiment in a more comfortable way.</p>
</li>
<li><p>The virtual machine option requires that you install a virtualization software, for example Virtualbox, to deploy a local instance, or that you deploy a cloud instance, for example an AWS EC2, and then that you choose/install your preferred operating system, and finally on top of that install the toolset required to compile the Plutus environment. This can be a bit confusing the first time if you're not used to the tools, i.e. nix, cabal, etc...</p>
</li>
</ul>
<p>Be aware that in previous iterations we needed to weekly recompile the environment to make the code samples work, as a consequence of the Playground being under heavy development.</p>
<p>Fortunately the community made an effort to further document the process for a variety of scenarios, and made it available at the website:</p>
<p><s>https://docs.plutus-community.com/</s></p>
<p><a href="https://plutus-community.readthedocs.io/" rel="nofollow noreferrer">https://plutus-community.readthedocs.io/</a></p>
<p>Please consider contributing to the following repository:</p>
<p><a href="https://github.com/input-output-hk/plutus-community" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-community</a></p>
<p>There's an option that in my opinion takes the best of both worlds for this use case, which is to make use of Vagrant to get a running virtual machine but automating all the initial setup process. You can find instructions on the previous links for a Vagrant+Ubuntu setup.</p>
<p>I wanted to use Vagrant+NixOS for its deterministic nature and its native integration with part of the required toolset, so I developed a Vagrant file and a set of scripts to automate the setup process that can be found here:<br />
<a href="https://github.com/jmhoms/plutus-pioneer-nixos-vagrant" rel="nofollow noreferrer">https://github.com/jmhoms/plutus-pioneer-nixos-vagrant</a></p>
<p>I plan to follow this third iteration that is about to start, and I'll try to update the scripts as the course moves forward.</p>
<p>I hope this helps.</p>
<p>Cheers!
Josep</p>

CC BY-SA 4.0
2022-01-11T20:01:38.493Z
I am not familiar with Vagrant, does it have the problem you described for docker of relying on "someone maintaining images for each week's environment version"?
Mateus
CC BY-SA 4.0
2022-01-11T20:19:30.817Z
Definetly! For the sake of the learning I will go for an Ubunti virtual box on my windows machine. Then I am gonna use NIX to get the plutus development env and recompile it.

The fact that everithing is under heavy development make things much more exciting!
Angelo Badellino
CC BY-SA 4.0
2022-01-11T21:04:30.350Z
Mateus, think about Vagrant as a wrapper to easily setup for you (just with a couple of cmd lines) an underlying Virtualbox (or others) virtual machine from a pre made image. At the end, you'll have an operating system with the Plutus toolset compiled. Obviously if some weekly exercise requires a different Playground git commit, you'll need to recompile. For this reason I created a git project with a Vagrantfile that takes care of the initial setup, and some scripts that compile the right commit for each week of iteration 2. I plan to do the same for iteration 3.
Josep M Homs
CC BY-SA 4.0
2022-01-11T21:48:04.017Z
So yes, sort of same issue with Vagrant. In my vagrant-nixos scripts, even if nobody takes care of updating them, you should only need to pass the proper commit id (which is specified inside the weekly project file) to the generic script to get the same result. The existent Docker options probably work in a similar way to update the environment, I guess it makes sense to just change the commit id and recreate the image. So in neither case you're really dependant on someone else updating it, but just saving lot of time IF using an image provided by someone else with the environment precompiled.
Josep M Homs
CC BY-SA 4.0
2022-01-12T05:00:17.910Z
VirtrualBox is not supported on Apple M1 arm64 architecture. Is it still possible to leverage virtual machines?
Kevin Bedell
CC BY-SA 4.0
2022-01-12T12:20:53.773Z
Kevin, I'd suggest that you open a new topic for this question, but basically you could use Parallels ( https://www.parallels.com/ ) or maybe a solution based on QEMU. As an alternative, you could run the VM in a cloud provider paying for usage time, or even use a Docker container locally (I think a flag exist to run Intel images on your ARM computer, which would save some time). Cheers!
Josep M Homs
CC BY-SA 4.0
2022-07-15T21:20:49.447Z
For those coming now, you can find the new docs website here https://plutus-community.readthedocs.io/
Mateus
CC BY-SA 4.0
2022-01-11T18:08:42.433Z
2022-07-17T17:03:21.223Z
2022-07-17T17:03:21.223Z
Josep M Homs
<p>I agree that Nix is the way to go as it will give you the same processes the Plutus educators and devs are working in. Be sure to follow the instructions offered after the webportal went down.</p>
<p>I went with the canonical <code>plutus-apps repo</code> build for the playground. It is the 3rd option off of the document shared after the portal dropped:</p>
<pre><code>**[Plutus Env: Setup Starter Pack].**
</code></pre>
<p>BTW, I am using <code>ubuntu 21.04</code>. I have also done the same install on a straight debian build. Sometime over the next couple days I will do the build on my Win10 laptop (dual booting with the Ubuntu).</p>
<p><em>I hope this helps &amp; Good luck!</em></p>

CC BY-SA 4.0
2022-01-12T12:50:06.760Z
2022-01-12T12:50:06.760Z
Troy Bertolino
<p>Indeed. I would prefer using Linux, Ubuntu. Saves you lots of time. You can run it together with a windows installation. Building the shell with Nix is the way to go. I have set up instructions over here .. also Mac and Windows.</p>
<p><a href="https://drive.google.com/file/d/1u6QDsZCPnZQ_QiV8hBihgfFh82iTFs7M/view" rel="nofollow noreferrer">https://drive.google.com/file/d/1u6QDsZCPnZQ_QiV8hBihgfFh82iTFs7M/view</a></p>

CC BY-SA 4.0
2022-01-14T04:23:38.370Z
We're a little different from other sites; this isn't a discussion forum but a Q&A site, where we reserve the answer space for answers. Please check out our short [tour]. Could you please [edit] this to more directly address the question? Thanks.
gRebel
CC BY-SA 4.0
2022-01-13T10:16:01.847Z
2022-01-13T10:16:01.847Z
7robbie5
<p>Typically the team loads all new working code to the Nix container. Additionally, it is more compatible with Haskell/Plutus because it is also written under functional paradigm. I tend to suggest everyone using Nix, once you get familiar everything flows smoothly.</p>
<p>You should check at this set up from the First iteration (for your preferred OS):</p>
<p><a href="https://docs.plutus-community.com/docs/setup/Ubuntu.html" rel="nofollow noreferrer">https://docs.plutus-community.com/docs/setup/Ubuntu.html</a></p>
<p>Note that the lectures are outdated but the set up is the same</p>

CC BY-SA 4.0
2022-01-11T14:43:22.177Z
2022-01-11T14:43:22.177Z
Igodlab
<p>I am starting the Pioneer program by setting up the development environment. There are several ways to do that, I think 4!</p>
<p>At the end the two that seems to me more appealing are the one using nix or the one using docker.</p>
<p>The former complex but allows you to create an environment that is more up-to-date.
The latter is more easy (at least for me) and less time consuming.</p>
<p>Is there any real advantage to use the former?
Can we encounter some limitation by following the latter?</p>

<plutus-pioneer-program>
Plutus environment set up: pro and cons
# Plutus environment set up: pro and cons

(Asked by: username_0 on 2022-01-11)

I am starting the Pioneer program by setting up the development environment. There are several ways to do that, I think 4!

At the end the two that seems to me more appealing are the one using nix or the one using docker.

The former complex but allows you to create an environment that is more up-to-date.
The latter is more easy (at least for me) and less time consuming.

Is there any real advantage to use the former?
Can we encounter some limitation by following the latter?

**Tags:** plutus-pioneer-program

---

## 4 answers

### Answer by username_1 on 2022-01-11. Score: 9 | Accepted answer

I'm afraid that there are more than 4 ways to setup an environment to follow the Plutus Pioneer Program, considering all the combinations of operating systems, virtualization options and application packaging.

The first thing to decide is if we're going to use some kind of virtualization technology to isolate the environment. In my experience this is highly recommended because:

* you avoid possible incompatibilities with your host operating system and any already installed software, specially on development systems with many package managers deployed.
* it keeps your host clean so you can easily start over from a clean state if things go wrong.
* it allows you to choose a base system that is known to work well independently from your host system.
* it creates a certain degree of independence from the physical layer (depending on the technology used), to the point where you may decide to setup the exact same environment in the cloud as you don't have the free resources needed in your local computer.

Now, you have two main options to virtualize the environment, a Docker container or a virtual machine.

* The Docker option requires that, after installing the software, you run an image that someone has previously built (quick and reproducible option), or that you build it yourself using a Dockerfile. In my opinion it may make sense if someone is maintaining images for each week's environment version, with everything already compiled, aiming to save some time, otherwise a virtual machine can offer more flexibility for this use case, persisting changes without much overhead, and allowing to experiment in a more comfortable way.
* The virtual machine option requires that you install a virtualization software, for example Virtualbox, to deploy a local instance, or that you deploy a cloud instance, for example an AWS EC2, and then that you choose/install your preferred operating system, and finally on top of that install the toolset required to compile the Plutus environment. This can be a bit confusing the first time if you're not used to the tools, i.e. nix, cabal, etc...

Be aware that in previous iterations we needed to weekly recompile the environment to make the code samples work, as a consequence of the Playground being under heavy development.

Fortunately the community made an effort to further document the process for a variety of scenarios, and made it available at the website:

~~https://docs.plutus-community.com/~~

<https://plutus-community.readthedocs.io/>

Please consider contributing to the following repository:

<https://github.com/input-output-hk/plutus-community>

There's an option that in my opinion takes the best of both worlds for this use case, which is to make use of Vagrant to get a running virtual machine but automating all the initial setup process. You can find instructions on the previous links for a Vagrant+Ubuntu setup.

I wanted to use Vagrant+NixOS for its deterministic nature and its native integration with part of the required toolset, so I developed a Vagrant file and a set of scripts to automate the setup process that can be found here:  
<https://github.com/jmhoms/plutus-pioneer-nixos-vagrant>

I plan to follow this third iteration that is about to start, and I'll try to update the scripts as the course moves forward.

I hope this helps.

Cheers!
Josep

> **Comments:**
> **username_2**: I am not familiar with Vagrant, does it have the problem you described for docker of relying on "someone maintaining images for each week's environment version"?  
> **username_0**: Definetly! For the sake of the learning I will go for an Ubunti virtual box on my windows machine. Then I am gonna use NIX to get the plutus development env and recompile it.  The fact that everithing is under heavy development make things much more exciting!  
> **username_1**: Mateus, think about Vagrant as a wrapper to easily setup for you (just with a couple of cmd lines) an underlying Virtualbox (or others) virtual machine from a pre made image. At the end, you'll have an operating system with the Plutus toolset compiled. Obviously if some weekly exercise requires a different Playground git commit, you'll need to recompile. For this reason I created a git project with a Vagrantfile that takes care of the initial setup, and some scripts that compile the right commit for each week of iteration 2. I plan to do the same for iteration 3.  
> **username_1**: So yes, sort of same issue with Vagrant. In my vagrant-nixos scripts, even if nobody takes care of updating them, you should only need to pass the proper commit id (which is specified inside the weekly project file) to the generic script to get the same result. The existent Docker options probably work in a similar way to update the environment, I guess it makes sense to just change the commit id and recreate the image. So in neither case you're really dependant on someone else updating it, but just saving lot of time IF using an image provided by someone else with the environment precompiled.  
> **username_3**: VirtrualBox is not supported on Apple M1 arm64 architecture. Is it still possible to leverage virtual machines?  
> **username_1**: Kevin, I'd suggest that you open a new topic for this question, but basically you could use Parallels ( https://www.parallels.com/ ) or maybe a solution based on QEMU. As an alternative, you could run the VM in a cloud provider paying for usage time, or even use a Docker container locally (I think a flag exist to run Intel images on your ARM computer, which would save some time). Cheers!  
> **username_2**: For those coming now, you can find the new docs website here https://plutus-community.readthedocs.io/  

---

### Answer by username_7 on 2022-01-11. Score: 3

Typically the team loads all new working code to the Nix container. Additionally, it is more compatible with Haskell/Plutus because it is also written under functional paradigm. I tend to suggest everyone using Nix, once you get familiar everything flows smoothly.

You should check at this set up from the First iteration (for your preferred OS):

<https://docs.plutus-community.com/docs/setup/Ubuntu.html>

Note that the lectures are outdated but the set up is the same


---

### Answer by username_4 on 2022-01-12. Score: 1

I agree that Nix is the way to go as it will give you the same processes the Plutus educators and devs are working in. Be sure to follow the instructions offered after the webportal went down.
I went with the canonical plutus-apps repo build for the playground. It is the 3rd option off of the document shared after the portal dropped:
**[Plutus Env: Setup Starter Pack].**

BTW, I am using ubuntu 21.04. I have also done the same install on a straight debian build. Sometime over the next couple days I will do the build on my Win10 laptop (dual booting with the Ubuntu).
I hope this helps & Good luck!


---

### Answer by username_5 on 2022-01-13. Score: 1

Indeed. I would prefer using Linux, Ubuntu. Saves you lots of time. You can run it together with a windows installation. Building the shell with Nix is the way to go. I have set up instructions over here .. also Mac and Windows.

<https://drive.google.com/file/d/1u6QDsZCPnZQ_QiV8hBihgfFh82iTFs7M/view>

> **Comments:**
> **username_6**: We're a little different from other sites; this isn't a discussion forum but a Q&A site, where we reserve the answer space for answers. Please check out our short [tour]. Could you please [edit] this to more directly address the question? Thanks.  

---

