Published:
Blender Command Line Rendering (2026): Render Animations, Choose GPUs and Keep a Log
Blender command line rendering runs a .blend file without the interface, so a render server can work through frames while you watch the log.
- Order: Blender executes arguments left to right. Set
-o,-F,-sand-ebefore-a. - GPU: Cycles options go after
--.--cycles-deviceaccepts CPU, CUDA, OPTIX, HIP, ONEAPI and METAL. - Several GPUs: Start one process per card with
CUDA_VISIBLE_DEVICESand give each one its own frames. - Checks: Send the console to a log, search it for errors, and count the frames on disk against the range.
- On iRender: You install the Blender version you need on a Windows or Ubuntu server. iRender keeps your server image between sessions.
Blender command line rendering is the way render servers run Blender: one terminal command opens the .blend file in the background, renders the frames you name and writes them to disk. This guide covers Blender 5.2 LTS on Windows and Ubuntu. It explains the flags you need, how to pick OptiX GPUs, and how to prove that every frame was written.
Checked on 26 November 2026 against the Blender 5.2 LTS Manual (Command Line Arguments, GPU Rendering) and NVIDIA CUDA documentation. Disclosure: iRender publishes this guide and rents GPU servers for Blender; the commands and flag names come from those sources, and the session video is our own recording.
Quick answer. To render frames 1 to 250 on the GPU with no interface, run blender -b scene.blend -o //frames/shot_#### -F PNG -s 1 -e 250 -a -- --cycles-device OPTIX. Keep that order: output, format and range before -a, and Cycles options after --.
1. What does Blender command line rendering do?
Blender command line rendering starts Blender with -b (background mode), loads a .blend file and renders it with no window. The render engine is the same Cycles you use in the interface. Only the way you start it changes.
Blender command line rendering matters on a render server for three reasons. First, on older GPU generations a card cannot render and draw the interface at the same time, and the Blender Manual lists that as one reason Blender becomes unresponsive during GPU renders. Second, a command can be saved, repeated and scripted. Third, you can run several Blender processes on one machine, one per GPU.
2. Which flags do you need to render an animation?
Blender command line rendering for an animation uses a handful of the flags below. The rule that trips people up is order: the Blender Manual states that arguments are executed in the order they are given. So the output path, format and frame range must appear before -a starts the render.
| Flag | What it does | Example |
|---|---|---|
-b | Run in background, with no interface. The .blend path follows it. | -b shot.blend |
-o | Output path. // means next to the .blend; # characters become the zero-padded frame number. | -o //frames/shot_#### |
-F | File format, such as PNG, OPEN_EXR or OPEN_EXR_MULTILAYER. | -F OPEN_EXR |
-x | Add the file extension to each name (1 = on). | -x 1 |
-s / -e | Start and end frame of the range. | -s 1 -e 240 |
-a | Render the frames from start to end. | -a |
-f | Render one frame, a comma separated list (no spaces) or a range such as 1..10. | -f 10 |
-E | Render engine. -E help lists the engines. | -E CYCLES |
-P | Run a Python script file before the next arguments. | -P set_gpu.py |
-y / -Y | Enable or disable auto-run Python scripts. Disabled is the default. | -y |
-- | Ends Blender's own arguments. Cycles options follow it. | -- --cycles-device OPTIX |
Sources: Blender Manual, Command Line Arguments (accessed 26 November 2026).
The figure below breaks one full command into those parts. Follow the numbers from 1 to 7 when you write your own.
How to read the figure. Part 1 starts Blender without an interface and loads shot.blend. Parts 2 and 3 set where frames go and in which format. Part 4 sets frames 1 to 240. Next, part 5, -a, renders that range, so it must come after parts 2 to 4. Finally, part 6, the double dash, ends Blender’s own arguments, and part 7 tells Cycles to use OptiX.
Step 1: Render on Windows with PowerShell
For Blender command line rendering on a Windows server, call blender.exe with its full path. The backtick at the end of a line continues the command in PowerShell. The last line sends all console output to a text file.
Step 2: Render on Ubuntu with bash
On Ubuntu, the Blender download from blender.org is a folder you extract. nohup and the final & keep the job running after you disconnect.
3. How do you choose OptiX and specific GPUs from the command line?
Use -- --cycles-device OPTIX to choose the backend. The Blender Manual lists CPU, CUDA, OPTIX, HIP, ONEAPI and METAL as valid values, and +CPU adds the processor, for example OPTIX+CPU. To limit a process to certain cards, set CUDA_VISIBLE_DEVICES before Blender starts.
Background mode reads the Cycles device settings saved in your preferences. A fresh install on a server has none. If you want full control, run the short script below with -P. It switches the backend to OptiX, ticks every OptiX device and sets the scene to GPU Compute. It also prints each device, so the log shows which cards were used.
A full Blender command line rendering call then reads blender -b shot.blend -P set_gpu.py -o //frames/shot_#### -F OPEN_EXR -s 1 -e 240 -a. The script must come before -a, for the same ordering reason as the output path.
Step 3: Run one Blender per GPU
On a multi-GPU server you can also start one Blender per card, each with its own block of frames. Our Blender Cycles multi-GPU guide explains the method, the memory rule and our measured results on 1, 2 and 4 RTX 5090. The loop below is the Ubuntu version of the same idea.
Each process sees one card through CUDA_VISIBLE_DEVICES, and every card still holds the whole scene. To spread frames over several servers instead, see Blender network rendering.
The session video below shows the same per-GPU split, set up from the Blender window, on 1, 2 and 4 RTX 5090.
4. How do you know every frame was rendered?
Blender command line rendering ends with two checks: read the log, then count the files. Search every log for errors first. --cycles-print-stats adds render memory and time statistics, which help when one frame is much slower than the rest.
The file count should match the frame range. If they do not, our sequence check guide covers missing and black frames in detail. Each card below maps a symptom to its cause and fix for the problems we see most often with command line jobs.
Frames land in /tmp or in the wrong folder
-o was typed after -a, so the render started before the output path was set.-o and -F in front of -a or -f. Start the path with // to save next to the .blend file.The job renders on the CPU even though the server has GPUs
-- --cycles-device OPTIX at the end, or run a script with -P that sets the device to GPU.Drivers or rig expressions do not move in the render
-Y).-y to enable auto-run Python scripts.A Cycles option has no effect
-- separator.--cycles-device and --cycles-print-stats after --, at the end of the command.Two processes write the same frames
-s/-e ranges overlap.Textures render pink on the server
Before a long Blender command line rendering job, run through this list. It sums up the rules above in the order you meet them.
--cycles-print-stats when one frame is much slower than the rest; it logs render memory and time.Command line renders: SaaS or IaaS render farm?
A SaaS render farm builds the command for you. That suits a scene that is already packed and only needs a frame range. An IaaS server gives you the terminal itself. That suits jobs where you choose the Blender build, run your own Python script, or split frames across GPUs your own way. Check two things first: can you set the exact Blender version, and can you read the full log? Our SaaS vs IaaS render farm guide compares both models in more detail. The trade-off is setup: on IaaS you install Blender yourself and manage the server while it runs.
Blender Command Line Rendering FAQ
1. How do I render a Blender animation from the command line?
Run blender -b file.blend -o //frames/shot_#### -F PNG -s 1 -e 250 -a. The -b flag starts Blender without its interface. The output, format and frame range must come before -a, because Blender reads the arguments in order.
2. How do I render a single frame from the command line?
Use -f with the frame number, for example blender -b file.blend -o //test_#### -f 10. Blender also accepts a comma separated list with no spaces, or a range such as 1..10.
3. How do I make Blender use the GPU when rendering from the command line?
Add -- --cycles-device OPTIX (or CUDA) at the end of the command. Cycles options must follow the double dash. You can also run a short Python script with -P that enables the OptiX devices and sets the scene device to GPU.
4. Why does Blender save my command line render to the wrong folder?
Usually -o was placed after -a or -f. Blender had already started rendering with the output path stored in the file. Put -o first, and use // for a path relative to the .blend file.
5. Is command line rendering faster than rendering from the Blender interface?
The renderer is the same, so the samples take the same work. The interface no longer has to redraw, and you can run several processes on one machine. That is why render servers usually run Blender in background mode.
6. Can I render on several GPUs from the command line?
Yes. One process can use every enabled GPU, or you can start one process per GPU with CUDA_VISIBLE_DEVICES and give each one its own frame range. Each GPU must hold the whole scene, because GPU memory is not shared.
7. Does the Blender command line work the same on Windows and Linux?
The Blender arguments are the same. Only the shell differs: PowerShell uses a backtick to continue a line, while bash uses a backslash and nohup to keep a job running after you log out.
Render your Blender projects on iRender
iRender rents Windows and Ubuntu servers with 1, 2, 4 or 8 RTX 5090 or RTX 4090 cards. You install the Blender version your file needs, run your own command line, and iRender keeps your server image between sessions. Upload to iRender Drive is free, and billing stops when you shut the server down.
This quick start shows how to start a server and render Blender on it:
Sources: Blender Manual: Command Line Arguments; Blender Manual: GPU Rendering; Blender Python API; NVIDIA CUDA Programming Guide: environment variables. All sources accessed on 26 November 2026.



