# Install Lucee core/lex files

The `install` command will automatically find a local Lucee Server when installing a package that is a Lex file.  There is also now a command called `server lucee-deploy` to help with installing Lex files (Lucee Extensions) and LCO files (Lucee Core).

It will accept an absolute or relative local file path:

```bash
server lucee-deploy myFile.lex
```

or an HTTP URL to download

```bash
server lucee-deploy https://domain.com/path/to/Lucee-core-patch.lco
```

You can also override the name of the CommandBox server to install into, regardless of what working directory the shell is in:

```bash
server lucee-deploy myFile.lex myServer
```

The command will copy the lex or lco file to the deploy folder of the chosen Lucee server following these rules

* If server name is passed as second arg, use that server name (providing it’s a Lucee server)
* Otherwise, if this command is being run inside of a server-related interceptor, capture the name of the server from the intercept data and use that server
* otherwise, look for any Lucee server whose webroot points to the current working directory of the shell and use the first found
* Otherwise, look for a `LUCEE_DEPLOY_DIRECTORY` env var and use this as the deploy directory (can be relative or absolute)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://commandbox.ortusbooks.com/embedded-server/install-lucee-core-lex-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
