Skip to content

Wiremock Commandline Parameters

The following commandline arguments can be defined for:

Argument NameValue TypeDefaultDescription
--HelpShow a link to this page.
--Portintegersettings-port
--Urlsstringhttp://*:9091/settings-urls. Used when --Port is not set and no --HostingScheme is defined.
--StartAdminInterfacebooleantrueDefines whether to start admin interface.
--AdminPathstring/__adminsettings-adminpath
--AdminUsernamestringsettings-adminusername
--AdminPasswordstringsettings-adminpassword
--AdminAzureADTenantstringsettings-adminazureadtenant
--AdminAzureADAudiencestringsettings-adminazureadaudience
--AllowPartialMappingbooleanfalsesettings-allowpartialmapping
--AllowBodyForAllHttpMethodsbooleanfalsesettings-allowbodyforallhttpmethods
--AllowCSharpCodeMatcherbooleanfalsesettings-allowcsharpcodematcher
--AllowOnlyDefinedHttpStatusCodeInResponsebooleanfalsesettings-allowonlydefinedhttpstatuscodeinresponse
--ReadStaticMappingsbooleanfalseDefines if the static mappings should be read at startup.
--WatchStaticMappingsbooleanfalsesettings-watchstaticmappings
--WatchStaticMappingsInSubdirectoriesbooleanfalsesettings-watchstaticmappingsinsubdirectories
--DisableJsonBodyParsingbooleanfalsesettings-disablejsonbodyparsing
--DisableRequestBodyDecompressingbooleanfalsesettings-disablerequestbodydecompressing
--DisableDeserializeFormUrlEncodedbooleanfalsesettings-disabledeserializeformurlencoded
--HandleRequestsSynchronouslybooleanfalsesettings-handlerequestssynchronously
--DoNotSaveDynamicResponseInLogEntrybooleanfalsesettings-donotsavedynamicresponseinlogentry
--SaveUnmatchedRequestsbooleanfalsesettings-saveunmatchedrequests
--MaxRequestLogCountintegersettings-maxrequestlogcount
--RequestLogExpirationDurationintegersettings-requestlogexpirationduration
--StartTimeoutinteger10000settings-starttimeout
--HostingSchemeenumsettings-hostingscheme
--UseHttp2booleanfalsesettings-usehttp2
--UseRegexExtendedbooleantruesettings-useregexextended
--QueryParameterMultipleValueSupportenumAllsettings-queryparametermultiplevaluesupport
--CulturestringCurrentCulturesettings-culture
--ProtoDefinitionsjsonsettings-protodefinitions
--GraphQLSchemasjsonsettings-graphqlschemas
--WireMockLoggerstringWireMockNullLoggerYou can also define WireMockConsoleLogger.
--X509StoreName
--X509StoreLocation
--X509StoreThumbprintOrSubjectName
--X509CertificateFilePath
--X509CertificatePassword
string
string
string
string
string
settings-certificatesettings
--CorsPolicyOptionsenumNonesettings-corspolicyoptions
--ClientCertificateModeenumNoCertificatesettings-clientcertificatemode
--AcceptAnyClientCertificatebooleanfalsesettings-acceptanyclientcertificate

See also Proxy and Record Settings for a complete list.

Argument NameValue TypeDefaultDescription
--ProxyURL / --ProxyUrlstringThe URL to use for proxying.
--SaveMappingbooleanfalseSave the mapping for each request/response to internal mappings.
--SaveMappingToFilebooleanfalseSave generated mappings to file.
--SaveMappingForStatusCodePatternstring*Save mapping filter by status code pattern.
--UseDefinedRequestMatchersbooleanfalseUse defined request matchers for generated mappings.
--AppendGuidToSavedMappingFilebooleanfalseAppend a GUID to saved mapping filename.
--PrefixForSavedMappingFilestringmappingPrefix for saved mapping filename.
--AllowAutoRedirectbooleanfalseProxy requests should follow redirects.
--ClientX509Certificate2ThumbprintOrSubjectNamestringClient certificate thumbprint or subject name.
--ExcludedHeadersstring[]Headers to exclude in recorded mappings.
--ExcludedCookiesstring[]Cookies to exclude in recorded mappings.
--PreferProxyMappingbooleanfalsePrefer proxy mapping when applicable.
--ProxyAllbooleanfalseProxy all requests.
--WebProxyAddressstringUpstream web proxy address.
--WebProxyUserNamestringUpstream web proxy user name.
--WebProxyPasswordstringUpstream web proxy password.
--ProxyUrlReplaceOldValuestringProxy URL replace old value.
--ProxyUrlReplaceNewValuestringProxy URL replace new value.
--ProxyUrlReplaceIgnoreCasebooleanfalseCase-insensitive URL replace.
--ProxyUrlReplaceTransformTemplatestringURL transform template.
--ProxyUrlReplaceTransformerTypeenumHandlebarsTransformer type for URL transform template.
Argument NameValue TypeDefaultDescription
--AllowedCustomHandlebarsHelpersenumNoneAllowed custom Handlebars helpers.
--AllowedHandlebarsHelpersenum[]defaultsAllowed built-in Handlebars helpers.
Argument NameValue TypeDefaultDescription
--ActivityTracingEnabledbooleanfalseEnable activity tracing for requests.
--ActivityTracingOptions__EnabledbooleanfalseAlternative key to enable activity tracing.
--ActivityTracingExcludeAdminRequestsbooleantrueExclude /__admin/* requests from tracing.
--ActivityTracingOptions__ExcludeAdminRequestsbooleantrueAlternative key for excluding admin requests.
--ActivityTracingRecordRequestBodybooleanfalseInclude request body in trace attributes.
--ActivityTracingOptions__RecordRequestBodybooleanfalseAlternative key for request body recording.
--ActivityTracingRecordResponseBodybooleanfalseInclude response body in trace attributes.
--ActivityTracingOptions__RecordResponseBodybooleanfalseAlternative key for response body recording.
--ActivityTracingRecordMatchDetailsbooleantrueInclude mapping match details in trace attributes.
--ActivityTracingOptions__RecordMatchDetailsbooleantrueAlternative key for mapping match detail recording.
Argument NameValue TypeDefaultDescription
--WebSocketSettings.MaxConnectionsinteger100Maximum number of WebSocket connections.
--WebSocketSettings.KeepAliveIntervalSecondsintegerimplementation defaultWebSocket keep-alive interval in seconds.