User Tools

Site Tools


trigger:Web_Server

**This is an old revision of the document!**

Web Server

Overview

If the Keyboard Maestro web server is enabled, then you can connect to it using your web browser.

:!: Note: A HTTP Port of 4490 is used in all examples on this page. But it can be set to any port you prefer.

To Display the Web Server User Interface

https://localhost:4491

(note the use of the next port number after the specified one for the secure connection) or

http://127.0.0.1:4490/

If you have configured a username and password for the web server, then you can log in and execute any active macro. You do not need to explicitly set a trigger, if you enable the web server, and configure a username and password, then all active macros can be executed via the web browser using the username and password.

Any macro with the Public Web trigger can be triggered by anyone without the username or password as long as they can connect to your Mac.

For most home users, only computers on your local network can connect, although it depends on your network setup. Potentially anyone on the Internet can connect to the server.

To Execute a Specific Macro

snippet.html
http://127.0.0.1:4490/action.html?macro=<YourMacroUUID>&value=<TheTriggerValueToPass>

Enable and Setup Web Server

Keyboard Maestro has an built-in web server. You can enable it in the Keyboard Maestro Web Server preferences, and provide the following data.

Field Default Description
Web Server Enabled unchecked Must be checked in order to use the Keyboard Maestro Web Server.
If checked, then the below fields need to be completed.
HTTP Port 4490 Required. The Port used in the URL to access the Server. HTTPS port is <HTTP Port> + 1.
Normally you leave this at default value, unless you already have that Port assigned to something else in your router.
Username <NONE> Required. Enter any name you prefer, but pick one that you will remember.
Password <NONE> Required. Although there are no specific requirements for the password, you should pick a strong one that you will remember, or better, use a Password Manager.
Web Browser Access Enabled checked This must be checked in order to use the URL in a web browser.
iOS Access Enabled unchecked Must be checked in order to use from an iOS device.
FIXME: does this require the KM iOS app?
Receive Clipboards into Clipboard History unchecked FIXME: what does this mean???
Replacing Current Clipboard unchecked FIXME: meaning???

How To Use

(after Web Server has been enabled)

If you configure a username and password, you can:

  1. Connect to your Keyboard Maestro’s web server and login
  2. Then execute any macro you have defined
  3. If you have configured any macro with a Public Web trigger
    1. Then anyone on the Internet (with access to your local area network) trigger only those macros that have set the Public Web trigger. Of course, if you properly setup your Internet router, unauthorized access from the Internet should be very unlikely.

FIXME: What happens if you do NOT enter a username/password?

Connecting to Keyboard Maestro Web Server in Safari
URL: http://127.0.0.1:4490


See Also

Triggers

Forum Topics

trigger/Web_Server.1531723760.txt.gz · Last modified: 2018/07/16 02:49 by peternlewis