# PlantUML Local Server for Pladitor

This package lets you run a local PlantUML server on your own computer.
You do not need to install Java manually.

## Verifying the Download

A `.sha256` file is provided alongside each release archive. Use it to confirm the download is intact and has not been tampered with.

**macOS / Linux:**

```bash
shasum -a 256 -c PlantUMLLocalServer-v1.2026.2-macos.zip.sha256
```

**Windows (PowerShell):**

```powershell
Get-FileHash PlantUMLLocalServer-v1.2026.2-windows.zip -Algorithm SHA256
```

Then compare the output hash with the content of the `.sha256` file. They must match exactly. If they differ, do not use the archive and download it again from the official source.

## What this is for

Use this local server when you want Pladitor to render diagrams without using a remote internet server.

Default local endpoint:

- `http://127.0.0.1:5080`

## Package Contents

Depending on your platform package, the archive includes either:

- Windows: `PlantUMLLocalServer.exe` plus the required `app` and `runtime` folders
- macOS: `PlantUMLLocalServer.app`

Important for Windows:

- Do not move or copy only `PlantUMLLocalServer.exe` by itself.
- Keep `PlantUMLLocalServer.exe`, `app`, and `runtime` in the same folder structure.
- If you copy the package to another machine, copy the complete extracted folder.

## Quick Start (Windows)

1. Extract the archive to any folder.
2. Double-click `Start PlantUML Local Server Tray.cmd`.
3. A tray icon appears in the Windows notification area.
4. Keep the tray app running while using Pladitor.
5. In Pladitor settings, choose Local Server (or set server URL to `http://127.0.0.1:5080/`).

Tray icon behavior (Windows):

- Green/info icon: server is running.
- Yellow/warning icon: server is not reachable.
- Right-click tray icon for Start, Stop, Restart, and Open URL actions.

## Quick Start (macOS)

1. Extract the archive.
2. Double-click `Start PlantUML Local Server.command`.
3. If macOS warns about an unidentified developer, open with right-click -> Open, then confirm.
4. Use `PlantUML Local Server Status.command` to check server status.
5. Use `Stop PlantUML Local Server.command` when you want to stop it.
6. In Pladitor settings, choose Local Server (or set server URL to `http://127.0.0.1:5080/`).

Visibility on macOS:

- The server is controlled through the included `.command` scripts.
- Running the start script gives a visible Terminal-based launch flow.
- This avoids having a "hidden-only" background process.

## How to Verify It Is Running

Open this URL in a browser:

- `http://127.0.0.1:5080/svg/Syp9J4vLqBLJSCfFibBmICt9oGS0`

If the server is running, you will see a small SVG diagram.

## Important Notes

- This server is local-only and listens on your computer.
- Pladitor must be configured to use localhost.
- Keep this app running while rendering PlantUML diagrams.
- Close the app when you no longer need local rendering.

## Troubleshooting

### Error dialog: "Failed to load JVM"

- This usually means `PlantUMLLocalServer.exe` was separated from its bundled `runtime` folder.
- Re-extract the full release archive.
- Ensure these are side by side in the same folder: `PlantUMLLocalServer.exe`, `app`, `runtime`.
- Start the executable again from that folder.

### Tray icon is not visible

- Check the hidden icons area in the Windows taskbar.
- Start `Start PlantUML Local Server Tray.cmd` again.
- If needed, run `PlantUMLLocalServer.exe` directly as a fallback.

### Pladitor cannot connect

- Confirm the local server app is running.
- Verify the server URL in Pladitor is `http://127.0.0.1:5080/`.
- Retry the browser test URL above.

### Port 5080 is already in use

- Stop the other application using port 5080.
- Then restart PlantUML Local Server.

### Windows firewall prompt appears

- Allow access for private networks so Pladitor can connect locally.

### macOS security warning appears

- Use right-click -> Open once, then approve.

### macOS: I do not see any app window

- This is expected for the server process itself.
- Use the included command scripts for visible control:
	- `Start PlantUML Local Server.command`
	- `PlantUML Local Server Status.command`
	- `Stop PlantUML Local Server.command`

## Support

For product support, use the normal Pladitor support channel and include:

- Your OS version
- Pladitor version
- A screenshot of the error
- Result of the browser test URL above
