# Self-host Apache Solr

> The Apache Solr search platform on the official image, with a persistent volume. The admin interface has no login, so keep it private or put it behind an authenticating proxy before adding a public domain. Other services in this project reach it at solr:8983.

- Page: https://levelrail.com/templates/solr/
- JSON: https://levelrail.com/templates/solr.json
- Category: Database Tools
- Licence: Apache-2.0 (Permissive license)
- Source: https://github.com/apache/solr
- Upstream docs: https://solr.apache.org/guide/solr/latest/

## Requirements
- Memory: about 1 GiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 9.11.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| solr | solr | 9.11.0 | 8983 | solr_data -> /var/solr |

## Deploy

### CLI

```bash
levelrail-cli templates deploy solr --name my-solr
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/solr/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## First run
1. Open the admin interface and create a core, or run the solr create command in the container's console.

## Questions

### Can I deploy Apache Solr on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Apache Solr, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image solr:9.11.0 is what you deploy there.

Self-host Apache Solr, Apache Solr docker compose file, deploy Apache Solr on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
