XWiki on AWS
The CloudFormation template and the CDK code build the same architecture, and neither of them deploys as published.
Explanation
The deployment of XWiki on Amazon Web Services is contributed by the community. It is not built, released or validated by the XWiki Development Team, and it is not one of the supported installation methods.
Two repositories in the xwiki-contrib organisation describe the same infrastructure in two ways: a CloudFormation template that you upload in the AWS console, and AWS CDK code written in TypeScript that you deploy from a command line. Both end with XWiki running as a container behind a load balancer, reachable at the DNS name the stack returns.
What the deployment builds
Both definitions provision the same architecture, because the CDK compiles to CloudFormation and the published template is a synthesized output of the same CDK application. It is built in a virtual private cloud of its own, spread over two availability zones.
- A VPC with one public and one private subnet in each of two availability zones.
- One NAT gateway in a public subnet, giving the private subnets outbound access.
- An Application Load Balancer in the public subnets, whose DNS name is how you reach the wiki. It listens on HTTP port 80 only.
- An ECS Fargate service in the private subnets, running the official XWiki Docker image.
- An Amazon EFS file system holding XWiki's permanent directory, so that data survives the replacement of a container, with automatic backups enabled.
- An Aurora Serverless v1 MySQL cluster for the wiki database, scaling between one and eight capacity units and keeping seven days of backups.
- Two KMS keys with automatic rotation: one encrypting the file system and the database storage, the other the database credentials, which are held in Secrets Manager.
- An IAM role granting the running service only the access it needs.
Nothing in the stack is a machine you log into. There is no EC2 instance to reach over SSH, and no DNS record is created for you, so pointing your own domain at the load balancer is yours to do.
The two availability zones hold the data, not a second copy of the running wiki: one Fargate task and one database writer serve it, so replacing a container is a brief outage.
Deleting the stack does not delete the wiki's data. The file system is retained and the database cluster leaves a final snapshot, and both keep costing until you remove them yourself.
The state of the published definitions
Both repositories were last changed in 2021 and have had no maintenance since. As published:
- The CloudFormation template builds its database as an Aurora Serverless v1 cluster. AWS stopped allowing new Serverless v1 clusters to be created on 8 January 2025 and ended the offering on 31 March 2025, so the stack no longer creates. The engine version it pins, 5.7.mysql_aurora.2.07.1, is out of support as well: Aurora MySQL 2 reached end of standard support on 31 October 2024, and RDS Extended Support covers only its 2.11 and 2.12 minor versions. Raising the engine version is therefore not enough on its own. The cluster has to be ported to Aurora Serverless v2, which is configured differently: it needs a ServerlessV2ScalingConfiguration and a database instance of its own, where the template today has neither.
- The CDK code depends on AWS CDK version 1, which reached end of support on 1 June 2023. It calls constructs that version 2 renamed or removed, so it needs porting before cdk deploy will run.
The XWiki half of the stack is unaffected. The official Docker images it runs are current and are rebuilt with every XWiki release.
Until one of the two definitions is ported, this deployment is not usable as published. The same official image runs on any machine with Docker, so installing XWiki with Docker on an EC2 instance you provision yourself is the working route in the meantime.
Choosing between the template and the CDK code
The CloudFormation template is the shorter route. You upload a JSON file in the AWS console, name the stack and choose an XWiki image, and nothing has to be installed on your own machine. In exchange, changing what the stack builds means editing the template.
The CDK code exists so that you can change the configuration before deploying, in TypeScript rather than in JSON. Two files carry the settings most people want:
- xwiki-production-cdk/lib/config.ts holds the region to deploy into, which defaults to eu-central-1, and the XWiki image tag.
- xwiki-production-cdk/lib/stacks/vpc.ts holds the address range of the VPC, 10.42.42.0/24. It is deliberately small, and worth enlarging if you intend to run other services in the same network.
Both routes take the XWiki version as a tag of the official XWiki Docker image. Use xwiki:lts-mysql-tomcat in production and xwiki:stable-mysql-tomcat to follow the current cycle. Any other mysql-tomcat tag also works, although pinning one specific version is not recommended.
What you need before deploying
- An AWS account. You pay for the resources the stack creates for as long as they run, and neither the template nor the CDK code costs anything in itself.
- Room for one more VPC in the target region. The default quota is five per region and can be raised to one hundred, but an increase can take several days to take effect, so check it early.
- For the CDK route only, the AWS CDK command line interface and npm.
Choose the region first, because it is awkward to change afterwards. Pick one close to the people who will use the wiki, to keep latency low; prices also differ between regions. Data you store in a region stays in that region unless you replicate it yourself, which makes the choice a compliance decision as much as a performance one. Not every region offers every service the stack needs.
Security and permissions
Running XWiki on AWS splits responsibility between you and AWS. AWS operates everything from the host operating system downwards, and you own the wiki, the image it runs and the configuration of the resources the stack creates. The AWS shared responsibility model sets out where the line falls.
The stack follows that line with a least privilege IAM role for the running service, and it stores no SSH keys, secret keys or access keys on the resources it creates. The database password is generated into Secrets Manager and encrypted with a KMS key of its own.
The load balancer is the exception. It listens on plain HTTP and the stack provisions no certificate, so logins and session cookies cross the internet in clear text. Adding a certificate and an HTTPS listener is yours to do before the wiki carries real accounts.
Deploying the stack is a separate question. It needs a principal able to create resources in every service the stack touches: CloudFormation, VPC networking, EFS, RDS, ECS, Elastic Load Balancing, KMS, Secrets Manager, CloudWatch Logs and IAM roles. Grant that through your own IAM practice rather than deploying as the account root user, which AWS advises against for any routine task.
Where the code is
The CloudFormation template is in the aws-xwiki-cloudformation repository, and the CDK code in the aws repository. Both accept issues and pull requests, and updating them is how this deployment becomes usable again.