PHPackages                             aeliot/osticket-storage-gcs - 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. aeliot/osticket-storage-gcs

ActiveLibrary

aeliot/osticket-storage-gcs
===========================

osTicket plugin: Google Cloud Storage backend

1.0.1(yesterday)00GPL-2.0-onlyPHPPHP &gt;=8.1CI passing

Since Apr 6Pushed yesterdayCompare

[ Source](https://github.com/Aeliot-Tm/osticket-storage-gcs)[ Packagist](https://packagist.org/packages/aeliot/osticket-storage-gcs)[ RSS](/packages/aeliot-osticket-storage-gcs/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

osTicket: Google Cloud Storage (attachments)
============================================

[](#osticket-google-cloud-storage-attachments)

This plugin registers a **file storage backend** for osTicket so new ticket attachments (and other files stored through the same mechanism) are saved as objects in a **Google Cloud Storage** bucket instead of the database.

**Plugin ID:** `osticket:storage-gcs`
**Backend code:** `G` (shown in the system “Store Attachments” dropdown as `Google Cloud Storage (bucket/prefix)`).

Requirements
------------

[](#requirements)

- osTicket **1.17+** (see `ost_version` in `plugin.php`).
- PHP **8.0+** with extensions required by `google/cloud-storage` (e.g. JSON, OpenSSL).
- A GCS **bucket** and a **Google Cloud service account** key (JSON) with appropriate permissions (see below).
- Composer dependencies installed in this directory (`vendor/autoload.php` must exist or the plugin will not register the storage backend on bootstrap), **unless** you use the pre-built **PHAR** release (dependencies are bundled inside the archive).
- PHP **Phar** support (`ext-phar`) enabled if you install from a `.phar` file.

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

[](#installation)

### From PHAR (GitHub release)

[](#from-phar-github-release)

Use this when you deploy from a release asset instead of a git checkout.

1. Download **`osticket-storage-gcs.phar`** from the [GitHub Releases](https://github.com/Aeliot-Tm/osticket-storage-gcs/releases) page for the version you want (the file is attached to each release after CI builds it).
2. Copy the file to your osTicket **`include/plugins/`** directory, keeping the name **`osticket-storage-gcs.phar`** (same basename as the source folder so install paths stay predictable).
3. **Do not** run Composer in `include/plugins/` for this layout—the PHAR already contains `vendor` and `plugin.php` at the archive root.
4. In **Admin Panel → Manage → Plugins**, add the plugin if it is not registered yet, then **enable** it and open **configuration**.

If you previously used the unpacked directory under `include/plugins/osticket-storage-gcs/`, disable or remove that installation before switching to the PHAR (only one layout should exist for this plugin id), then add the PHAR-based plugin again from the plugins list if needed.

### From source (directory + Composer)

[](#from-source-directory--composer)

1. Copy the plugin folder to `include/plugins/osticket-storage-gcs/` (or install from your deployment process).
2. From the plugin directory, install PHP dependencies:

    ```
    composer install --no-dev
    ```

    In Docker-based setups (example):

    ```
    docker compose exec php-fpm sh -c 'cd /var/www/html/include/plugins/osticket-storage-gcs && composer install --no-dev'
    ```
3. In **Admin Panel → Manage → Plugins**, add/install the plugin if it is not already listed, then **enable** it and open its **configuration**.

Plugin configuration
--------------------

[](#plugin-configuration)

Open the plugin instance settings and fill in:

SettingDescription**GCS bucket name**Name of the target bucket (e.g. `my-project-osticket-attachments`).**Object key prefix**Optional prefix for object names (no leading slash), e.g. `osticket/prod`. Helps separate environments in one bucket.**Service account credentials**Either paste the **full service account JSON key** contents, or enter an **absolute filesystem path** to a JSON key file that PHP can read (recommended in production: mount a secret and use the path). The JSON must include `private_key` and `client_email`.**Default signed URL lifetime (seconds)**Optional. If empty, signed download URLs follow the same “expire at midnight UTC” style behaviour as the official S3 storage plugin when osTicket does not pass a shorter TTL. If set, that many seconds are used as the default lifetime in those cases.Saving the form runs a **connectivity check** (`bucket->info()`). If it fails, fix the bucket name, IAM, or credentials before continuing.

### Google Cloud IAM (summary)

[](#google-cloud-iam-summary)

Grant the service account at least:

- Object read/write/delete on the bucket (e.g. **Storage Object Admin** on the bucket, or a custom role with `storage.objects.*` as needed).

For **V4 signed URLs** (redirect downloads), the account typically also needs permission to **sign blobs** (e.g. **Service Account Token Creator** on itself, or use a signing method supported by your environment as described in [Google Cloud signed URLs](https://cloud.google.com/storage/docs/access-control/signed-urls)).

Selecting the default storage backend
-------------------------------------

[](#selecting-the-default-storage-backend)

Enabling the plugin alone does **not** move attachments to GCS. You must set the system default storage to this backend.

1. Go to **Admin Panel → Settings → System** (or your equivalent **System** settings page).
2. Under **Attachments Storage and Settings**, set **Store Attachments** to the entry labelled **`Google Cloud Storage (...)`** (bucket/prefix as configured).

[![Store Attachments: select Google Cloud Storage](docs/img.png)](docs/img.png)

3. Save settings.

After this, **new** uploads use backend **`G`**. Existing attachments stay on their previous backend until you migrate them (if you use osTicket’s file migration tools).

### Verify that objects land in GCS

[](#verify-that-objects-land-in-gcs)

- Upload a new attachment and confirm in the database (`ost_file` or your prefixed table) that the row’s **`bk`** column is **`G`**.
- List objects in the bucket (Console or `gsutil ls gs://YOUR-BUCKET/your-prefix/`).

If **`bk`** stays **`D`** (database) despite the plugin being enabled, the **`G`** backend is usually not registered (missing `vendor/autoload.php`) or the default storage dropdown was not switched to Google Cloud Storage.

Troubleshooting
---------------

[](#troubleshooting)

- **`vendor/autoload.php` missing:** run `composer install` in the plugin directory (source install only). If you use the **PHAR**, ensure the file is readable under `include/plugins/osticket-storage-gcs.phar` and that the **Phar** extension is loaded.
- **Silent fallback to database:** osTicket may catch upload errors and try the next backend. Check PHP / osTicket logs and confirm IAM, bucket name, and credentials.
- **Path to JSON in Docker:** use a path inside the mounted application tree (e.g. under `/var/www/html/...`) so the PHP process can read the file.
- **Plain “File not found” after saving a reply with an attachment (PHAR install):** osTicket reads file bytes over HTTPS for mail and other paths; the plugin forces a **host CA bundle** for Guzzle when code runs from a PHAR. If it still fails, set `openssl.cafile` (or `curl.cainfo`) in `php.ini`to your system bundle (e.g. `/etc/ssl/certs/ca-certificates.crt` on Debian/Ubuntu).

License
-------

[](#license)

See the `LICENSE` file in this repository.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.0

1.0.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/56d81f2702c20990da8d701ba1083e398c94cfcadfdd27b1a90e7791aac92053?d=identicon)[aeliot-tm](/maintainers/aeliot-tm)

---

Top Contributors

[![Aeliot-Tm](https://avatars.githubusercontent.com/u/8513062?v=4)](https://github.com/Aeliot-Tm "Aeliot-Tm (13 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/aeliot-osticket-storage-gcs/health.svg)

```
[![Health](https://phpackages.com/badges/aeliot-osticket-storage-gcs/health.svg)](https://phpackages.com/packages/aeliot-osticket-storage-gcs)
```

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M70](/packages/kreait-firebase-php)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[shopware/shopware

Shopware 5 is an open source e-commerce software made in Germany

1.3k746.6k35](/packages/shopware-shopware)[league/flysystem-google-cloud-storage

Google Cloud Storage adapter for Flysystem.

2316.7M45](/packages/league-flysystem-google-cloud-storage)[spacecatninja/imager-x

Ninja powered image transforms.

29390.0k22](/packages/spacecatninja-imager-x)[spatie/flysystem-google-cloud-storage

Flysystem adapter for Google Cloud Storage

25549.6k](/packages/spatie-flysystem-google-cloud-storage)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
