Skip to Content
Application Backups

Last Updated: 3/6/2026


Application Backups

Table of Contents

LinkAce provides an easy way to back up the whole application including the database to the local filesystem, or any S3-compatible service, including Amazon AWS S3, Minio or Backblaze B2. Under the hood LinkAce uses the Spatie Backup package. Please consult the documentation of the package for advanced configuration.

By default, the backup system will periodically purge old backups. For more details, read the default configuration .

Configure the backups

Please note that the system cron should be configured for automatic backups to work correctly. However, you may also create backups manually, see below.

Edit your .env file / environment variable

Add the following line to your .env file or environment variables:

BACKUP_ENABLED=true

Edit your docker-compose.yml

First, create a backup folder to store the backups. The folder must be writable for other users, otherwise LinkAce won’t be able to properly store the resulting files.

$ mkdir ./backups $ mkdir ./backups $ chmod 0766 ./backups $ chmod 0766 ./backups 0766

Now, open the docker-compose.yml file and remove the # in front of the - ./backups:/app/storage/app/backups line like this:

services: services: services # --- LinkAce # --- LinkAce # --- LinkAce app: app: app image: docker.io/linkace/linkace:latest image: docker.io/linkace/linkace:latest imagedocker.io/linkace/linkace:latest volumes: volumes: volumes - ./.env:/app/.env - ./.env:/app/.env ./.env:/app/.env - ./backups:/app/storage/app/backups - ./backups:/app/storage/app/backups ./backups:/app/storage/app/backups

If you run a custom Docker-based setup (e.g. via Portainer), please adjust your container to mount a writable directory into /app/storage/app/backups.

That’s it. LinkAce will now create backups every night at 2am.


Configuration for LinkAce backups

The following settings allow you to configure backups for LinkAce. All settings go to your .env file:

.env settingPossible valuesDefault valueDescription
BACKUP_ENABLEDtrue, falsefalseSet to true to enable the application backups
BACKUP_DISKlocal_backups, s3local_backupsThe storage for backups: local_backups saves the files to /storage/app/backups, s3 saves to your configured S3 storage
BACKUP_CLEAN_HOUR24-hour time string01:00Set the hour for cleaning old backups and creating a new one. Format must be in 24-hour time like ‘03:00’ for 3 am or ‘14:00’ for 2 pm.
BACKUP_RUN_HOUR24-hour time string02:00See above
BACKUP_NOTIFICATIONS_ENABLEDtrue, falsetrueSet this to false if you don’t want to receive any email notifications for cleanups or backups.
BACKUP_NOTIFICATION_EMAILany email address[email protected]Set a valid email address to receive notification about backups.
BACKUP_MAX_SIZEany number265The maximum size of all backups in Megabyte. Once reached the oldest backups will be deleted.
BACKUP_ARCHIVE_PASSWORDany stringnoneProtect your backups with a password.

The .env file or your environment variables should look like this:

BACKUP_ENABLED=true BACKUP_ENABLED=true =BACKUP_DISK=s3 BACKUP_DISK=s3 =AWS_ACCESS_KEY_ID=j85nRkzOgnlGc... AWS_ACCESS_KEY_ID=j85nRkzOgnlGc... =AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B... AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B... =AWS_DEFAULT_REGION=eu-central-1 AWS_DEFAULT_REGION=eu-central-1 =AWS_BUCKET=linkace AWS_BUCKET=linkace =

Backing up to any s3-compatible storage

To back up LinkAce to S3, add the following settings to your .env file:

.env settingPossible valuesDefault valueDescription
AWS_URLA valid URLemptyThe URL to access the AWS service or storage bucket. Often used for serving content via CloudFront.
AWS_ENDPOINTA valid URLemptyThe custom endpoint URL for AWS services, used when working with non-standard AWS setups (e.g., local S3 emulators).
AWS_BUCKETany stringemptyThe name of the S3 bucket where files will be stored or retrieved.
AWS_ACCESS_KEY_IDany stringemptyYour AWS access key ID, used for authentication to AWS services.
AWS_SECRET_ACCESS_KEYany stringemptyYour AWS secret access key, used alongside the access key ID for secure authentication.
AWS_DEFAULT_REGIONany stringemptyThe AWS region where your bucket or resources are located (e.g., us-east-1).
AWS_USE_PATH_STYLE_ENDPOINTtrue, falsefalseDetermines whether to use path-style (true) or virtual-hosted-style (false) URLs for S3 buckets.

The .env file or your environment variables should look like this:

BACKUP_ENABLED=true BACKUP_ENABLED=true =BACKUP_DISK=s3 BACKUP_DISK=s3 =AWS_ACCESS_KEY_ID=j85nRkzOgnlGc... AWS_ACCESS_KEY_ID=j85nRkzOgnlGc... =AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B... AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B... =AWS_DEFAULT_REGION=eu-central-1 AWS_DEFAULT_REGION=eu-central-1 =AWS_BUCKET=linkace AWS_BUCKET=linkace =

Using a third-party S3-compatible service

Instead of Amazon AWS S3, you can use any S3-compatible service. To connect to the service instead of AWS, you have to set the correct endpoint in your .env file. Near your other AWS_ settings, add the following line and replace the URL with your own service URL:

AWS_ENDPOINT=https://minio.example.com AWS_ENDPOINT=https://minio.example.com = # some non-AWS services use paths to reference buckets and endpoints. # some non-AWS services use paths to reference buckets and endpoints. # some non-AWS services use paths to reference buckets and endpoints.# If this is the case, add the following line: # If this is the case, add the following line: # If this is the case, add the following line:AWS_USE_PATH_STYLE_ENDPOINT=true AWS_USE_PATH_STYLE_ENDPOINT=true =

Manually creating backups

Instead of relying on the automated backup process, you may run backups manually:

Run a backup via Docker

$ docker exec linkace-app-1 php artisan backup:run

Run a backup via PHP

$ cd /path/to/your/linkace $ php artisan backup:run