When running Decidim with Docker in production makes sense
Docker makes sense when your organization wants Decidim packaged, versioned and redeployed the same way across environments, and when your infrastructure team already runs container platforms they can operate. It does not make Decidim simpler to run. A container packages the Rails application and its runtime, but it does not remove the work of operating PostgreSQL, keeping uploaded files safe, sending email, scheduling recurring tasks, or deciding how identity and maps are configured. Decidim can be installed manually as a Rails application or with Docker, according to the installation documentation, and the production choice between those two paths is about how your team builds, deploys and recovers the platform, not about which features you get.
Before committing to containers, confirm what your production setup must configure in either path: background jobs through ActiveJob, file storage through ActiveStorage, SMTP, maps and geocoding, and social login providers. Each of these needs persistent or external services that a container does not provide on its own. Confirm which Decidim version you will run. Security updates currently cover the 0.32.x and 0.31.x branches, while 0.30.x and earlier are not supported, so your image pipeline should target one of those lines from day one. Ask your team to confirm which Ruby and Node versions each branch requires, because the base image must match them, and check the release notes for any change to database structure before pulling a new tag.
Plan for image updates as routine operational work, not an occasional project. Decidim publishes patch releases on its GitHub releases page, and a security fix on a supported branch needs to reach your production containers within the patch windows in the project's security policy. Your team should be able to rebuild the image, run the upgrade steps for each minor version in order, and back up the database before each change. If your organization does not have a staffed process for that cadence, the Docker path adds packaging work without removing the upgrade work, and that is the central question to settle before you choose it.
Official image or a custom image with your modules
Running Decidim in containers starts with one decision: run the upstream image unchanged or build your own image that adds modules, custom code or pinned dependencies. Each option shifts work between upgrades, code review and rebuild effort, so the choice should follow how much your organization changes Decidim.
Official image without changes
Running the upstream image unchanged keeps the build pipeline simple, because you pull a tagged release and configure it through environment variables and mounted volumes. Upgrades mean moving to the next supported tag and following that release's upgrade instructions. Check that your configuration needs no code changes and that your scheduled jobs and mail settings still apply after each move. This option suits organizations with few customizations and a stable set of enabled components.
Decidim installation docsCustom image with organization modules
A custom image copies the official base, then installs your extra gems or modules at build time. The dependency lock file must be committed and rebuilt on every change, or two builds of the same tag can differ. Confirm that each module declares a compatible Decidim version before you pin it. Rebuilding is needed for every module update, so plan a rebuild step in each upgrade cycle.
Custom code review burden
Every local change to controllers, views or models becomes code you must review, test and carry forward. Keep overrides small and in modules where possible, so upstream changes are easier to merge. Ask whether each custom patch is still needed after each new release. Record the owner and reason for every patch so the review does not depend on one engineer.
Pinned dependencies and base images
Pinning Ruby gems, Node packages and the base image tag gives reproducible builds, but pinned packages can fall behind security fixes. Decidim v0.32 requires Ruby 3.4.7 and Node 22.14.x, while v0.31 uses Ruby 3.3.4 and Node 22.14.x, so the base image must match the minor version you run. Set a schedule to review pins for vulnerabilities, and confirm the supported branches in the security policy before you freeze a version.
Decidim security policyRebuild and patch cadence
With a custom image, every security patch, base image update or module change means a new build, test run and deployment. Estimate rebuild effort by counting your modules, your pinned dependencies and how often your base image changes. Ask your team or partner how long a rebuild and test cycle takes in your pipeline. Keep the official image as the reference for comparing differences during each rebuild.
Decision checklist before choosing
Before you choose, list every module, patch and dependency that the official image does not include. If the list is empty, the official image is the lower-effort option. If it is long, budget for code review, rebuilds and upgrade testing from the start. Ask any implementation partner for a written breakdown of these costs in the quote, separating one-time build work from recurring upgrade and patch work.
Which data needs persistent volumes
This table maps each kind of Decidim data to where it should live in a container deployment. Read it as a checklist: anything marked for a volume or external service must survive a container replacement, and anything you cannot confirm should be settled with your Decidim configuration before go-live.
| Data | Where it should live | What is lost if it sits only in a container | What to confirm |
|---|---|---|---|
| PostgreSQL database | External managed or self-run database service, outside the container lifecycle | All participant accounts, proposals, comments, votes and configuration | Backup schedule, restore test and the connection settings used by web and job containers |
| Uploaded files (ActiveStorage) | Object storage bucket or a persistent volume mounted at the storage path | Attachments on proposals, meetings and documents, which break links in content | Which ActiveStorage service is configured, whether files are private, and that both web and job containers use the same backend |
| Application logs | Log shipping to a central collector, or a mounted volume with rotation | Evidence for incident review and access investigations | Log destination, retention period and whether personal data appears in log lines |
| Secrets and environment settings | Secret store or orchestrator secrets, injected at runtime | Secret key base and encryption keys, which can make stored data unreadable | Where keys are kept, who can read them and how they are rotated |
| Map and geocoding configuration | Environment settings tied to your chosen map provider | Map views and address lookups fail after a replacement if keys are missing | Provider account, API key ownership and any usage limits set by the provider |
| Custom modules and theme files | Baked into your own image at build time, tracked in version control | Customizations disappear if the image is rebuilt from the base image alone | Build pipeline pins the module versions and the Decidim release |
| Temporary files and caches | Container filesystem, rebuilt as needed | Little permanent loss, but slower first requests after replacement | Whether any job or export depends on files written to a local path |
How web, job and database containers fit together
The diagram starts with users reaching the web container through the organization's own domain and TLS termination. Web and job containers run the same Decidim image and share PostgreSQL, uploaded files and configuration, so each hand-off is a database write, a file write or a queued job. Outbound calls to SMTP, maps, geocoding and social login providers leave the trust boundary, and each one needs a deliberate check: credentials, reachability and what data is sent.
Web and job containers share the database and file storage inside the organization's trust boundary.
How to set up Decidim containers for production
This sequence takes a team from choosing a Decidim image version to a running web and job container pair that serves pages, sends email and processes background work. Each step ends with a check so the platform is confirmed working before participants arrive.
Choose the image and pin the version
Decide whether to run the official Decidim image or build your own from it, and pin an exact release tag rather than a floating label. Confirm the version is on a supported branch: Decidim supports only the last two minor versions with security updates until version 1.0, currently 0.32.x and 0.31.x. Check the Ruby and Node requirements listed for that release in the installation docs, since your build tooling must match them. The step is done when the chosen version and its support status are written into the deployment record.
Provision PostgreSQL and the environment file
Create a dedicated PostgreSQL database and role for Decidim on infrastructure you control, using a PostgreSQL version that meets the minimum in the installation docs. Build an environment file that holds the database connection, secret keys, the public host name and the file storage settings, and keep secrets in your secret manager rather than in the image. Confirm the database accepts connections from the container network only. The step is done when a test connection from a throwaway container succeeds with the production credentials.
Attach persistent volumes for uploads and logs
Mount persistent storage for uploaded files and application logs so that replacing a container does not delete participant attachments. Decide where uploads go: a local volume, or object storage configured through ActiveStorage, which the production setup guidance expects you to plan for. Give the web and job containers access to the same upload location or the same bucket, or attachments created by one will be missing for the other. The step is done when a file written from one container is readable from the other after a restart.
Run database migrations before any version change
Take a full PostgreSQL backup before running migrations, because Decidim's update guidance requires a database backup before any version change and some releases alter database structures. Run the database setup or migration task as a one-off container that uses the same image and environment file as the application. Confirm that the task exits cleanly and that the schema version matches the release you pinned. The step is done when the backup is stored off the host and the migration log shows no errors.
Start web and job containers separately
Run the web process and the background job process as two separate containers from the same image, each with its own command and restart policy. The web container serves HTTP requests, while the job container handles ActiveJob work such as emails, exports and notifications. Keep both on the same database and storage settings so they see the same data. The step is done when both containers report running and the job container logs show the queue worker has started.
Configure SMTP and TLS
Set the SMTP server, sender address and authentication in the environment file, and place the public site behind TLS with the host name you intend participants to use. Enforce HTTPS at the proxy or load balancer and confirm the application generates https links. Confirm that the TLS certificate chain is complete and renews automatically on your chosen schedule. The step is done when the site loads over HTTPS with a valid certificate and the application's configured host name appears in generated links.
Verify health, email and job processing
Check that the web container answers its health endpoint or a known page through the proxy, then sign up a test account and confirm the activation email arrives. Trigger a background task, such as an export or notification, and confirm the job container picks it up and completes it. Check the job logs and queue for failed or stuck work, because a stopped worker can fail silently while the site appears to work. The step is done when a test account receives its email, a triggered job completes, and the results are recorded in the launch notes.
Running web and job containers separately
The web container serves every HTTP request from participants, administrators and API clients. It renders pages, handles sign-in and processes form submissions, so it is the only container that needs to sit behind your reverse proxy and TLS termination. The Decidim installation guide lists background jobs, file storage, SMTP and maps as production concerns, and this process reads most of those settings at runtime.
- Public routing: Expose only this container to the load balancer or reverse proxy, and keep TLS and host headers consistent with the organization hosts you configure.
- Shared configuration: Give it the same environment variables, secrets and database connection as the job container so both processes read identical settings.
- Uploads path: Mount the same persistent storage for uploaded files that the other containers use, or confirm that uploads live in object storage they can all reach.
- Scaling: Add replicas of this container for traffic peaks, and confirm every replica points at the same PostgreSQL database.
Before you send participants to the platform, check that the web container starts, answers over HTTPS and logs no database errors.
The job container runs the ActiveJob worker that processes queued work: notification and confirmation emails, data exports and other tasks the platform defers so web requests stay fast. It uses the same image and code as the web container but starts a worker process instead of a web server. Nothing in the public interface reports when this container is missing, so the symptoms usually appear later, often in participant inboxes or in the administration panel.
- Worker command: Start the container with the worker process for your chosen ActiveJob backend, not the web server command.
- Same image and secrets: Use the same image tag and environment as the web container so job code matches web code after each deploy.
- Queue backend reachability: Confirm the worker can reach the backend that holds the queue, whether that is PostgreSQL or a Redis service, and that credentials are valid.
- Restart policy: Configure the container to restart on failure and alert when it stops, because a crashed worker leaves jobs waiting without any error page.
After each deploy, check the queue depth and the time of the last processed job, then trigger a test notification and confirm it arrives.
Scheduled tasks are recurring jobs that move a Decidim platform forward without anyone clicking anything. Examples include changing the phase of participatory processes on schedule and regenerating open data exports. They need a scheduler that runs at fixed intervals, separate from the worker that handles queued jobs. Teams often assume the worker covers these tasks, then discover that phases never change because nobody scheduled them.
- Dedicated scheduler: Run the recurring tasks from a scheduler container or a cron-style runner, such as cron or whenever, with its own restart behavior and logs.
- Phase changes: Test a process with a scheduled phase change and confirm it flips at the expected time, since a missing task leaves spaces stuck in the wrong phase.
- Open data exports: Confirm exports regenerate on schedule and that the output location is readable by the people who depend on it.
- Time zone and image: Set the scheduler's time zone deliberately and point it at the same image and environment as the web container.
Review the last successful run of each recurring task as part of every release check, because the platform will not report a missed run.
When the job or scheduler container is missing, the web application keeps working, so these failures are easy to miss. Participants stop receiving emails, exports go stale and phases fail to advance, and none of these events produces an obvious error on the public site. The checks below turn those quiet failures into visible signals before participants notice them. Work through each one with your platform team and note which checks are automated and which depend on someone remembering to look.
- Email delivery: Compare queued and sent notification counts, watch for a growing backlog, and send a test registration to a mailbox you monitor on a fixed schedule.
- Queue depth and failed jobs: Alert when pending jobs keep growing or failed jobs accumulate, since a stopped worker often produces no user-visible error.
- Scheduler heartbeat: Record the time of the last successful run for each recurring task and alert when that time falls behind its interval.
- Phase and export outcomes: Compare the phase shown on public pages with the planned dates, and check that the latest open data export has a recent timestamp.
- SMTP logs: Review the mail server logs for rejected or deferred messages sent from the platform's sender address.
Document who responds when each check fails, because a silent failure without an owner tends to stay silent.
Security and operational risks of containerized Decidim
A containerized Decidim install inherits the security posture of its image, its environment configuration and its patch process. The cards below cover the decisions that most often leave a production deployment exposed, and the checks that keep it current.
Secrets passed through environment variables
Database passwords, the Rails secret key base and SMTP credentials usually reach the container as environment variables. Anyone who can run docker inspect or read the orchestrator's configuration can see them, and they can end up in logs or shell history. Ask where each secret is stored, who can read it, how it is rotated, and whether the image contains any secret at build time.
Image provenance and base layers
Know exactly which image tag, digest and base operating system each running container came from. Pin images by digest rather than by a floating tag, record the Decidim version and the Ruby and Node versions baked into the image, and keep the build inputs in version control so a rebuild can be reproduced and checked.
Vulnerability reporting channels
Decidim's SECURITY.md names security@decidim.org and GitHub Security Advisories as the channels for reporting vulnerabilities. Your operations team should know both channels, decide who in your organization monitors them, and define who receives notices about your own deployment so that disclosures do not sit unread in a shared inbox.
SECURITY.mdPatch windows before disclosure
SECURITY.md gives implementers a grace period of 2 months to apply patches for standard vulnerabilities and 4 months for critical ones before details are disclosed. Those windows only help if your team knows the schedule. Plan a standing review of each release and calculate the deadline from the date a fix is published, not from the date your team reads about it.
- Patch grace periods
- 2 and 4 months
Rebuilding the image when patches land
A patched Decidim release does not reach your running containers until you rebuild the image, redeploy it and restart the web and job containers together. Decide who triggers a rebuild, how it is tested on staging first, and how you confirm that every container, including workers, runs the new image. Keep a documented rollback to the previous digest.
Supported versions and upgrade order
Until version 1.0, Decidim supports only the last two minor versions with security updates, currently 0.32.x and 0.31.x. A container running 0.30.x or earlier no longer receives security fixes. Upgrades must go one minor version at a time, with a database backup first, so plan image rebuilds around each release's upgrade instructions.
Decidim update docsUpgrading containerized Decidim one minor version at a time
The sequence moves a containerized Decidim install from one minor version to the next, with a verified database backup and a rebuilt image at each stop. Each step produces a checkpoint you can roll back to before the next minor version is attempted.
Confirm the current version and target path
Record the Decidim version your running containers use, then list every minor version between it and your target, such as 0.29 to 0.30 before 0.31. The update guide requires this one-minor-at-a-time path, so the output is a written upgrade plan with one stop per minor version. Confirm the path against the current update documentation before you start, since the supported branches change over time. Your team owns this step, and it is done when every stop has a named release.
Read the release upgrade instructions for each stop
For each minor version in the plan, read that release's upgrade instructions in full, not just the changelog. Some releases change database structures, and those changes can require commands, ordering or manual steps that a generic container restart will not perform. Note any environment variables, configuration keys or Ruby and Node requirements that change at that stop. The output is a short checklist per stop that your operators can follow without guessing.
Check custom modules and overrides against the target
Review every community module, custom module and view override in your image against the release you are moving to. Confirm each one has a version compatible with that minor version, and list any that do not so you can update, fork or remove them before the rebuild. Your developers or the partner doing the work own this review. It is done when each dependency has a compatible version recorded for that stop, or a documented decision to hold the upgrade.
Back up the database and uploaded files
Before changing any image tag, take a backup of the PostgreSQL database and confirm the uploaded files storage is also captured, whether on a volume or in object storage. The update guide asks for a database backup first because migrations can change structures that are hard to reverse. Test that the backup file can be read or restored into a scratch environment. The output is a verified backup with a recorded timestamp and location.
Pin the target image tag and rebuild
Update the image tag in your build or deployment definition to the target minor version, then rebuild your custom image so the modules selected in the previous step are baked in. Keep the tag explicit rather than pointing at a moving tag, so every container in the fleet runs the same version. Build logs should show no dependency resolution errors. The output is a tagged image that you can identify in your registry and trace back to a commit.
Run migrations in a staging copy first
Start the rebuilt image against a copy of production data, run the database migrations and any release-specific tasks from the upgrade instructions, and then start the web and job containers. Watch the logs for migration errors and confirm the background job container processes queued work. Your team should check that the public site, admin panel and login flow respond. The output is a staging run with a clean migration log and a short smoke test record.
Roll out production and verify before the next stop
Schedule the production change, apply the same image and migration steps, and then verify the web container, job container, email delivery and scheduled tasks. Only after this checkpoint passes should you start the next minor version in the plan. Keep the previous image tag and the verified backup until the stop is accepted. The output is a production version recorded in your change log, with the next stop scheduled.
Limits to confirm in your environment
A Docker deployment inherits the constraints of the Decidim release and the image it runs. Each card below is a limit you should confirm against your own modules, orchestration platform and external providers before you commit to an image layout. Settling these early keeps the build from being rebuilt later.
Ruby and Node versions
Each release pins its own runtime. Release v0.32 requires Ruby 3.4.7 and Node 22.14.x, while v0.31 uses Ruby 3.3.4 and Node 22.14.x. Your base image, build stage and any custom gems must match the release you choose, and a module written for one minor version may not build on the other. Confirm the runtime versions in the release notes and installation docs before you pick a base image tag.
Installation docsOfficial image against your modules
The official image contains only the core framework and its bundled components. If your organization uses community or custom modules, you will need your own image built on top of the release, and every module must be compatible with that exact version. Ask whether each module ships with a tested release line, and plan a rebuild of the image on every upgrade rather than assuming the base image covers your gems.
Installation docsContainer orchestration support
Single-host Compose files are suitable for small installs, but web and job containers, shared uploads and scheduled tasks behave differently under Kubernetes or another scheduler. Confirm how your platform handles persistent volumes for uploads and logs, how it runs the background job container, and how it executes database migrations during a rollout. Ask your platform team to verify these behaviors before production traffic arrives.
Maps and geocoding providers
Maps and geocoding depend on an external provider that you select and configure. Confirm whether your organization can send location data to that provider under its data protection terms, whether the provider has rate limits or keys that must be stored as secrets, and whether an approved self-hosted alternative exists for air-gapped or restricted networks. Test the map components in the container before launch.
Background job and mail egress
Containers that send email or process jobs need outbound network routes to your SMTP relay, the map provider and any social login provider. Egress rules in restricted networks are a common blocker that surfaces only after launch. Confirm each destination, the ports and the credentials, and check that job containers can reach the same database and Redis or queue store as the web containers.
Social login and identity providers
Decidim supports Facebook, Twitter, Google and Decidim-to-Decidim OAuth 2.0 login out of the box, and other OmniAuth strategies can be added as custom providers. Confirm which providers your policy allows, where their client secrets will be stored, and how the redirect URLs will look behind your reverse proxy and TLS termination. Custom strategies need their own gems in the image.
Questions buyers ask about running Decidim with Docker
What drives the cost of running Decidim with Docker in production?
The biggest cost drivers are the amount of custom work, the number of organizations on one install, and how much of the platform your own team will own afterward. A quote covers the container build, the Compose or orchestration setup, persistent storage, the web and job containers, SMTP, TLS, backups, staging and handover. Ongoing costs include hosting, upgrades between minor versions, security patching and any retainer for support. Ask for the written scope to separate one-time setup from recurring operations, and ask which items are priced per module, per organization or per environment.
How long does it take to get a first production container running?
The duration depends on the scope, so no fixed timeline applies here. The main variables are whether you use the official image or build your own with custom modules, how many environments you need, how quickly your team provides infrastructure access and DNS, and whether legal texts and SMTP credentials are ready. Request a written timeline with milestones for infrastructure, first deployment to staging, data and content setup, and go-live, with the client dependencies listed beside each one.
Can an internal team run Decidim in Docker without outside help?
Yes, many teams with experience in containers and Ruby on Rails can run it, but the work is more than starting containers. Operators need to handle PostgreSQL, file storage for uploads, a separate job container for ActiveJob, SMTP, scheduled tasks, backups and version-specific upgrade steps. Decidim's update guide asks teams to move one minor version at a time and back up the database first. Check whether your team can own these tasks for the supported 0.32.x and 0.31.x branches, then decide where outside help is worth paying for.
What do we need to provide before implementation starts?
Plan to provide infrastructure access in the cloud accounts, data centers or air-gapped network where Decidim will run, along with a domain name and the ability to issue TLS certificates. You will also need SMTP credentials for sending registration and notification email, legal texts such as terms and privacy notices, and the list of organizations and administrators. If you plan to use social login, you will need the provider credentials. Ask the implementation partner to list every access item, owner and deadline in the written scope so delays are visible early.
How do custom modules change the cost and effort?
Custom modules add build, testing and upgrade work. Each module must be compiled into your image, tested against the Decidim version you run, and reviewed when you move to a new minor version. Modules that touch database structures or override core behavior usually need more upgrade time than configuration-only changes. Ask for a list of each module with its purpose, its dependency on core internals, and who will maintain it after handover.
How does running several organizations on one Decidim install affect the work?
Multiple organizations on one installation share the same container images, upgrade cycles and infrastructure, so the setup is more complex but operations can be consolidated. Each organization may need its own hosts, SMTP settings, authorization methods and branding, which increases configuration and testing. Confirm in the scope how many organizations are included, how new ones are onboarded after launch, and who approves changes that affect all tenants.
Which security and support questions should we ask before signing?
Ask how the team will track Decidim's security advisories, since the project supports only the last two minor versions with security updates before version 1.0, and how fast patches will be applied. Decidim's SECURITY.md describes patch grace periods for implementers, so ask how those windows map to your change process. Also ask about backup and restore testing, access to logs and monitoring, and what support hours and response processes are included or offered as a retainer.
How DeployOpen scopes a Decidim container deployment
DeployOpen plans and deploys self-hosted Decidim inside your own infrastructure, whether that is your cloud accounts, your data centers or an air-gapped network. Most engagements are fixed-scope, which means the components, deliverables and timelines are agreed in writing before any build work starts. The scoping conversation for a Docker deployment is less about whether Decidim runs and more about who owns each moving part once it is live: the image, the storage, the job handling, the mail path, the backups and the upgrades. Those answers decide the shape of the written scope, and the quote follows from it.
The first decisions cover the image and storage. The team needs to confirm whether it will use the official Decidim image as published or build its own image that bakes in local modules, and who maintains that build pipeline after handover. Scoping also covers persistent volumes for uploads and logs, since a container that loses its uploads on restart is a data loss incident, not a configuration issue. The scope should name which volumes exist, where they live, how they are mounted into the web and job containers, and who restores them. Background jobs need the same attention: the scope should state how web and job containers are split, which ActiveJob backend is used, and how a stuck or silent queue is detected before participants notice missing emails.
The remaining decisions are SMTP, backups and upgrade ownership. Scoping should confirm the sending domain, the SMTP provider and who holds its credentials, because registration and notification mail depend on them. Backup scope must name the PostgreSQL database, the uploads store and the secrets, along with a tested restore procedure and the people who run it. Upgrade ownership is the item most often left vague: the written scope should say who applies each minor version, who tests custom code against it and who signs off before production. Ask your potential partner to list those responsibilities line by line, so that your team can compare the scope against its own capacity and budget.
How DeployOpen delivers and supports Decidim in production
DeployOpen plans, builds, hardens, documents and supports self-hosted Decidim inside your own infrastructure, including the Docker image, web and job containers, and persistent storage for uploads and logs. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
How we scope
- Confirm which Decidim version and image source (official or your own build) the platform will run on before work starts.
- Agree in writing which custom modules, identity providers, SMTP and storage services are in the Docker build and runtime.
- List the container topology, volume layout and hosting environment, including whether the work is in your cloud, data center or air-gapped network.
How we build
- Build the container image with your modules, pinned to the Decidim release line you have chosen and its documented Ruby and Node requirements.
- Configure persistent volumes for uploads and logs, and separate web and background job containers that share the same database and file storage.
- Test startup, migrations, job processing and file upload paths in a non-production environment before any production cutover.
How we hand over
- Deliver the Dockerfile, compose or orchestration definitions, environment configuration and runbooks in your repositories.
- Document the upgrade procedure, including backing up the database first and moving one minor version at a time as Decidim's update guide describes.
- Walk your operations and security teams through container restarts, volume locations, log access and recovery steps.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers once the initial handover is complete.
- Agree in the quote who patches the base image and Decidim releases, and how security advisories are tracked and applied.
- Ask for a retest after each upgrade or configuration change so that container, volume and job behavior is checked again.

