Minimal Alfresco Community Edition integration for DDEV projects.
This add-on provides a lightweight Alfresco Community Edition setup optimized for local development of applications that integrate with Alfresco’s REST API, CMIS API, or WebDAV interface. Perfect for developing custom connectors, file management integrations, or document-centric applications without the overhead of a full Alfresco deployment.
The setup runs Alfresco Content Repository with PostgreSQL, with search indexing and transform services disabled for minimal resource usage. This gives you a fast, API-ready Alfresco instance that starts in minutes and uses 4-6GB RAM instead of 16GB+.
ddev add-on get ddev/ddev-alfresco
ddev restart
ddev alfresco-wait
The first startup takes 3-5 minutes while Alfresco initializes.
Web Interface:
ddev launch :8081/alfresco
Note: This addon provides a minimal API-focused Alfresco setup. Alfresco Share (the traditional web UI) is not included to keep resource usage low. For DMS integrations via REST API, CMIS, or WebDAV, Share is not needed. If you require the full Alfresco web interface, you would need to add a separate Share container to the docker-compose configuration.
API Endpoints (external):
https://<project>.ddev.site:8081/alfresco/api/-default-/public/alfresco/versions/1
https://<project>.ddev.site:8081/alfresco/api/-default-/public/cmis/versions/1.1/browser
https://<project>.ddev.site:8081/alfresco/webdav
Authentication for REST API:
Option 1 - Basic Authentication (easiest):
# Example: Get node information
curl -u admin:admin https://<project>.ddev.site:8081/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-
Option 2 - Ticket-based Authentication:
# 1. Get authentication ticket
TICKET=$(curl -X POST https://<project>.ddev.site:8081/alfresco/api/-default-/public/authentication/versions/1/tickets \
-H "Content-Type: application/json" \
-d '{"userId":"admin","password":"admin"}' | jq -r .entry.id)
# 2. Use ticket in subsequent requests
curl https://<project>.ddev.site:8081/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root- \
-H "Authorization: Basic $(echo -n $TICKET | base64)"
API Endpoints (internal, from web container):
http://alfresco:8080/alfresco/api/-default-/public/alfresco/versions/1
http://alfresco:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser
Default credentials:
admin
admin
Default groups:
ALFRESCO_ADMINISTRATORS
- Full system administrationSITE_ADMINISTRATORS
- Site managementEMAIL_CONTRIBUTORS
- Email integration accessddev alfresco-wait # Wait for Alfresco to be ready
ddev alfresco-status # Check service health
ddev alfresco [command] # Execute command in Alfresco container
ddev logs -s alfresco # View Alfresco logs (standard DDEV command)
ddev logs -s alfresco-postgres # View PostgreSQL logs (standard DDEV command)
The Alfresco REST API provides complete functionality for DMS integrations:
skipCount
and maxItems
parameters/nodes/{nodeId}/content
endpointGET/POST /nodes/{nodeId}
- Node CRUD operationsGET /nodes/{nodeId}/children
- List folder contents with paginationGET /nodes/{nodeId}/content
- Stream file contentPOST /nodes/{nodeId}/copy
- Copy files/foldersPOST /nodes/{nodeId}/move
- Move files/foldersDELETE /nodes/{nodeId}
- Soft delete to trashGET /deleted-nodes
- Access trash/recycle binAll operations return standard HTTP status codes and JSON responses, making integration straightforward for any programming language or framework.
$config = [
'alfresco_endpoint' => 'http://alfresco:8080/alfresco/api/-default-/public/alfresco/versions/1',
'cmis_endpoint' => 'http://alfresco:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser',
'username' => 'admin',
'password' => 'admin',
];
// Example: List root folder contents
$ch = curl_init($config['alfresco_endpoint'] . '/nodes/-root-/children');
curl_setopt($ch, CURLOPT_USERPWD, $config['username'] . ':' . $config['password']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
const config = {
endpoint: 'http://alfresco:8080/alfresco/api/-default-/public/alfresco/versions/1',
auth: Buffer.from('admin:admin').toString('base64')
};
// Example: Get node information
fetch(`${config.endpoint}/nodes/-root-`, {
headers: {
'Authorization': `Basic ${config.auth}`
}
})
.then(response => response.json())
.then(data => console.log(data));
If you need to use a different version of Alfresco or PostgreSQL, you can set environment variables in .ddev/.env.alfresco
:
# Set the desired versions
ddev dotenv set .ddev/.env.alfresco --alfresco-image="alfresco/alfresco-content-repository-community:23.2.0"
ddev dotenv set .ddev/.env.alfresco --postgres-image="postgres:15"
# Remove old volumes and restart
ddev stop
docker volume rm ddev-${DDEV_SITENAME}-alfresco-data ddev-${DDEV_SITENAME}-alfresco-postgres-data
ddev start
The addon uses these default versions:
alfresco/alfresco-content-repository-community:23.2.1
postgres:15.7
Note: When changing versions, you may need to remove the old volumes to avoid compatibility issues. Make sure to commit the .ddev/.env.alfresco
file to version control to share the configuration with your team.
To ensure Alfresco is ready after every ddev start
or ddev restart
, add this hook to your .ddev/config.yaml
:
hooks:
post-start:
- exec-host: ddev alfresco-wait
This automatically waits for Alfresco to fully initialize before returning control, so your application can immediately connect to the API.
Search indexing (Solr), document transformation, and message queue services are disabled for minimal resource usage. These can be added later if needed.
ddev add-on remove ddev-alfresco
This removes the add-on and deletes all Alfresco data.
Apache License 2.0 - Copyright © 2025 Wolfgang Klinger [email protected]