PHPackages                             survos/omeka-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. survos/omeka-bundle

ActiveSymfony-bundle[API Development](/categories/api)

survos/omeka-bundle
===================

Symfony HttpClient wrapper for the Omeka-S REST API

2.0.182(2mo ago)1132↓41.7%[1 issues](https://github.com/survos/omeka-bundle/issues)MITPHPPHP &gt;=8.4

Since Feb 6Pushed 1mo agoCompare

[ Source](https://github.com/survos/omeka-bundle)[ Packagist](https://packagist.org/packages/survos/omeka-bundle)[ GitHub Sponsors](https://github.com/kbond)[ RSS](/packages/survos-omeka-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (23)Versions (65)Used By (0)

survos/omeka-bundle
===================

[](#survosomeka-bundle)

Symfony HttpClient wrapper for the Omeka-S REST API. PHP 8.4+, Symfony 7/8.

Documentation
-------------

[](#documentation)

- **[Public Crawling Guide](docs/public-crawling.md)** — crawl any public Omeka S site without an API key; build a directory of institutions; filter by license; import as JSONL. Includes verified test sites with permissive licenses.

Installation
------------

[](#installation)

```
composer require survos/omeka-bundle
```

```
# .env
OMEKA_LOCAL_API_URL=http://localhost:8088/api
OMEKA_LOCAL_KEY_IDENTITY=
OMEKA_LOCAL_KEY_CREDENTIAL=
OMEKA_REMOTE_KEY_IDENTITY=
OMEKA_REMOTE_KEY_CREDENTIAL=
```

```
# config/packages/survos_omeka.yaml
survos_omeka:
  clients:
    local:
      api_url: '%env(OMEKA_LOCAL_API_URL)%'
      key_identity: '%env(default::OMEKA_LOCAL_KEY_IDENTITY)%'
      key_credential: '%env(default::OMEKA_LOCAL_KEY_CREDENTIAL)%'
    remote:
      api_url: 'https://dev.omeka.org/omeka-s-sandbox/api'
      key_identity: '%env(default::OMEKA_REMOTE_KEY_IDENTITY)%'
      key_credential: '%env(default::OMEKA_REMOTE_KEY_CREDENTIAL)%'
```

Discovering Omeka Sites &amp; Crawling Without an API Key
---------------------------------------------------------

[](#discovering-omeka-sites--crawling-without-an-api-key)

This bundle can scrape the omeka.org Classic and S directories, probe each site live, detect its version and license, and stream any public Omeka S installation into a JSONL file — no credentials required.

See **[docs/public-crawling.md](docs/public-crawling.md)** for the full guide, including all command flags, verified test sites, license categories, async Messenger setup, and programmatic usage.

Quick start:

```
# Build a directory of live Omeka S installations with license info
bin/console omeka:directory --type=s --live-only --permissive-only \
    --output=/data/permissive-omeka-sites.jsonl

# Crawl a public site to JSONL (auto-resumes on interruption)
bin/console omeka:crawl https://iaamcfh.omeka.net --normalize \
    --output=/data/iaamcfh.jsonl
```

---

Dokku Deployment (Omeka S Image)
--------------------------------

[](#dokku-deployment-omeka-s-image)

Use the prebuilt Omeka S image for production and keep it separate from the Symfony app.

1. Create a shared MySQL service and app:

```
dokku mysql:create omeka-db
dokku apps:create kpa-omeka
dokku mysql:link omeka-db kpa-omeka
```

2. Create a dedicated database and user for this app:

```
dokku mysql:enter omeka-db env | grep MYSQL_ROOT_PASSWORD
dokku mysql:enter omeka-db mysql -uroot -p
```

```
CREATE DATABASE kpa_omeka;
CREATE USER 'kpa_omeka'@'%' IDENTIFIED BY 'kpa_omeka_secret';
GRANT ALL PRIVILEGES ON kpa_omeka.* TO 'kpa_omeka'@'%';
FLUSH PRIVILEGES;
```

3. Set Omeka env vars and deploy the image:

```
dokku config:set kpa-omeka \
  OMEKA_ADMIN_EMAIL=admin@admin.com \
  OMEKA_ADMIN_PASSWORD=admin \
  OMEKA_ADMIN_NAME="KPA Admin" \
  OMEKA_SITE_TITLE="KPA Omeka" \
  OMEKA_TIMEZONE=UTC \
  OMEKA_LOCALE=en_US \
  DB_HOST=dokku-mysql-omeka-db \
  DB_NAME=kpa_omeka \
  DB_USER=kpa_omeka \
  DB_PASSWORD=kpa_omeka_secret

dokku git:from-image kpa-omeka erseco/alpine-omeka-s:latest
dokku ps:rebuild kpa-omeka
```

4. Persist uploads and logs (optional but recommended):

```
mkdir -p /var/lib/dokku/data/storage/kpa-omeka/{omeka_files,omeka_logs}
dokku storage:mount kpa-omeka /var/lib/dokku/data/storage/kpa-omeka/omeka_files:/var/www/html/volume
dokku storage:mount kpa-omeka /var/lib/dokku/data/storage/kpa-omeka/omeka_logs:/var/www/html/logs
```

If you have a larger disk mounted, prefer mounting that location instead of `/var/lib/dokku/data/storage`:

```
mkdir -p /mnt/volume-1/omeka/kpa/files/config \
  /mnt/volume-1/omeka/kpa/files/files \
  /mnt/volume-1/omeka/kpa/files/modules \
  /mnt/volume-1/omeka/kpa/files/themes \
  /mnt/volume-1/omeka/kpa/logs
chown -R 65534:65534 /mnt/volume-1/omeka/kpa/files /mnt/volume-1/omeka/kpa/logs
chmod -R u+rwX,g+rwX /mnt/volume-1/omeka/kpa/files /mnt/volume-1/omeka/kpa/logs
dokku storage:mount kpa-omeka /mnt/volume-1/omeka/kpa/files:/var/www/html/volume
dokku storage:mount kpa-omeka /mnt/volume-1/omeka/kpa/logs:/var/www/html/logs
```

If permissions fail, confirm the container UID/GID and adjust:

```
dokku enter kpa-omeka web id
```

5. Set the domain and ports:

```
dokku domains:set kpa-omeka kpa-omeka.survos.com
dokku ports:set kpa-omeka http:80:8080
```

6. Enable HTTPS (Let’s Encrypt):

```
dokku letsencrypt:set kpa-omeka email you@example.com
dokku letsencrypt:enable kpa-omeka
```

7. Verify and troubleshoot:

```
dokku ps:report kpa-omeka
dokku ports:report kpa-omeka
dokku domains:report kpa-omeka
dokku logs kpa-omeka --tail
```

If you see the default nginx page, the app is only exposed on port 8080. Fix with:

```
dokku ports:set kpa-omeka http:80:8080
dokku ps:restart kpa-omeka
```

Repeat steps 2-6 for each additional Omeka instance (new DB/user, new app name, new domain).

Troubleshooting: Theme Not Found
--------------------------------

[](#troubleshooting-theme-not-found)

If you get `The current theme is not active. Its current state is "not_found"`, the themes directory is empty in the mounted volume. Seed themes/modules from the image:

```
dokku enter kpa-omeka web sh -lc "\
cp -a /var/www/html/themes/. /var/www/html/volume/themes/ 2>/dev/null || true
cp -a /var/www/html/modules/. /var/www/html/volume/modules/ 2>/dev/null || true
"
chown -R 65534:65534 /mnt/volume-1/omeka/kpa/files
chmod -R u+rwX,g+rwX /mnt/volume-1/omeka/kpa/files
dokku ps:restart kpa-omeka
```

Troubleshooting: disk\_free\_space Warning
------------------------------------------

[](#troubleshooting-disk_free_space-warning)

If you see `disk_free_space(): No such file or directory`, Omeka is checking a missing files directory. Ensure `files/files` exists and set the file store base path to the mounted volume.

Create the directory:

```
mkdir -p /mnt/volume-1/omeka/kpa/files/files
chown -R 65534:65534 /mnt/volume-1/omeka/kpa/files
```

Set file store paths in `local.config.php` (persisted in the mounted config dir):

`/mnt/volume-1/omeka/kpa/files/config/local.config.php`

```
