Upgrade Guide

This document provides detailed instructions for upgrading Securaine to newer versions safely and efficiently in production environments.

Important: Always back up your existing project before performing an upgrade.


πŸš€ Upgrade Workflow

βœ… 1. Backup Existing Installation

Before any upgrade:

Note: If you are using AWS S3 storage, ensure your bucket configuration and credentials are backed up securely. Do not include secrets in public backups.


πŸ“¦ 2. Download the New Version


Before upgrading production:


πŸ” 4. Merge or Replace Files

Carefully replace or merge files. Recommended steps:

Replace / Merge

Description

/app/Controllers/

Replace unless you've customized logic.

/app/Services/

Replace unless you've extended them. Review attachment, storage, and mail services carefully.

/app/bootstrap.php

Replace (contains bootstrap updates).

/views/form.blade.php

Manually merge if you made customizations.

/views/layouts/

Replace or merge UI layout updates.

/views/email/

Review email templates if attachment handling or email formatting changed.

/lang/

Add or update language files as needed.

/public/assets/

Replace for updated CSS/JS and UI improvements.

/routes/

Replace if routes were updated.

/storage/

Preserve your logs, cache, secure metadata, and generated files. Do not replace.

.env

Do not overwrite. Copy any new variables from .env.example.

.htaccess

Replace only if instructed.


βš™οΈ 5. Update Configuration

After replacing files:

  1. Open your existing .env file.

  2. Compare it with the new .env.example file.

  3. Add any new environment variables introduced in the update.

Example:

+ CAPTCHA_PROVIDER=turnstile
+ TURNSTILE_SITEKEY=your-new-site-key
+ TURNSTILE_SECRET=your-new-secret
+ ATTACHMENT_DELIVERY_MODE=attachment

πŸ“Ž Attachment Delivery Configuration

Newer versions include configurable attachment delivery handling.

Review:

app/config.php

Verify the attachment_delivery section:

'attachment_delivery' => [
    'enabled' => true,
    ...
],

Attachment Delivery Modes

Mode

Behavior

attachment

Files are uploaded and attached directly to outgoing emails. No download metadata is generated.

link

Files are stored privately and delivered through protected download links with optional expiration, password protection, and download limits.


If upgrading from a version before secure attachment links:

Verify:

storage/
β”œβ”€β”€ secure-meta/
β”œβ”€β”€ logs/
└── cache/

The following folder must exist and be writable:

storage/secure-meta/

This directory stores:

Do not manually edit generated metadata files unless troubleshooting.


☁️ Storage Configuration Review

If using local storage:

Verify:

storage/secure-files/

permissions and uploaded files.

If using AWS S3:

Verify:

Files used for secure download links should remain private. Public bucket access is not required.


🧹 6. Clear Cache

If your previous installation or server cached compiled views, language files, or configs, clear them manually.

# Navigate to your installation folder
cd /path-to-your-site/storage/cache

# Delete all contents inside the /cache folder
rm -rf *

βœ… Ensure the storage/cache/ folder remains intact but empty after this.


βœ… 7. Test the Upgrade

Once everything is uploaded and configured:

Check:

Attachment Testing

Test both delivery modes.

Direct Attachment Mode

Environment:

ATTACHMENT_DELIVERY_MODE=attachment

Verify:

Environment:

ATTACHMENT_DELIVERY_MODE=link

Verify:

storage/secure-meta/

πŸ“‹ 8. Changelog Access

The changelog is not bundled inside the software package. To see what’s new:

πŸ”— Visit the official Securaine Changelog Page.


πŸ’¬ 9. Support for Paid Licensed Users

If you need help upgrading or encounter issues:

πŸ› οΈ Create a ticket via our Helpdesk.

Provide your:


🧾 Final Checklist

Task

Status

πŸ”½ Downloaded latest .zip

βœ…

πŸ“ Extracted & uploaded files

βœ…

πŸ“ .env and .htaccess renamed & updated

βœ…

πŸ”§ Reviewed config.php

βœ…

πŸ“Ž Reviewed attachment delivery configuration

βœ…

☁️ Verified storage configuration

βœ…

πŸ—‚οΈ Checked storage/secure-meta/ permissions

βœ…

🧹 Cleared storage/cache/

βœ…

πŸ“¬ Tested form functionality

βœ…

πŸ“Ž Tested attachment delivery mode

βœ…

πŸ“ž Support ready (if needed)

βœ…


πŸ“Œ Notes

views/email/
views/form.blade.php
views/layouts/
app/config.php
storage/secure-meta/

πŸ“ Manual Customizations

If you've made manual changes to any of the following:

…you must carefully merge updates instead of simply replacing files.

Use a tool like Beyond Compare, Meld, or Git diff tools to assist with merging.