Server runs on Linux, OS X, BSD and Windows.
Installation is done in a few simple steps and only takes a minute to get running.
For more general information look at the README file or in the official documentation.
I have also made a simplified installation guide so you don't have to read this entire thing.
- Dependencies
- Installation methods
- Automated
- Manual
- Containers and Virtual Machines
- Running 2. Node 3. PHP
- Setting up optional features
You just need node and npm. Install them with your package manager or download the official installer.
Debian\Ubuntu: Also install package nodejs-legacy
.
To easily apply updates and other changes, I recommend using git to download instead of using a zip-file/automated installer.
If you install npm packages without --production
parameter, you need to install mocha sudo npm install -g mocha
Run curl -sS http://os.js.org/installer | sh
.
$ sudo npm install -g grunt-cli
# You can also download and extarct the latest zip
$ git clone https://github.com/os-js/OS.js.git
$ cd OS.js
$ npm install --production
$ grunt
Download and run http://os.js.org/installer.exe.
Official video instruction on YouTube
Run cmd
as Administrator (important)!
$ npm install -g grunt-cli
# You can also download and extarct the latest zip
$ git clone https://github.com/os-js/OS.js.git
$ cd OS.js
$ npm install --production
# This is required to make the Development Environment work, but is optional.
$ bin\create-windows-symlinks
$ grunt --force
See Vagrant.md.
See Docker.md.
See NW.md.
See X11.md.
If you built OS.js using a container (above) you can skip this.
Make sure the VFS directories in vfs/
are given the same permissions as the web-servers running user.
After you have started a server, simply navigate to http://localhost:8000 (port 8000 is default).
Node is the prefered server for OS.js.
./bin/start-dist.sh` or `bin\win-start-dist
./bin/start-dev.sh` or `bin\win-start-dev
You can install node supervisor and the development (dist-dev) server will automatically reload on change.
You can start a server manually with (cd dist; php -S 0.0.0.0:8000 ../src/server/php/server.php)
or look below for webserver alternatives.
If you have a "webhost" (or "webhotel") with ex. cPanel without shell access (or no node support), you can run OS.js, but has to be built on another computer, then transfered over to the target machine. The only downside here is that you'd have to run from /OS.js/dist/ without doing modifications to the setup (if you don't have access to mod_rewrite to create proxy rules). You can find more info on this here.
By default PHP uses 'dist' as the default root
Run grunt apache-vhost
to generate config file (or look in doc/ for example)
Note You have to enable mod_rewrite for Apache and make sure htaccess is allowed.
Run grunt lighttpd-config
to generate config file (or look in doc/ for example)
Run grunt nginx-config
to generate config file (or look in doc/ for example)
Works fine. Just look up the Apache section above for configuration.