DEV Community

Ricky Eckhardt
Ricky Eckhardt

Posted on

Get up and Running with Meteor in WSL2

Getting started with Meteor on Windows Subsystem Linux 2 (WSL2) is easy, but it requires a few departures from the Meteor Developers documentation.

Step 1:

On WSL2? Install the latest official Meteor release from your terminal:

curl | sh

Note: You may need to use the sudo command to install Meteor. If you do a prompt will pop up for you to enter your WSL2 root password.

If installed correctly you should see:

ricky@DESKTOP-ULOB7UG:~$ curl | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7915    0  7915    0     0  40589      0 --:--:-- --:--:-- --:--:-- 40589
Removing your existing Meteor installation.
Downloading Meteor distribution
######################################################################## 100.0%

Meteor 1.10.2 has been installed in your home directory (~/.meteor).
Writing a launcher script to /usr/local/bin/meteor for your convenience.
This may prompt for your password.
[sudo] password for ricky: 

To get started fast:

  $ meteor create ~/my_cool_app
  $ cd ~/my_cool_app
  $ meteor

Or see the docs at:

Deploy and host your app with Galaxy:

Step 2:

Now that the installation is complete we need to change an environment variable to prevent issues when running MondoDB.

To continue we need to vi and edit a file at:


Note: This file path will change depending on the version installed.

To do this run the following command after changing the path to match your home directory:

vi /home/ricky/.meteor/packages/meteor-tool/.

If vi tells you [Permission Denied] simply back out of vi using :q and run the following command after changing it to match your home directory:

sudo vi /home/ricky/.meteor/packages/meteor-tool/.

Once you have the file open we need to change the following code around line 31:


To read:


To do this using vi simply arrow up or down to the line and type :R to edit the line, once finished, hit ESC. Now exit vi using :wq to save and exit.

If you had to run sudo to edit the file you need to modify it's permissions.

To do this run the following command changing it's home directory to match yours:

chmod +rw  /home/ricky/.meteor/packages/meteor-tool/.

Step 3:

You are ready to create your Meteor app!

To create a Meteor app run the following command:

meteor create ~/myapp

This command creates a meteor app in the home directory of WSL2. Creating the application in the home directory avoids errors listed in the error section of this guide.

If your app was created successfully you should see:

ricky@DESKTOP-ULOB7UG:~$ meteor create ~/myapp
Created a new Meteor app in '/home/ricky/myapp'.

To run your new app:                          
  cd /home/ricky/myapp                        

If you are new to Meteor, try some of the learning resources here:            

When you’re ready to deploy and host your new Meteor application, check out Galaxy:              

To start with a different app template, try one of the following:

  meteor create --bare       # to create an empty app
  meteor create --minimal    # to create an app with as few Meteor packages as possible
  meteor create --full       # to create a more complete scaffolded app
  meteor create --react      # to create a basic React-based app
  meteor create --typescript # to create an app using TypeScript and React

Now you are ready to go with Meteor!

Step 4:

Let's finish up by ensuring everything is running correctly!

First let's start the Meteor server.

To start the server simply type the following:

cd myapp

If started correctly you should see:

[[[[[ ~/myapp ]]]]]                           

=> Started proxy.                             
=> Started MongoDB.                           
=> Started your app.                          

=> App running at: http://localhost:3000/

Alright, there is one more thing to check. We need to ensure that Meteor Mongo will start.

To do this open a second WSL2 window and run the following command in the directory you just created your app in.

meteor mongo

If everything worked above you should see:

MongoDB shell version v4.2.5
connecting to: mongodb://
Implicit session: session { "id" : UUID("0a0211ad-c3d5-478f-8427-7f90d2f54cd4") }
MongoDB server version: 4.2.5

Congratulations you are up and running with Meteor in WSL2! If you've run into an error check below to see the cause.

Errors you may run into using WSL2:

Error From Creating an App in a Windows Directory


User gets the following message after creating a Meteor project on a mounted Windows drive.

ricky@DESKTOP-ULOB7UG:/mnt/c/Meteor/todo$ meteor
[[[[[ /mnt/c/code/Meteor/todo ]]]]]           

=> Started proxy.                             
Unexpected mongo exit code null. Restarting.  
Unexpected mongo exit code null. Restarting.  
Unexpected mongo exit code null. Restarting.  
Can't start Mongo server.                     


A quick fix to this is to create your project within your home directory in WSL2.

In WSL2 run the following command to create a project in your home directory:

meteor create ~/todo 

Error from not changing from WAL to Truncate


Running the following command:

meteor mongo

The user gets:

Error: SQLITE_PROTOCOL: locking protocol
Retrying after error Error: SQLITE_PROTOCOL: locking protocol
=> awaited here:
at Promise.await
at Db._execute (/tools/packaging/catalog/catalog-remote.js:361:8)
at /tools/packaging/catalog/catalog-remote.js:150:10
at Db._retry (/tools/packaging/catalog/catalog-remote.js:162:16)
at new Db (/tools/packaging/catalog/catalog-remote.js:149:8)
at RemoteCatalog.initialize (/tools/packaging/catalog/catalog-remote.js:699:15)
at /tools/cli/main.js:875:20 {
errno: 15,


To correct this error edit the meteor/tools/packaging/catalog/catalog-remote.js using the steps above.


Meteor Documentation
Notes on Moving Meteor Development to WSL Debian
Support "Bash on Windows" #154
TRUNCATE journal mode for packaging DB on Windows like file systems #9644

Discussion (1)

captainchainsaw profile image

Have you been able to create an Android app using Meteor on WSL? I've tries and the best I can get is my app installed but I can't even submit the login credentials. Doesn't connect and I have port 3000 open. If you have any ideas I'd love to hear them.