diff --git a/cmake/configs/posix_sitl_replay.cmake b/cmake/configs/posix_sitl_replay.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..6ad18cf8db7a9404d09aebee0922476dc224d1d6
--- /dev/null
+++ b/cmake/configs/posix_sitl_replay.cmake
@@ -0,0 +1,62 @@
+include(posix/px4_impl_posix)
+
+set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
+
+set(config_module_list
+	drivers/device
+	drivers/boards/sitl
+	platforms/common
+	platforms/posix/px4_layer
+	platforms/posix/work_queue
+	systemcmds/param
+	systemcmds/ver
+	systemcmds/perf
+	modules/uORB
+	modules/param
+	modules/systemlib
+	modules/ekf2
+	modules/ekf2_replay
+	modules/sdlog2
+	modules/controllib
+	lib/mathlib
+	lib/mathlib/math/filter
+	lib/conversion
+	lib/ecl
+	lib/external_lgpl
+	lib/geo
+	lib/geo_lookup
+	)
+
+set(config_extra_builtin_cmds
+	serdis
+	sercon
+	)
+
+set(config_sitl_rcS
+	posix-configs/SITL/init/rcS
+	CACHE FILEPATH "init script for sitl"
+	)
+
+set(config_sitl_viewer
+	replay
+	CACHE STRING "viewer for sitl"
+	)
+set_property(CACHE config_sitl_viewer
+	PROPERTY STRINGS "replay;none")
+
+set(config_sitl_debugger
+	disable
+	CACHE STRING "debugger for sitl"
+	)
+set_property(CACHE config_sitl_debugger
+	PROPERTY STRINGS "disable;gdb;lldb")
+
+
+
+add_custom_target(sercon)
+set_target_properties(sercon PROPERTIES
+	MAIN "sercon" STACK "2048")
+
+add_custom_target(serdis)
+set_target_properties(serdis PROPERTIES
+	MAIN "serdis" STACK "2048")
diff --git a/posix-configs/SITL/init/rcS_replay_iris b/posix-configs/SITL/init/rcS_replay_iris
new file mode 100644
index 0000000000000000000000000000000000000000..c973cd0034c6c60a66dda1f3a9e1eec65a36dbd2
--- /dev/null
+++ b/posix-configs/SITL/init/rcS_replay_iris
@@ -0,0 +1,4 @@
+uorb start
+ekf2 start --replay
+sleep 2
+ekf2_replay start replay.px4log
diff --git a/src/firmware/posix/CMakeLists.txt b/src/firmware/posix/CMakeLists.txt
index 9f0569f9c9e09f306a492f5eb81609ec0bce7919..8aee420dd2936340897d6e03d3e50ccc9bf6da4b 100644
--- a/src/firmware/posix/CMakeLists.txt
+++ b/src/firmware/posix/CMakeLists.txt
@@ -57,7 +57,7 @@ add_custom_target(run_config
 	)
 add_dependencies(run_config mainapp)
 
-foreach(viewer none jmavsim gazebo)
+foreach(viewer none jmavsim gazebo replay)
 	foreach(debugger none gdb lldb ddd valgrind)
 		foreach(model none iris iris_opt_flow tailsitter standard_vtol)
 			if (debugger STREQUAL "none")