**How to run PlantUML in VS Code using only a local JAR, ensuring no data is sent to an online server for security?**

0 votes
asked Feb 25 in Question / help by anonymous

In many companies, especially those dealing with confidential data, security is a major concern. When using PlantUML in VS Code, by default, it may try to connect to an online PlantUML server (such as www.plantuml.com/plantuml/) to generate diagrams. However, this is a security risk, as it could potentially expose sensitive company data (such as software architecture, system designs, and internal processes) to external servers.

The goal of this question is to understand how to configure and run PlantUML in VS Code entirely offline, ensuring that:

  1. No data leaves the local machine or company network
  2. PlantUML does not use any external servers
  3. All diagram rendering happens locally, using a self-hosted PlantUML JAR or server

This question seeks a step-by-step guide on properly configuring VS Code’s PlantUML extension to:

  • Disable online servers completely
  • Ensure that the local PlantUML JAR file is used
  • Verify that no network requests are made

This is essential for companies with strict data privacy policies, ensuring that intellectual property and confidential information remain protected.

commented Feb 25 by The-Lu (85,440 points)

Hello A.,

  • What is your VS Code plugin?
  • Perhaps ask directly the question on the appropriate forum, and not on the core plantuml forum?

Regards,
Th.

1 Answer

0 votes
answered Feb 28 by kirchsth (7,760 points)

I assume you use an extension like PlantUML - Visual Studio Marketplace

Why do you not start a server  locally based on the existing docker images?
(details see https://github.com/plantuml/plantuml-server?tab=readme-ov-file#how-to-run-the-server-with-docker)

How to run the server with Docker

You can run Plantuml with jetty or tomcat container

docker run -d -p 8080:8080 plantuml/plantuml-server:jetty
docker run -d -p 8080:8080 plantuml/plantuml-server:tomcat

The server is now listening to http://localhost:8080.

Or use use the built in picowebserver

Another option for running a PlantUML server on your local machine is to use the built in picowebserver, which can be as simple as running java -jar plantuml.jar -picoweb, read more here: https://plantuml.com/picoweb

Best regards
Helmut

...