Menu Developer Moovweb University

Develop Locally: moov server

Since the release of Moovweb 5, we recommend that you launch the Moovweb Server by clicking the appropriate button for the project you want to view locally in the Developer Dashboard interface. However, the command line can still be used to launch the server, and that is the only way to do it in Moovweb 4.7 and earlier.

If you’re having trouble running the server, please see our FAQs, search Stack Overflow, or visit our Support Portal.


Run the Server

The command moov server tells the Moovweb SDK to start the Moovweb SDK server in the current project folder. This command is special because it needs superuser permissions to run a server on ports 80 and 443. Also, the server has the -auto-hosts=true flag set by default, so it needs these permissions to edit the hosts file on your machine.

To run the server with its default settings, run the following command in your project directory:

sudo moov server

(For Windows users, you do not need sudo, but you will have to run the command line tool as an administrator for the same reason. For Windows developers using Moovweb 4.7 and earlier, you must use the Git Bash command line tool installed when you installed Moovweb.)

To shut down the server, use Ctrl-C.

Note that if you started the server from within the Developer Dashboard, Ctrl-C will also stop the Developer Dashboard from running and disable the window.


Disable Automatic Management of Hosts

If you would like to manage the hosts files yourself, you can turn off the --auto-hosts option:

sudo moov server --auto-hosts=false


Server Options

The server can be run with a variety of options. To get a complete list, run the following in the command line:

moov help server

An example is -sass-style="nested", which alters the CSS output that is generated from Sass. The flag is used in the following way:

moov server -sass-style="nested"


Stopping and Starting the Server

If you stop and start the server often, some processes may get left running. If you close your terminal window without shutting down the Moovweb SDK server, it’s possible that the server will still be running. To kill all moov processes, you can use this command on Linux/Mac.

sudo killall moov