Deploy a single-instance Koha server on AWS for small libraries. This guide covers both Free and Basic tier deployments, which use identical CloudFormation templates.

Overview

Deployment time: ~5 minutes
Best for: Small libraries
Architecture: Single EC2 instance with local MySQL database

What you’ll get:

  • Single EC2 instance (t3.medium for free tier, m8g.medium recommended for basic tier)
  • MySQL database running locally on the instance
  • Elastic IP for static address
  • Port-based HTTP URLs (http://X.X.X.X:8080 and :8443)
  • EC2 Instance Connect for SSH access

Limitations:

  • No SSL/HTTPS support
  • No automated cloud backups (manual local backups only)
  • No high availability
  • No custom domain support

Prerequisites

Before you begin:

  • AWS account with payment method
  • AWS Marketplace subscription to KohaSupport Koha ILS (Free or Basic tier)
  • Basic familiarity with AWS console (helpful but not required)

Step 1: Launch CloudFormation Template

  1. Delivery Method: Select CloudFormation Template
  2. Software Version: Choose latest version
  3. Region: Select closest AWS region (e.g., us-east-1, eu-west-1)
  4. Click Continue to Launch
  5. Click Launch CloudFormation

Step 2: Configure CloudFormation Stack

Stack Details

Stack name
Enter: koha-basic-library or your library name (e.g. springfield-library)


Parameters

AWS Marketplace

ImageId
Auto-filled from your marketplace subscription ✓

Instance Configuration

InstanceType
Choose appropriate instance type based on tier architecture:

  • Free tier (x86): t3.small or t3.medium recommended
  • Basic tier (ARM64): m8g.medium recommended (2 vCPU, 8 GB RAM)
  • Larger collections: m8g.large (ARM64) or t3.large (x86)

KeyPairName
Optional SSH key pair for traditional SSH access:

  • Leave blank to use EC2 Instance Connect only (recommended)
  • Or enter name of an existing EC2 key pair
  • To find existing keys: EC2 Console → Network & Security → Key Pairs
  • To create a new key: See Creating SSH Keys below

Note: If left blank, you can use EC2 Instance Connect for browser-based SSH access. The templates configure security groups to allow Instance Connect traffic, but you must manually create an EC2 Instance Connect Endpoint in your VPC. See Setting Up EC2 Instance Connect Endpoint below for instructions.

EBSVolumeSize
Disk space in GB:

  • Minimum: 20 GB
  • Recommended: 50 GB for 50,000+ items
  • Stores database, Koha files, and backups

InstallLanguages
Optional comma-separated language codes:

  • Leave blank for English only
  • Example: es-ES,fr-FR,de-DE (Spanish, French, German)
  • See Available Translations for complete list of 100+ supported languages

Network Configuration

VpcId
Leave blank to use default VPC (recommended)

SubnetId
Leave blank for automatic subnet selection


Stack Options

Add tags for organization (optional):

  • Environment: Production
  • Library: Your Library Name
  • Department: Library Services

Review and Launch

  1. Review all settings
  2. Check ☑ “I acknowledge that AWS CloudFormation might create IAM resources”
  3. Click Create stack
  4. Wait 10-15 minutes for deployment

Monitor progress:

  • Watch Events tab for real-time status
  • Check Resources tab to see what’s being created
  • Status will show CREATE_IN_PROGRESSCREATE_COMPLETE

Step 3: Retrieve Access Information

Once stack status shows CREATE_COMPLETE:

  1. Go to CloudFormation console
  2. Select your stack
  3. Click Outputs tab

Available Outputs

KohaPublicCatalogURL
Public OPAC interface: http://X.X.X.X:8080
Share this URL with your library patrons

KohaAdminInterfaceURL
Staff interface: http://X.X.X.X:8443
Use this for cataloging, circulation, and administration

KohaServerIPAddress
Static Elastic IP address (won’t change if instance restarts)

KohaAdminCredentialsPath
Path to password in Systems Manager Parameter Store
Format: /koha/your-stack-name/credentials


Step 4: Retrieve Admin Password

Choose one of these methods:

  1. Go to AWS Systems Manager
  2. Click Parameter Store in left menu
  3. Search for your credentials path (from Outputs tab)
  4. Click the parameter name
  5. Click Show value to reveal password

Note: Requires IAM permission ssm:GetParameter

Method 2: AWS CLI

aws ssm get-parameter \
  --name /koha/your-stack-name/credentials \
  --with-decryption \
  --query 'Parameter.Value' \
  --output text

Method 3: EC2 Instance Connect

  1. Go to EC2 Console
  2. Select your Koha instance
  3. Click ConnectEC2 Instance Connect
  4. Username: ubuntu
  5. Click Connect
  6. Run command:
sudo koha-passwd library

This displays the username and password for your Koha site.


Step 5: Log In to Koha

  1. Open KohaAdminInterfaceURL from Outputs tab
  2. Username: koha_library (default)
  3. Password: Retrieved from Step 4
  4. You’re in! Proceed to post-installation setup

Creating SSH Keys

If you want to use traditional SSH instead of EC2 Instance Connect:

Create Key Pair in AWS Console

  1. Go to EC2 Console
  2. Navigate to Network & SecurityKey Pairs
  3. Click Create key pair
  4. Name: Enter a memorable name (e.g., koha-ssh-key)
  5. Key pair type: Choose RSA
  6. Private key file format:
    • .pem for Mac/Linux/Windows (OpenSSH)
    • .ppk for PuTTY (Windows)
  7. Click Create key pair
  8. Save the downloaded file securely (you can’t download it again)

Using Your Key

# Mac/Linux
chmod 400 koha-ssh-key.pem
ssh -i koha-ssh-key.pem ubuntu@<instance-ip>

# Windows (PowerShell with OpenSSH)
ssh -i koha-ssh-key.pem ubuntu@<instance-ip>

Important: The key pair must be created in the same AWS region where you’re deploying Koha.


Setting Up EC2 Instance Connect Endpoint

If you didn’t configure a KeyPair and want to use EC2 Instance Connect for browser-based SSH access, you must create an EC2 Instance Connect Endpoint. The CloudFormation templates configure security groups to allow Instance Connect traffic, but do not create the endpoint itself.

Why You Need This

  • Without endpoint: Cannot use EC2 Instance Connect from AWS Console
  • With endpoint: Browser-based SSH access from EC2 Console (no key file needed)
  • Security: Instance Connect endpoints provide secure access to instances in private subnets

Create Instance Connect Endpoint

  1. Go to VPC Console (not EC2 Console)
  2. In left navigation, scroll down to Virtual private cloud section
  3. Click Endpoints
  4. Click Create endpoint
  5. Configure endpoint:
    • Name: koha-instance-connect-endpoint
    • Service category: Select EC2 Instance Connect Endpoint
    • VPC: Select the VPC where your Koha instance is deployed
    • Security groups: Select the security group created by CloudFormation (look for stack name in security group name)
    • Subnet: Select the subnet where your instance is running
  6. Click Create endpoint
  7. Wait 2-3 minutes for endpoint to become Available

Using Instance Connect After Endpoint Creation

Option 1: AWS Console (Browser-based)

  1. Go to EC2 Console
  2. Select your Koha instance
  3. Click Connect button
  4. Choose EC2 Instance Connect tab
  5. Connection type: Select Connect using EC2 Instance Connect Endpoint
  6. EC2 Instance Connect Endpoint: Select the endpoint you created
  7. Username: Enter ubuntu
  8. Click Connect

Option 2: AWS CLI

# Get your instance ID from EC2 Console or CloudFormation Outputs
aws ec2-instance-connect ssh \
  --connection-type eice \
  --os-user ubuntu \
  --instance-id i-0123456789abcdef0

Note: Replace i-0123456789abcdef0 with your actual instance ID. The CLI automatically selects the appropriate Instance Connect Endpoint in the same VPC.

Cost

  • Pricing: EC2 Instance Connect Endpoint charges apply per hour
  • Calculate costs: Use the AWS Pricing Calculator to estimate costs for your region
  • Alternative: Use SSH keys (free, but requires key management)
  • Tip: Search for “EC2 Instance Connect Endpoint” in the calculator for current pricing

Troubleshooting

Can’t find Instance Connect Endpoint option:

  • Ensure you’re in VPC Console, not EC2 Console
  • Check your AWS region supports EC2 Instance Connect Endpoints
  • Verify you have permission ec2:CreateInstanceConnectEndpoint

Connection fails:

  • Verify endpoint status is Available
  • Confirm endpoint is in same VPC and subnet as instance
  • Check security group allows Instance Connect traffic (templates configure this automatically)
  • Ensure instance is running and status checks passed

What’s Next?

Now that Koha is deployed, complete the initial configuration:

→ Post-Installation Setup Guide

This guide covers:

  • Completing the setup wizard
  • Configuring system preferences
  • Setting up patron categories
  • Configuring item types
  • MARC framework setup
  • Adding your first records

Backup & Recovery

Automated daily backups are saved to /var/spool/koha/library/ on your instance.

For complete backup and recovery procedures, including database exports, restore testing, and migration strategies:

→ Koha Tier Migration Guide

Covers:

  • Database backup procedures
  • Manual and automated backups
  • Restore procedures
  • Data migration between tiers
  • Testing and validation

Monitoring & Maintenance

For comprehensive system monitoring, log analysis, performance tuning, and maintenance schedules:

→ Monitoring & Maintenance Guide

Covers:

  • System health monitoring
  • CloudWatch alarms setup
  • Log locations and analysis
  • Database performance monitoring
  • Automated health checks
  • Regular maintenance tasks
  • Scaling guidance

Security Best Practices

For detailed security configuration, hardening, and compliance:

→ Security Best Practices Guide

Covers:

  • Network security and firewall rules
  • SSH key management
  • Data encryption (at rest and in transit)
  • Access control and IAM
  • Security monitoring
  • Compliance (GDPR, PCI DSS)
  • Incident response

Troubleshooting

For common deployment issues and solutions, see:

→ CloudFormation Troubleshooting Guide

Includes solutions for:

  • Stack creation failures
  • Instance access issues
  • Password and login problems
  • EC2 Instance Connect issues
  • Performance optimization
  • And more…

Upgrade Path

Need more features or scalability?

Standard Tier adds automated S3 backups and SSL support:

Enterprise Tier adds high availability and auto-scaling:

For detailed migration procedures with database backup and restore:


Additional Resources


Get Support

Need help?

Want professional assistance?
We offer migration services, training, and ongoing support. Contact us for a consultation.


Last Updated: December 2025