Last Updated: 3/9/2026
Application Backups
LinkAce provides an easy way to back up the whole application including the database.
Backup Destinations
- Local filesystem
- Any S3-compatible service:
- Amazon AWS S3
- Minio
- Backblaze B2
How It Works
Under the hood, LinkAce uses the Spatie Backup package . Consult the package documentation for advanced configuration.
Automatic Cleanup
By default, the backup system will periodically purge old backups. For more details, read the default configuration .
Configure the Backups
Note: The system cron should be configured for automatic backups to work correctly. However, you may also create backups manually (see below).
Step 1: Edit Your .env File
Add the following line:
BACKUP_ENABLED=trueStep 2: Edit Your docker-compose.yml
Create a Backup Folder
First, create a backup folder to store the backups. The folder must be writable for other users:
mkdir ./backups
chmod 0766 ./backupsUpdate docker-compose.yml
Open the docker-compose.yml file and remove the # in front of the backup volume line:
services:
app:
image: docker.io/linkace/linkace:latest
volumes:
- ./.env:/app/.env
- ./backups:/app/storage/app/backupsCustom Docker Setup
If you run a custom Docker-based setup (e.g., via Portainer), 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. All settings go to your .env file:
| .env setting | Possible values | Default value | Description |
|---|---|---|---|
BACKUP_ENABLED | true, false | false | Set to true to enable application backups |
BACKUP_DISK | local_backups, s3 | local_backups | Storage for backups: local_backups saves to /storage/app/backups, s3 saves to configured S3 storage |
BACKUP_CLEAN_HOUR | 24-hour time string | 01:00 | Hour for cleaning old backups. Format: ‘03:00’ for 3am or ‘14:00’ for 2pm |
BACKUP_RUN_HOUR | 24-hour time string | 02:00 | Hour for creating new backup |
BACKUP_NOTIFICATIONS_ENABLED | true, false | true | Set to false to disable email notifications for cleanups or backups |
BACKUP_NOTIFICATION_EMAIL | any email address | [email protected] | Valid email address to receive backup notifications |
BACKUP_MAX_SIZE | any number | 265 | Maximum size of all backups in Megabytes. Oldest backups deleted when reached |
BACKUP_ARCHIVE_PASSWORD | any string | none | Protect your backups with a password |
Example Configuration
BACKUP_ENABLED=true
BACKUP_DISK=s3
AWS_ACCESS_KEY_ID=j85nRkzOgnlGc...
AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B...
AWS_DEFAULT_REGION=eu-central-1
AWS_BUCKET=linkaceBacking Up to S3-Compatible Storage
To back up LinkAce to S3, add the following settings to your .env file:
| .env setting | Possible values | Default value | Description |
|---|---|---|---|
AWS_URL | A valid URL | empty | URL to access the AWS service or storage bucket. Often used for serving content via CloudFront |
AWS_ENDPOINT | A valid URL | empty | Custom endpoint URL for AWS services, used with non-standard AWS setups (e.g., local S3 emulators) |
AWS_BUCKET | any string | empty | Name of the S3 bucket where files will be stored or retrieved |
AWS_ACCESS_KEY_ID | any string | empty | AWS access key ID for authentication |
AWS_SECRET_ACCESS_KEY | any string | empty | AWS secret access key for secure authentication |
AWS_DEFAULT_REGION | any string | empty | AWS region where your bucket or resources are located (e.g., us-east-1) |
AWS_USE_PATH_STYLE_ENDPOINT | true, false | false | Use path-style (true) or virtual-hosted-style (false) URLs for S3 buckets |
Example S3 Configuration
BACKUP_ENABLED=true
BACKUP_DISK=s3
AWS_ACCESS_KEY_ID=j85nRkzOgnlGc...
AWS_SECRET_ACCESS_KEY=DA5nHUT2B2B...
AWS_DEFAULT_REGION=eu-central-1
AWS_BUCKET=linkaceUsing 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, set the correct endpoint in your .env file:
AWS_ENDPOINT=https://minio.example.com
# Some non-AWS services use paths to reference buckets and endpoints.
# If this is the case, add the following line:
AWS_USE_PATH_STYLE_ENDPOINT=trueManually 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:runRun a Backup via PHP
cd /path/to/your/linkace
php artisan backup:run