Standalone Publisher
- Last Updated: May 29, 2026
- 3 minute read
- Semaphore
- Documentation
Typically, users publish their models manually via the Publisher Plugin in the Knowledge Model Management (KMM) or use the KMM API through the KMM Client tool to trigger a publish in the KMM server (refer to Using the KMM-Client tool to carry out administrative functions in the Knowledge Model Management (KMM) Administration). However, in certain situations, the Standalone Publisher (on-premise command-line tool) might be required.
Comparing the Publisher plugin with the Standalone Publisher
The following table summarizes the most significant differences between the Publisher plugin in KMM and the Standalone Publisher.
| Area | Publisher Plugin (KMM) | Standalone Publisher |
|---|---|---|
| How Publisher gets the model | Reads the model directly from the platform data store because it runs inside KMM (for example TDB or MarkLogic). | Gets the model through HTTP calls (for example SPARQL endpoint) or by loading local model files such as .ttl. |
| Environment awareness | Uses environments already defined in Studio. | Does not know Studio environments. |
| Service endpoint configuration | Uses environment service definitions managed by the platform. | Requires manual configuration of service endpoints in the Publisher configuration file, including Classification Server, Semantic Enhancement Server (SES), and Concepts Server values. |
Installing the Standalone Publisher on Windows
Install from the supplied installer. You will be prompted to accept the licensing terms, select the installation and data directories. You will then be prompted for the location of the default Semantic Enhancement Server installation. These last parameters are used to set defaults in the Publisher configuration files.
Installing the Standalone Publisher on Linux
Install from the supplied rpm file. For more information, refer to Requirements in Install Semaphore on Linux.
Running the Standalone Publisher from the command line
The process to run this once installed is very similar on Windows or Linux: run the following command:
./RunPublisherFromConsole.[bat|sh] --sparql-endpoint <sparql_endpoint> --studio-token=<studio_token> --config-file <model_name>/<configuration.file> --named-graph="urn:x-evn-master:<model_name>"
where <sparql_endpoint> can be obtained from the KMM interface (from your model, select Master > Sparql Endpoint URL), the named-graph will be urn:x-evn-master: followed by the label of the model, which will be in your browser address bar when in KMM.
Note: The --studio-token= parameter was introduced in version 5.10.3 to address tokens inside URLs no longer being supported by default. For earlier versions, the token can still be passed inside the SPARQL endpoint URL.
The token can also be hardcoded inside the XML configuration file:
<bean class="com.smartlogic.publisher.config.StudioTokenConfig" factory-method="getInstance" lazy-init="false">
<property name="studioTokenValue" value="token_value" />
<property name="studioTokenKey" value="X-Api-Key" />
</bean>
The configuration file is expected to be in the config directory of the Publisher installation, so for instance the command to publish the Enterprise Business Glossary model would be
./RunPublisherFromConsole.sh --sparql-endpoint http://192.168.0.14:5080/kmm/api/model:EnterpriseBusinessGlossary/sparql --studio-token="WyJH...b2FSZSJd" --config-file EnterpriseBusinessGlossary/Semaphore-Publisher.xml --named-graph="urn:x-evn-master:EnterpriseBusinessGlossary
where the configuration file is located at
/opt/semaphore/Publisher/config/EnterpriseBusinessGlossary/Semaphore-Publisher.xml
Because of the security protections installed on CS (in Semaphore 5.2) and SES (in Semaphore 5.4), in the Publisher configuration file, you will need to supply the appropriate security tokens on the SES as a property called “sesToken” and on the CS rulebase publisher as a property called “csToken” You can obtain these tokens by clicking on the key icon on the appropriate service in the Semaphore Services pane of Studio.
Note, by looking at the script file RunPublisherFromConsole.xx you will see that the command to run the Publisher externally is actually quite simple. If you want to script the process for automatic publishing, then it might be simpler to copy this command into your own script.
An example configuration file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-lazy-init="true">
<bean class="com.smartlogic.publisher.Publisher">
<property name="model">
<bean parent="SparqlEndpoint" >
<property name="useAsync" value="true" />
</bean>
</property>
<property name="configurationSets">
<list>
<ref bean="myAllConcepts"/>
</list>
</property>
<property name="modelUpdater" ref="OEUpdater"/>
</bean>
<!-- The configuration set. This instance will include all concepts and concept schemes.
If you generate multiple configuration sets, you must list them all by id in the Publisher
bean at the top of this file -->
<bean id="myAllConcepts" parent="AllResources">
<property name="outputProcessors">
<list>
<!-- The one-field index writer responsible for pushing into each SES service in the environment -->
<bean parent="SolrWriterJsonTemplate">
<property name="indexName" value="${model.name}"/>
<property name="sesToken" value="eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2NzMyNDM0NzUsInBlcm1pc3Npb25zIjpbIlB1Ymxpc2giXSwidXNlciI6IkdvZCJ9.gz58ryzYKuBW7rg3OqcsUXl-u8_ZlmcOcDHCom3SX3py9vTby_2TEZZ1oef_aBnhNJ50N-3yxxy427UKsAO2HYGVuW6c0t87E54sGhc_V5etmHQpkXo5_7dHZ3owcwZFe_jHZMYzYX6r128Ct4dFC5D0g4lKpqYkKp1SuMgrmSwjV5bPfJDY0BfIT-IhvZ6deh_D0mSFx95i9UiIMCQ169YOAVaRAQUWZUvP73U8pwlC_3zDbuj-ONu7vruSnjpOSIHQbt99d3tID_tJu6gYMau9Td-dPz1VelnqsWwgprzPaUnjTX2wOG-GFifbBJRElbX3RlNCO6RcXt8jQSu3hw"/>
</bean>
<bean id="NamedEntityRules" parent="RulebaseWriterTemplate">
<property name="templateFileName" value="ContextualCitation.kid"/>
</bean>
<bean id="rulebasePublisher" class="com.smartlogic.publisher.pak.PakFilePublisher">
<property name="classificationServerURL" value="http://localhost:5058"/>
<property name="publishSetName" value="${model.name}"/>
<property name="csToken" value="eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE2NzMyNDMzNjMsInBlcm1pc3Npb25zIjpbIlB1Ymxpc2giXSwidXNlciI6IkdvZCJ9.cUEf4dVPFfo9sSvGA5yde8WASSeJi8szEwRouig4wrj7C7OnhJdjJcGirX6soD7QTUsV-Ts1wDNgwlj5Cj1nAlBOr9a1HLiIka5BrwSx3KU9g8YDWPFyaF0q4Tr20ZGgtl5OjinFhIAcx7Plz3ZmpZY3-iQev0k38zBS-ShEkuyhgcpSc_TPgJeF089itJZ2gCTO6pFZvsz4UlHLi0OI0_cF6MaN25XNSGHVHGlLwMphGpyMYdE4KZDPj_R4OjefrW0Gjmgtbp6OGlfsGirjwuiPLHveRKYcmSEusuDRQIYGN8ydcI54Yip3Qk7ZPrT-FhLEPIwruKY9xaQa75id5Q"/>
</bean>
</list>
</property>
</bean>
<!-- The following import lines import many default configuration settings
that will not usually be altered.
Therefore be careful editing anything below here -->
<import resource="file:${resources.directory}/import/ModelInterface.xml"/>
<import resource="file:${resources.directory}/import/ModelDefinition.xml"/>
<import resource="file:${resources.directory}/import/RulebaseStructure.xml"/>
<import resource="file:${resources.directory}/import/SESConfiguration.xml"/>
<import resource="file:${resources.directory}/import/ConfigurationSets.xml"/>
</beans>
This is run using the command:
bin\RunPublisherFromConsole.bat ^
--sparql-endpoint http://localhost:5080/t/WyJHb2QiLDE2Njk3Mjk0NDYsWyJTZW1hcGhvcmVSb290cyIsIlNlbWFwaG9yZUF1dGhlbnRpY2F0ZWRVc2VycyIsIlNlbWFwaG9yZVN1cGVyQWRtaW5pc3RyYXRvcnMiLCJTZW1hcGhvcmVBZG1pbmlzdHJhdG9ycyJdLCJNRVlDSVFDOUZvM1RxZUJneE83Z0JxSThQUmdQT0pLaDZEdERuQWIzRm5keklEUUFTUUloQUkrMk5QbDhTc0ZKMVVmdUVRODZPM0loZDNrR0EwNkJxd1FJTlBhZVhnOGoiXQ/kmm/api/model:SpaceMissions/sparql ^
--config-file SpaceMissions/Semaphore-Publisher.xml ^
--named-graph="urn:x-evn-master:SpaceMissions"