One of the amazing Blender features is that the graphical user interface GUI is not absolutely necessary for its work. You can install Blender on an operating system without a graphical shell and successfully render your scenes. Such types of a Blender installations are usually required to organize various render farms.
For example, consider Blender installation on the server Linux Debian operating system.
To install Blender on Linux Debian, let’s perform the following actions through the console command line:
- First of all, as for any software installation, update the system to the latest version:
Update Packages
1 |
apt-get update |
and then upgrade the system:
1 |
apt-get upgrade |
- Next, check which version of Blender is offered to install from the connected repositories:
1 |
apt-cache policy blender |
If the Blender version does not match, connect other repositories through the sources.list file and repeat the check.
- Install Blender:
1 |
apt-get install blender |
- To check already installed Blender version, type the command:
1 |
blender -v |
- To execute the scene rendering from the console, type following command:
1 |
blender -b /tmp/1.blend -o //1.jpg -F JPEG -f 1 |
The parameters used in the example:
/tmp/1.blend – full path to the file “1.blend” with the scene which needs to render;
-0 //1.jpg – path to the file (1.jpg), in which the render result will be stored. This path can be specified as absolute, or, as in the example, if it starts with a double slash (//) – relative to the location of the scene file;
-F JPEG – specifies render result file format;
-f 1 – specifies the frame number (1) of the scene which will be sent to render;
After the render completion, the resulting image can be found along the path specified in the command parameters.
The problem – for me at least – is that I would to run blender on a headless server. The above pulls down a lot of seemingly unnecessary (GUI?) packages that I do not need nor want on this server.
How does one install a cli only installation of Blender? Is the only route to compile it from source? And in that case is there a make option or something similar to achieve this?
For this, I think, you need to build your own Bnelder built.
Blender uses CMake.
You can see its options on Blender Dev Wiki: https://wiki.blender.org/wiki/Building_Blender