Redmine attachment storage: where uploads live and why it matters before go-live
Before a team puts Redmine into production, it needs to decide where issue attachments and wiki files are stored. The files directory is set by attachments_storage_path, and that location must be planned together with disk sizing, backups and the preview tools that generate thumbnails and previews. Changing the path later means moving existing files, updating backups and checking that every app server reads the same location, so the decision belongs in the design phase rather than after users start uploading.
Teams usually need this planning when attachments are large (scanned contracts, build logs, design files), when issue data falls under regulated obligations such as personal data or customer records, or when Redmine runs on several app servers that must all see the same uploads. In a self-hosted deployment, the organization owns every part of this: the volume that holds the files, its capacity growth, its encryption and access rules, its backup schedule and its restore testing. Redmine is free under GPL v2, so the cost of storage is hosting, disk, backup and operations time rather than a license fee. Ask your team or partner to confirm, in writing, who owns the volume, how it is backed up alongside the database, and how the files directory is restored to a consistent point in time with it.
Preview support adds its own dependencies. Redmine's optional components include ImageMagick, Ghostscript and Pandoc, and each must be installed and reachable from the application's runtime environment before previews work. Confirm the exact versions and package sources with your platform team and the Redmine installation guide before go-live, and test a representative set of file types, including large images and PDFs, on a staging copy. Treat these converters as part of the attack surface, since they parse untrusted uploads, and plan their patching alongside Redmine itself.
Choosing a storage location for uploads
A directory on the Redmine host's local disk is the simplest option. Redmine reads and writes uploads under the path set by attachments_storage_path in configuration.yml, so the application and its files share one host and one set of ownership rules. Because the files sit on the same machine as the application, troubleshooting and capacity checks stay in one place.
- Backup coupling: Capture the database dump and a copy of the files directory in the same maintenance window. An attachment row without its file, or a file without its row, is difficult to explain to users after a restore.
- Permission model: The directory must be writable by the account that runs the Redmine process and should not be readable by other local accounts. Confirm the owner and mode in your own environment before go-live.
- Capacity planning: Size the volume for expected upload growth, plus room for backup staging and any file moves during maintenance. Ask the team to base the sizing on current upload volume.
- Multiple app servers: Local disk is not shared between hosts. Each server would hold only the uploads it received, so this option fits a single application server.
Check that the volume is monitored for free space and that the backup job includes the files directory as well as the database.
An NFS or SMB share mounted on the host gives Redmine the same directory interface as local disk while the files live on storage that another team may manage. The operating system performs the mount, so Redmine sees an ordinary path. The main risks sit in the mount itself: how it behaves at boot, how it fails and who restores it.
- Backup coupling: A storage team may back up the share on its own schedule. Agree a shared restore point with the database backup, or Redmine could be restored with rows that point to files from a different time.
- Permission model: Ownership and mode bits depend on the share protocol and its export or share settings. Confirm how user and group IDs map between the Redmine host and the file server, then test a write as the Redmine user.
- Mount failure: If the share is unavailable at boot or drops during operation, uploads and downloads can fail. Make the mount a dependency of the Redmine service and monitor it separately.
- Multiple app servers: Several hosts can mount the same path, which is a common way to share uploads across application servers. Whether concurrent writes, file locking and caching behave safely depends on the protocol and the product, so confirm this with your storage vendor.
Before production, ask the storage vendor to confirm locking, consistency and failover behavior for the protocol you plan to use.
When Redmine runs in the official container image, uploads are kept in a volume mounted into the container at the files directory. The volume is managed by Docker or the orchestration platform, and its lifecycle is separate from the container's. Replacing or rebuilding the container leaves the volume in place, but nothing in that process copies the volume to a backup, so the volume must be named and backed up explicitly.
- Backup coupling: Back up the volume together with the database dump. A new container image does not restore uploads, and a database restore without the matching volume leaves broken attachment links.
- Permission model: The user ID the container runs as must be able to write the files it creates. Host-side ownership can drift after a host move or an image change, so test uploads after each image update.
- Volume driver: A local driver keeps data on one host. A volume backed by a shared driver for several hosts depends on that driver's behavior, which you should confirm with its vendor.
- Multiple app servers: Containers on different hosts do not share a local volume. Plan shared storage before running more than one container, and keep the files path identical on every replica.
Run a restore test that starts a fresh container against a restored volume and database, then open a sample of attachments.
The right option follows from how many application servers you run, who operates the storage and how backups are already handled. Start from the number of Redmine nodes, because that decides whether uploads must be shared at all. Then check whether the storage choice fits the backup and restore process your organization already runs.
- Single application server: Local disk or a Docker volume is usually the simplest choice to back up alongside the database.
- Several application servers: Every node must read and write the same uploads. The Redmine configuration can point all nodes at one shared path, but the behavior of that path must be confirmed with the storage platform.
- Storage ownership: If another team runs the storage, put the restore point, backup schedule and recovery owner in writing.
- Vendor questions: Ask about file locking, consistency under concurrent writes, failover, and whether snapshots are consistent with a database dump taken at the same time.
- Restore tests: Restore the database and files into a separate environment, then check attachments before go-live.
Record the chosen path in the deployment design so the backup, monitoring and upgrade runbooks all refer to the same location.
Configuration options for attachment storage and previews
This table compares the four settings and tools that shape where Redmine keeps uploads and how it renders previews. Read each row for when the option fits, the main trade-off, and what to verify before you go live. The main takeaway is that storage location, subdirectory layout and pruning decisions are easier to set before data accumulates than to change later.
| Option | When it fits | Main trade-off | What to verify |
|---|---|---|---|
| attachments_storage_path | Any production install that needs uploads on a dedicated volume, separate from the application code | Every app server must see the same path, so local disk on several hosts will split files apart | Path is writable by the Redmine process user, sits on a volume included in backups, and matches the path used by every app server |
| Subdirectory layout (redmine:attachments:move_to_subdirectories) | Existing installs where many files sit loose at the root of the files directory and directory listings or backups slow down | Moving files changes their on-disk location, so the move must run with a current backup and Redmine stopped or quiet | Take a backup first, run the task on a copy or staging instance, then confirm attachments still open and download from issues |
| Prune task (redmine:attachments:prune) | Installs where users often start uploads and abandon them before saving the issue or wiki page | The task removes uploads that were never attached after one day, so a user who waits longer than that to save will lose the file | Confirm the schedule with your team, review the task output on a test copy, and keep backups so accidental removals can be restored |
| ImageMagick | Teams that expect thumbnails of image attachments in issue and wiki views | Adds a system package to maintain and image processing can consume CPU and memory on large files | Installed binary is on the Redmine process PATH, supported image types render, and the package is patched with the host |
| Ghostscript | Teams that attach PDFs and want first-page previews generated | Adds another system package with its own security patch history and processing cost on large documents | PDF thumbnails render for a sample file, the package version is tracked, and generated output stays within your data handling rules |
| Pandoc | Teams that want converted text previews of document formats such as Word or Markdown files | Conversion runs external tooling on user-supplied documents, so it widens the attack surface of the uploads path | Conversion works for the formats you allow, the package is patched, and you have reviewed which formats are accepted from users |
| Preview tools as a group | Installations that serve several app servers or run in an air-gapped network | Each server needs the same tool versions, or previews will differ or fail between nodes | Tool versions match on every app server, and the package source is available inside your network if there is no internet access |
Setting up the files directory and preview tools
This sequence takes a Redmine server from an unconfigured files location to a tested upload path, working thumbnails and previews, tidy storage layout, and a scheduled prune that is verified not to touch live attachments.
Choose and mount the storage path
The Redmine administrator or platform engineer picks a directory on storage the server controls, sized for expected attachment growth and included in backups. Create it, mount it if it is a separate volume, and set ownership so the user running the Redmine process can read and write it, and no other local user can. For the official Docker image, mount this path as the files volume instead. Done when a test file written as the Redmine user succeeds and the same write as another user fails, and the mount survives a reboot.
Set attachments_storage_path in configuration
Edit the Redmine configuration file, usually config/configuration.yml, and set attachments_storage_path to the absolute path chosen in the previous step. Restart the application server so the setting loads. Confirm the value Redmine reports under the administration information page matches the intended path. Done when the path shown in the administration screen matches the mounted directory and no uploads are written to the old location.
Test an upload and download
Log in as a non-administrator test user, attach a small text file and a small image to a test issue, and save. Download both files and compare checksums with the originals. Then locate the stored files on disk under the configured path and confirm they exist with the expected ownership. Delete the test issue afterwards and note that the files may remain until the prune task runs. Done when both downloads match the source files byte for byte and the stored files appear under the configured directory.
Install ImageMagick, Ghostscript and Pandoc
The system administrator installs the three optional tools on the application host or inside the container image, using packages from the operating system or a vetted internal mirror. Confirm each binary is on the PATH of the Redmine process user, then check the Redmine installation guide and the Redmine version you run for the required versions and any policy settings that restrict ImageMagick. Done when each tool reports its version from the Redmine user account and an uploaded PDF and an image both show a thumbnail or preview on the issue page.
Move root-level files into subdirectories
Files written by older Redmine releases or manual copies may sit directly in the root of the files directory. Take a backup of the files directory first. Then run the rake task redmine:attachments:move_to_subdirectories from the Redmine root with the production environment set, as described in the rake tasks wiki. Run it once on a copy or during a maintenance window if the directory is large. Done when no regular files remain at the top level and every previously working attachment still downloads correctly.
Verify attachments after moving files
Pick a sample of attachments across several projects, including older ones, and download each one through the web interface. Compare file counts and sizes between the backup and the reorganized directory. Check the database attachment records still point to files that exist. Done when the sample downloads succeed and the counts reconcile, and the backup is retained until this check is signed off by the owner of the data.
Run a dry check before pruning
Before scheduling anything, list the uploads the prune task would consider. Redmine's redmine:attachments:prune task removes uploads that were never attached after one day, so confirm the scheduler runs as the Redmine user, that the system clock is correct, and that no workflow stores pending uploads for longer than a day. Record the count of unattached records in the database and the matching files on disk. Done when you have a written baseline of these counts and the owner of the process has approved it.
Schedule the prune and confirm live attachments survive
Add redmine:attachments:prune to the scheduler, such as cron or a systemd timer, with the production environment set and output captured to a log. After the first run, compare the attachment count and a sample of live downloads with the baseline from the previous step. Confirm that every attachment linked to an issue, wiki page or document still downloads. Done when the log shows the expected removals, live attachment counts are unchanged, and the schedule is documented with an owner.
How uploads, the database and preview tools fit together
The diagram starts with a user uploading a file through the Redmine web interface. Redmine writes the attachment's metadata to the database and stores the file bytes under the files directory, so the two must be backed up together. When a preview is requested, Redmine calls ImageMagick, Ghostscript or Pandoc on the stored file, which is why those tools need to be installed and reachable by the application. Check that the database and the files directory are captured in the same backup window.
Uploads write metadata to the database and files to disk, and previews call external tools.
Protecting uploaded files in production
Attachments in Redmine inherit the permissions of the issue or wiki page they belong to, so the protection of files depends on project roles and on the server holding the storage directory. The cards below cover the controls that connect those layers: who can reach a file, how the storage path is locked down, how preview tools are kept safe, and how files stay in step with the database through backups and deletion.
Access inherited from issue and wiki permissions
Redmine does not give attachments their own access list. A user who can view an issue or wiki page can download its files, and a user who loses view rights loses access to them too. Before go-live, test the attachment download path with a user from each role, including users in private issues and in projects that are closed or archived. Check that the attachment links on private issues do not appear in notification emails sent to people outside the project.
Redmine rake tasksPermissions on the storage path
Uploads are written to the directory set by attachments_storage_path, and the application user needs read and write access to it. Nothing else on the host should be able to list or read that directory. Confirm the owner, group and mode of the path, keep it out of any web-served document root, and check that backup agents and admin accounts are the only other readers. Redmine files are not encrypted by the application, so disk-level encryption and restricted host access are the main controls.
Untrusted files and preview converters
Thumbnails and previews are produced by external tools such as ImageMagick, Ghostscript and Pandoc, which parse files that any user with upload rights may supply. A malformed image or PDF can exploit a converter bug, so treat these tools as an exposed attack surface. Install them from your OS vendor's maintained packages, apply security updates on the same cadence as the rest of the host, and confirm which converter versions the running Redmine actually calls after each update.
Files restored together with the database
Database rows point to files on disk, so a backup of the database without the files directory produces attachments that show as missing after a restore. Back up the database and the files directory in the same job and at the same schedule, and test a restore into a separate host. Ask your team to confirm that the backup covers the subdirectory layout created by the move_to_subdirectories task, since files moved there must be captured too.
Retention of deleted and orphaned attachments
Removing an attachment from an issue removes its record, but the file deletion behavior and any copies in backups depend on your backup retention, not on Redmine. Uploads that were never attached to an issue or page are cleared by the prune task, which removes unattached uploads after one day. Set a written retention period for backups, decide who approves early deletion of sensitive files, and run the prune task on a schedule so unattached uploads do not accumulate.
Questions teams ask about Redmine attachment storage
How much disk should we plan for Redmine attachments?
No researched figure exists for how much disk a given Redmine install needs, so plan from your own usage. The main drivers are how many issues and wiki pages receive files, average file size, how long attachments must be kept, and whether you keep a second copy for backups. Measure your current file share or any previous tracker export for a few months, multiply by your retention period, then add headroom for growth and for the backup target. Ask any partner quoting the work to show the sizing assumptions in writing, and confirm the actual growth with your own monitoring after go-live. Disk is usually a recurring cost, while the initial sizing and storage layout are one-time work.
Can our own team set up Redmine attachment storage without a partner?
Yes, if your team already runs Redmine and Linux file systems. Setting the storage path is a configuration change, and the maintenance tasks are rake tasks that your team can run. The work becomes harder when you must move a large existing file set without downtime, set file permissions for the application user, align backups with the files directory, and test restores. A partner is useful when you lack that operations experience or need the storage design documented for an audit. Either way, the decision depends on your team's capacity and your change windows, not on the feature itself.
What does the storage work require from our team?
Expect to provide access to the current Redmine host or container, the current files directory location, and a list of who owns the storage platform. You will also need to confirm the backup schedule, the retention rules for issue data, and the change window for any move. Your team should be ready to approve the storage path and ownership model, review the restore test, and name someone who will run the periodic maintenance tasks. If Redmine runs in Docker, add the volume layout and host storage details to the list.
How do we move existing Redmine files into subdirectories safely?
Redmine's rake task redmine:attachments:move_to_subdirectories moves files stored at the root of the files directory into subdirectories. Before running it, stop the application or schedule a window, take a full backup of the database and the files directory, and confirm you have a restore path. Run the task against a copy of the production data first, check that attachments open correctly from the web interface, and then repeat on production. Keep the backup until you have verified several downloads and a restore test. Confirm the exact task behavior and arguments against the rake tasks documentation for your Redmine version.
What does pruning delete in Redmine, and what does it leave alone?
The redmine:attachments:prune task removes uploads that were never attached after one day. In practice, these are files a user uploaded through a form but never saved to an issue, wiki page or other object, so they remain orphaned. Attachments linked to issues, wiki pages or other records are not in that category and should remain. Run the task in a dry environment first, check the output, and keep a backup before the first run on production. Schedule it as a recurring maintenance job only after your team understands the output, and document the schedule for your operations and compliance records.
Do Redmine file previews need extra packages like ImageMagick or Pandoc?
Yes, previews and thumbnails depend on optional components. The Redmine installation guide lists ImageMagick, Ghostscript and Pandoc as optional components, and they support image thumbnails, PDF and document rendering. Without them, Redmine still stores and serves the files, but some previews will not render. Install the packages from your distribution or your container image, verify the versions your Redmine release supports, and check each preview type after installation. In an air-gapped network, plan the package mirror in advance so the tools can be installed and updated offline.
Does attachment storage affect security or compliance evidence?
Yes. Attachments often contain personal data, contracts or incident evidence, so the files directory needs the same access, backup and retention controls as the database. Restrict file system permissions to the Redmine application user, keep backups encrypted and access-controlled, and define how long orphaned or deleted files remain. Record the storage design, pruning schedule and restore tests as evidence. DeployOpen prepares these controls and evidence for compliance assessments, but it does not issue audit reports or certifications; independent auditors and certification bodies do that.
What to confirm in your environment before go-live
Attachment storage depends on choices made outside Redmine: the tool versions on the host or image, the shared storage behind the files directory, the cleanup tasks you schedule, and the proxy in front of the application. Confirm each item against your own environment before users upload real project files.
Installed tool versions
Thumbnails and previews depend on ImageMagick, Ghostscript and Pandoc, and each must be installed at a version that your Redmine release supports. Check the exact versions against the Redmine installation guide for the Redmine line you run, because a package that is present but outdated can fail on some file types. Record the versions in your build notes so that an operating system update does not change preview behavior without anyone noticing. Confirm versions before testing previews.
Installation guideShared storage locking and latency
If the files directory sits on network storage, confirm that the storage offers the file locking and latency that Redmine needs when several processes write attachments at the same time. Ask your storage team whether the mount is shared safely across every application node and whether it can be restored to a consistent point together with the database. Test an upload, a download and a delete from each node before go-live. Latency problems usually appear first as slow attachment pages rather than as errors.
Prune behavior on your version
The redmine:attachments:prune task removes uploads that were never attached to an issue or other record after one day. Before you schedule it, run it in a test environment on your Redmine version and confirm which files it deletes, because cleanup behavior can change between releases. Also confirm that a backup exists before the first real run, since a deleted upload cannot be recovered from the database alone.
Upload size limits at the proxy
Attachment uploads usually fail at the reverse proxy before they reach Redmine, so the proxy body size limit must match the Redmine attachment limit you configure. Confirm the limit on every hop, including any load balancer or ingress controller, and test with a file just under the limit and one just over it. Check that the proxy timeout is long enough for large uploads over slow links, and that error pages make a rejected upload visible to the user.
Tool placement for your deployment method
With the official Docker image, the tools must exist inside the container image that Redmine runs, while on a Linux host they must be on the path the application process uses. A tool installed for an interactive shell may be missing for the service user, and a tool added to a running container disappears when the container is replaced. Confirm that the Redmine process can execute each tool and that a preview test passes after a restart and after a container rebuild.
How the storage plan is scoped and delivered
The storage plan starts with a short written inventory of what Redmine will hold. DeployOpen asks how many projects will attach files, which file types users upload most (scanned PDFs, CAD drawings, office documents and screenshots are the usual heavy hitters), how long attachments must be kept, and whether any project has a legal hold or a deletion obligation. Those answers set the size of the files directory and the growth rate that the disk plan has to absorb. The same conversation covers the attachments_storage_path location, the filesystem or volume it sits on, and whether that volume is shared with the database or the operating system. Anything the client cannot answer yet, such as expected yearly growth, is recorded as an open item with an owner, so the plan does not quietly assume a number nobody has checked.
DeployOpen then documents the layout as built. The record covers the storage path in each environment, the subdirectory scheme in use, the ownership and permissions of the web and background processes, the backup schedule for the files directory and its pairing with the database dump, and the maintenance tasks that touch uploads. The team tests a full restore into a separate environment: the database and files directory are brought back together, Redmine is started, and a sample of attachments is opened and checked against the originals. A restore test that only confirms the files exist is not enough, because a missing or mismatched database row leaves an attachment unreadable even when the bytes are present. Results, timings observed during the test and any gaps are written into the handover.
The work is delivered as a fixed-scope written agreement. The agreement names the environments covered, the storage paths and deliverables, the restore test scope and the handover items, and it states what the client must provide, such as access to the hosts, backup targets and a test window. Changes to scope are made in writing before they are carried out. The handover package includes runbooks for adding capacity, running the prune and move tasks safely, restoring from backup and verifying previews after a tool update. Ask any provider to show a sample runbook and a restore test report before signing, and confirm with your own platform team who will own each runbook after handover.
How DeployOpen delivers Redmine storage and preview setup
DeployOpen plans where Redmine keeps uploaded files, sizes the disk and sets up the preview tools against your retention and access rules. We build and test the configuration in infrastructure you control, then hand over the settings, runbooks and maintenance tasks your team needs to run it.
How we scope
- The written scope names the storage location, the files directory, and the disk and backup targets agreed with your team.
- Scope lists which preview tools are installed (ImageMagick, Ghostscript, Pandoc) and which file types must render.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before any change is made.
How we build
- We set attachments_storage_path, move any root-level files into subdirectories, and verify uploads and downloads on a test instance first.
- We install and configure the preview tools, then test thumbnails and previews against the file types in your scope.
- We test pruning of never-attached uploads in staging before any scheduled run is enabled on production data.
How we hand over
- You receive the configured paths, tool versions, file permissions and the backup scope for the files directory.
- You receive a runbook covering the prune and subdirectory rake tasks, what each does, and when to run them.
- Your team receives a walkthrough of the restore test and the checks that confirm attachments survived an upgrade.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, covering storage growth and tool updates.
- Retainers can include re-checking preview tools after Redmine upgrades, since upgrades depend on backed-up uploads.
- Ask for the support scope, response expectations and change process in writing before the engagement starts.

