2016-09-23 07:51:45 +00:00
# OctoPrint
2013-01-18 22:23:50 +00:00
2017-03-10 12:52:18 +00:00
[](https://badge.fury.io/gh/foosel%2FOctoPrint)
2017-03-10 12:53:35 +00:00
OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software
2013-07-01 13:23:40 +00:00
and released under the [GNU Affero General Public License V3 ](http://www.gnu.org/licenses/agpl.html ).
Its website can be found at [octoprint.org ](http://octoprint.org ).
2015-07-23 06:48:11 +00:00
The documentation is located at [docs.octoprint.org ](http://docs.octoprint.org ).
2015-08-31 07:19:32 +00:00
The official plugin repository can be reached at [plugins.octoprint.org ](http://plugins.octoprint.org ).
2015-07-09 13:43:11 +00:00
OctoPrint's development wouldn't be possible without the [financial support by its community ](http://octoprint.org/support-octoprint/ ).
If you enjoy OctoPrint, please consider becoming a regular supporter!
2015-08-31 07:19:32 +00:00

2015-07-23 06:48:11 +00:00
You are currently looking at the source code repository of OctoPrint. If you already installed it
(e.g. by using the Raspberry Pi targeted distribution [OctoPi ](https://github.com/guysoft/OctoPi )) and only
want to find out how to use it, [the documentation ](http://docs.octoprint.org/ ) and [the public wiki ](https://github.com/foosel/OctoPrint/wiki )
might be of more interest for you. You might also want to subscribe to [the mailing list ](https://groups.google.com/group/octoprint )
or the [G+ Community ](https://plus.google.com/communities/102771308349328485741 ) where there are other active users who might be
able to help you with any questions you might have.
2016-09-23 07:51:45 +00:00
## Contributing
2013-07-15 15:54:28 +00:00
2015-07-23 06:48:11 +00:00
Contributions of all kinds are welcome, not only in the form of code but also with regards to the
[official documentation ](http://docs.octoprint.org/ ) or [the public wiki ](https://github.com/foosel/OctoPrint/wiki ), support
of other users in the [bug tracker ](https://github.com/foosel/OctoPrint/issues ),
[the Mailinglist ](https://groups.google.com/group/octoprint ) or
2015-07-09 13:43:11 +00:00
[the G+ Community ](https://plus.google.com/communities/102771308349328485741 ) and also [financially ](http://octoprint.org/support-octoprint/ ).
2015-07-23 06:48:11 +00:00
2016-09-23 07:51:45 +00:00
If you think something is bad about OctoPrint or its documentation the way it is, please help
2015-07-23 06:48:11 +00:00
in any way to make it better instead of just complaining about it -- this is an Open Source Project
after all :)
2017-03-10 12:52:18 +00:00
For information about how to go about submitting bug reports or pull requests, please see the project's
2015-07-23 06:48:11 +00:00
[Contribution Guidelines ](https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md ).
2013-07-15 15:54:28 +00:00
2016-09-23 07:51:45 +00:00
## Installation
2013-10-20 13:24:13 +00:00
2015-09-28 17:53:30 +00:00
Installation instructions for installing from source for different operating
systems can be found [on the wiki ](https://github.com/foosel/OctoPrint/wiki#assorted-guides ).
2013-10-20 13:24:13 +00:00
2017-03-06 14:51:14 +00:00
If you want to run OctoPrint on a Raspberry Pi, you might want to take a look at [OctoPi ](https://github.com/guysoft/OctoPi )
2013-10-20 13:24:13 +00:00
which is a custom SD card image that includes OctoPrint plus dependencies.
2015-09-28 17:53:30 +00:00
The generic steps that should basically be done regardless of operating system
and runtime environment are the following (as *regular
user*, please keep your hands *off* of the `sudo` command here!) - this assumes
2016-01-13 16:12:41 +00:00
you already have Python 2.7, pip and virtualenv set up on your system:
2015-09-28 17:53:30 +00:00
1. Checkout OctoPrint: `git clone https://github.com/foosel/OctoPrint.git`
2. Change into the OctoPrint folder: `cd OctoPrint`
2016-01-13 16:12:41 +00:00
3. Create a user-owned virtual environment therein: `virtualenv venv`
2015-09-28 17:53:30 +00:00
4. Install OctoPrint *into that virtual environment* : `./venv/bin/python setup.py install`
You may then start the OctoPrint server via `/path/to/OctoPrint/venv/bin/octoprint` , see [Usage ](#usage )
for details.
2015-07-10 07:58:20 +00:00
After installation, please make sure you follow the first-run wizard and set up
access control as necessary. If you want to not only be notified about new
2017-03-06 14:51:14 +00:00
releases, but also be able to automatically upgrade to them from within
2015-08-31 07:19:32 +00:00
OctoPrint, take a look [at the documentation of the Software Update Plugin ](https://github.com/foosel/OctoPrint/wiki/Plugin:-Software-Update#making-octoprint-updateable-on-existing-installations )
and at its settings.
2015-07-10 07:58:20 +00:00
2016-09-23 07:51:45 +00:00
## Dependencies
2012-12-06 07:57:18 +00:00
2014-08-08 15:00:39 +00:00
OctoPrint depends on a couple of python modules to do its job. Those are automatically installed when installing
OctoPrint via `setup.py` :
2012-12-06 07:57:18 +00:00
2014-08-08 15:00:39 +00:00
python setup.py install
2012-12-06 07:57:18 +00:00
2017-03-06 14:51:14 +00:00
You should do this every time after pulling from the repository, since the dependencies may have changed.
2013-01-18 22:43:50 +00:00
2013-01-18 22:23:50 +00:00
OctoPrint currently only supports Python 2.7.
2013-01-01 20:04:00 +00:00
2016-09-23 07:51:45 +00:00
## Usage
2012-12-06 07:57:18 +00:00
2015-07-10 07:58:20 +00:00
Running the `setup.py` script via
python setup.py install
installs the `octoprint` script in your Python installation's scripts folder
2017-03-06 14:51:14 +00:00
(which, depending on whether you installed OctoPrint globally or into a virtual env, will be in your `PATH` or not). The
following usage examples assume that the `octoprint` script is on your `PATH` .
2014-10-27 08:48:54 +00:00
You can start the server via
2012-12-05 13:16:50 +00:00
2017-01-09 16:07:27 +00:00
octoprint serve
2013-01-18 22:39:26 +00:00
2012-12-31 12:18:54 +00:00
By default it binds to all interfaces on port 5000 (so pointing your browser to `http://127.0.0.1:5000`
will do the trick). If you want to change that, use the additional command line parameters `host` and `port` ,
2013-03-11 20:00:43 +00:00
which accept the host ip to bind to and the numeric port number respectively. If for example you want the server
2012-12-31 12:18:54 +00:00
to only listen on the local interface on port 8080, the command line would be
2012-12-06 07:57:18 +00:00
2017-01-09 16:07:27 +00:00
octoprint serve --host=127.0.0.1 --port=8080
2013-01-18 22:39:26 +00:00
2017-03-06 14:51:14 +00:00
Alternatively, the host and port on which to bind can be defined via the config file.
2013-01-01 20:04:00 +00:00
2013-03-11 20:00:43 +00:00
If you want to run OctoPrint as a daemon (only supported on Linux), use
2013-03-10 20:33:45 +00:00
2017-01-09 16:07:27 +00:00
octoprint daemon {start|stop|restart} [--pid PIDFILE]
2013-03-10 20:33:45 +00:00
2013-03-11 20:04:56 +00:00
If you do not supply a custom pidfile location via `--pid PIDFILE` , it will be created at `/tmp/octoprint.pid` .
2013-03-11 20:00:43 +00:00
2017-03-06 14:51:14 +00:00
You can also specify the config file or the base directory (for basing off the `uploads` , `timelapse` and `logs` folders),
2013-03-11 20:00:43 +00:00
e.g.:
2017-01-09 16:07:27 +00:00
octoprint serve --config /path/to/another/config.yaml --basedir /path/to/my/basedir
2013-03-11 20:00:43 +00:00
2017-03-10 12:52:18 +00:00
To start OctoPrint in safe mode - which disables all third party plugins that do not come bundled with OctoPrint - use
the ``--safe`` flag:
octoprint serve --safe
See `octoprint --help` for more information on the available command line parameters.
2014-08-08 15:00:39 +00:00
2017-03-06 14:51:14 +00:00
OctoPrint also ships with a `run` script in its source directory. You can invoke it to start the server. It
2014-10-27 08:48:54 +00:00
takes the same command line arguments as the `octoprint` script.
2014-08-08 15:00:39 +00:00
2016-09-23 07:51:45 +00:00
## Configuration
2013-01-01 20:04:00 +00:00
2017-03-06 14:51:14 +00:00
If not specified via the command line, the config file `config.yaml` for OctoPrint is expected in the settings folder,
2013-07-01 13:23:40 +00:00
which is located at `~/.octoprint` on Linux, at `%APPDATA%/OctoPrint` on Windows and
at `~/Library/Application Support/OctoPrint` on MacOS.
2013-03-16 01:40:42 +00:00
2013-07-01 13:23:40 +00:00
A comprehensive overview of all available configuration settings can be found
2015-07-10 07:58:20 +00:00
[in the docs ](http://docs.octoprint.org/en/master/configuration/config_yaml.html ).
Please note that the most commonly used configuration settings can also easily
be edited from OctoPrint's settings dialog.
2016-09-23 07:51:45 +00:00
## Special Thanks
2015-07-10 07:58:20 +00:00
Cross-browser testing services are kindly provided by [BrowserStack ](http://www.browserstack.com/ ).
2015-08-31 07:19:32 +00:00
Profiling is done with the help of [PyVmMonitor ](http://www.pyvmmonitor.com ).