How to change jekyll server port number?

Posted: | Last updated: | less than 1 minute read

Sometime developers want to run to instance of Jekyll servers on develpment server.

By default Jekyll server starts on port number 4000, and can be access via http://localhost:4000

bundle exec jekyll serve


jekyll serve

To run 2 or more instances of jekyll servers on same machine you need to change the port number.

Run first jekyll server on default port 4000, and second server on specific port as below:

bundle exec jekyll serve -P 4001


jekyll serve -P 4001