Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kryotex's avatar

Forge and MinIO

Im thinking of using forge for a project im currently working on. But im not sure if this will work with minio which is required for my use case. Does anybody have experience with those two working together ?Thanks for your kind advice

0 likes
7 replies
LaryAI's avatar
Level 58

Certainly! Laravel Forge is a server provisioning tool and does not directly manage your storage solutions, but it provisions servers where you can deploy your Laravel applications. MinIO is an S3-compatible object storage server, and Laravel supports S3-compatible drivers out of the box.

How to use MinIO with Forge:

  1. Provision your server with Forge as usual.

  2. Deploy your Laravel app to the server.

  3. Install and configure MinIO:

  4. Configure Laravel to use MinIO:

    • In your .env file, set the following:
    FILESYSTEM_DISK=s3
    
    AWS_ACCESS_KEY_ID=your-minio-access-key
    AWS_SECRET_ACCESS_KEY=your-minio-secret-key
    AWS_DEFAULT_REGION=us-east-1
    AWS_BUCKET=your-minio-bucket
    AWS_ENDPOINT=http://your-minio-server:9000
    AWS_USE_PATH_STYLE_ENDPOINT=true
    
    • In config/filesystems.php, ensure your s3 disk looks like this:
    's3' => [
        'driver' => 's3',
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION'),
        'bucket' => env('AWS_BUCKET'),
        'endpoint' => env('AWS_ENDPOINT'),
        'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
    ],
    
  5. Test your storage by uploading a file using Laravel’s Storage facade:

    use Illuminate\Support\Facades\Storage;
    
    Storage::disk('s3')->put('test.txt', 'Hello MinIO!');
    

Summary:
Yes, Forge and MinIO work perfectly together. Forge provisions your server, and MinIO acts as your S3-compatible storage. Just configure your Laravel app to use MinIO as described above.

Let me know if you need help with a specific part of the setup!

Kryotex's avatar

@LaryAI What would be a good Alternative to minio and therefore s3 ? Maybe Something that would Not require a whole new Service to Run?

Kryotex's avatar

@frankielee than you for your reply but this was Not exactly what i meant, for me the question was more of the Likes of: what alternatives are viable for larger Projects ? Is local File storage an Option there ? Or are there other alternatives to s3 there that might be useful ?

My customer basically hast Tasks with files attached to it ( Up to 50mb per File) that act as documentation and need to be uploaded to somewhere. Maybe you have some Insights what I could use ?

Sorry for Not making this clear enough my Bad.

Kryotex's avatar

@frankielee and thanks you for pointing Out digital ocean r2, will definetly Look into this because WE are going to deploy there anyway ☺️☺️👍

frankielee's avatar

@Kryotex No worries.

what alternatives are viable for larger Projects ? Is local File storage an Option there ? Or are there other alternatives to s3 there that might be useful ?

My customer basically hast Tasks with files attached to it ( Up to 50mb per File) that act as documentation and need to be uploaded to somewhere. Maybe you have some Insights what I could use ?

Since you mentioned the projects are large, S3 would be a better option here. It's better to store files on a separate server so you don't have to worry about your application server's storage getting overwhelmed. Additionally, S3 is definitely better in terms of scalability

1 like
Kryotex's avatar

@frankielee thank you very much for your Insights, so my Plan ist for now Testing with minio (local Development) and then Go for digital ocean r2 👍

1 like

Please or to participate in this conversation.