Skip to content

chore(docs): improve installer.sh docs #5232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@
Run the installer script:

```bash
# Basic installation
curl https://localai.io/install.sh | sh
```

For more installation options, see [Installer Options](https://localai.io/advanced/installer/).

Or run with docker:

### CPU only image:
Expand Down
8 changes: 8 additions & 0 deletions docs/content/docs/advanced/installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ List of the Environment Variables:
| **FEDERATED** | Set to "true" to share the instance with the federation (p2p token is required see [documentation]({{%relref "docs/features/distributed_inferencing" %}})) |
| **FEDERATED_SERVER** | Set to "true" to run the instance as a federation server which forwards requests to the federation (p2p token is required see [documentation]({{%relref "docs/features/distributed_inferencing" %}})) |

## Uninstallation

To uninstall, run:

```
curl https://localai.io/install.sh | sh -s -- --uninstall
```

We are looking into improving the installer, and as this is a first iteration any feedback is welcome! Open up an [issue](https://github.com/mudler/LocalAI/issues/new/choose) if something doesn't work for you!
5 changes: 4 additions & 1 deletion docs/content/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ If you are exposing LocalAI remotely, make sure you protect the API endpoints ad

## Quickstart


### Using the Bash Installer

```bash
# Basic installation
curl https://localai.io/install.sh | sh
```

See [Installer]({{% relref "docs/advanced/installer" %}}) for all the supported options

### Run with docker:
```bash
# CPU only image:
Expand Down
30 changes: 24 additions & 6 deletions docs/static/install.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
#!/bin/sh
# This script installs LocalAI on Linux.
# It detects the current operating system architecture and installs the appropriate version of LocalAI.
# LocalAI Installer Script
# This script installs LocalAI on Linux and macOS systems.
# It automatically detects the system architecture and installs the appropriate version.

# Usage:
# curl ... | ENV_VAR=... sh -
# or
# ENV_VAR=... ./install.sh
# To uninstall: ./install.sh --uninstall
# Basic installation:
# curl https://localai.io/install.sh | sh
#
# With environment variables:
# DOCKER_INSTALL=true USE_AIO=true API_KEY=your-key PORT=8080 THREADS=4 curl https://localai.io/install.sh | sh
#
# To uninstall:
# curl https://localai.io/install.sh | sh -s -- --uninstall
#
# Environment Variables:
# DOCKER_INSTALL - Set to "true" to install Docker images (default: auto-detected)
# USE_AIO - Set to "true" to use the all-in-one LocalAI image (default: false)
# API_KEY - API key for securing LocalAI access (default: none)
# PORT - Port to run LocalAI on (default: 8080)
# THREADS - Number of CPU threads to use (default: auto-detected)
# MODELS_PATH - Path to store models (default: /usr/share/local-ai/models)
# CORE_IMAGES - Set to "true" to download core LocalAI images (default: false)
# P2P_TOKEN - Token for P2P federation/worker mode (default: none)
# WORKER - Set to "true" to run as a worker node (default: false)
# FEDERATED - Set to "true" to enable federation mode (default: false)
# FEDERATED_SERVER - Set to "true" to run as a federation server (default: false)

set -e
set -o noglob
Expand Down
Loading