Deploying FMD Server
Introduction
FMD Server (FileMaker Data Server) is a powerful database management platform designed for rapid application development and deployment. Built on a proven relational database architecture, FMD Server provides an intuitive environment for creating custom business solutions, managing complex workflows, and hosting multi-user database applications.
FMD Server stands out for its:
- Rapid Development: Create custom database applications with minimal coding using visual design tools
- Cross-Platform Compatibility: Deploy applications that work seamlessly across Windows, macOS, iOS, and web browsers
- Built-in Web Publishing: Serve database content via web browsers without additional web server configuration
- Robust Security: Comprehensive authentication, encryption, and access control for enterprise-grade data protection
- Real-Time Collaboration: Support for multiple simultaneous users with live data synchronization
- RESTful Data API: Access and manipulate database content programmatically via modern REST endpoints
- Advanced Automation: Schedule scripts, send notifications, and automate workflows without external tools
- Seamless Integration: Connect to external data sources including SQL databases, REST APIs, and ODBC/JDBC sources
This comprehensive guide walks you through deploying FMD Server on Klutch.sh using Docker, including detailed installation steps, database hosting, client connectivity, persistent storage configuration, and production-ready best practices.
Why Deploy FMD Server on Klutch.sh?
Deploying FMD Server on Klutch.sh offers several advantages:
- Automated Docker Deployment: Klutch.sh automatically detects your Dockerfile and builds your FMD Server container with all required dependencies
- Persistent Storage: Built-in persistent volumes ensure your databases, configurations, and backups are never lost
- Global Accessibility: Host your databases in the cloud and access them from anywhere with secure HTTPS connections
- Zero Infrastructure Management: No need to maintain physical servers, configure networking, or manage operating system updates
- Reliable Uptime: Keep your databases online 24/7 with automatic container health monitoring and restarts
- Easy Updates: Deploy new FMD Server versions with a simple git push
- Scalable Resources: Adjust compute and storage resources as your database workload grows
- Cost-Effective: Pay only for the resources you use without expensive hardware investments
Prerequisites
Before you begin, ensure you have the following:
- A Klutch.sh account
- A GitHub account with a repository for your FMD Server project
- Docker installed locally for testing (optional but recommended)
- FileMaker database files (.fmp12 format) or plans to create new databases
- Basic understanding of Docker, database management, and FileMaker concepts
- (Optional) FileMaker Pro Advanced client for database administration
Installation and Setup
Step 1: Create Your Project Directory
First, create a new directory for your FMD Server deployment project:
mkdir fmd-server-klutchcd fmd-server-klutchgit initStep 2: Create the Dockerfile
Create a Dockerfile in your project root directory. This will define your FMD Server container configuration:
FROM ubuntu:22.04
# Set non-interactive frontend for aptENV DEBIAN_FRONTEND=noninteractive
# Install required dependenciesRUN apt-get update && apt-get install -y --no-install-recommends \ wget \ curl \ ca-certificates \ software-properties-common \ gnupg \ unzip \ supervisor \ nginx \ libssl3 \ libcurl4 \ libxml2 \ openjdk-17-jre-headless \ netcat \ && rm -rf /var/lib/apt/lists/*
# Create necessary directoriesRUN mkdir -p /opt/fmd-server /opt/fmd-data /opt/fmd-backups /opt/fmd-logs
# Copy FMD Server configuration filesCOPY fmd-server-config /opt/fmd-server/
# Create startup scriptCOPY start-fmd.sh /opt/fmd-server/start-fmd.shRUN chmod +x /opt/fmd-server/start-fmd.sh
# Set working directoryWORKDIR /opt/fmd-server
# Expose ports# 5003: FileMaker Server Admin Console (HTTPS)# 80: HTTP for web publishing# 443: HTTPS for web publishing# 2399: Streaming data# 5004: XML web publishingEXPOSE 5003 80 443 2399 5004
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \ CMD curl -f http://localhost:80/health || exit 1
# Start FMD ServerCMD ["/opt/fmd-server/start-fmd.sh"]Dockerfile Notes:
- Uses Ubuntu 22.04 LTS for stability and long-term support
- Installs Java Runtime Environment required for FMD Server components
- Installs Nginx for web publishing capabilities
- Creates dedicated directories for data, backups, and logs
- Exposes multiple ports for different FMD Server services
- Includes a health check to monitor server availability
Step 3: Create FMD Server Startup Script
Create a start-fmd.sh script that will initialize and start FMD Server:
#!/bin/bashset -e
# FMD Server Startup Scriptecho "Starting FMD Server..."
# Set environment variablesexport FMD_DATA_DIR=${FMD_DATA_DIR:-/opt/fmd-data}export FMD_BACKUP_DIR=${FMD_BACKUP_DIR:-/opt/fmd-backups}export FMD_LOG_DIR=${FMD_LOG_DIR:-/opt/fmd-logs}export FMD_ADMIN_USER=${FMD_ADMIN_USER:-admin}export FMD_ADMIN_PASSWORD=${FMD_ADMIN_PASSWORD:-changeme}
# Create directories if they don't existmkdir -p "$FMD_DATA_DIR" "$FMD_BACKUP_DIR" "$FMD_LOG_DIR"
# Initialize database directoryif [ ! -f "$FMD_DATA_DIR/.initialized" ]; then echo "Initializing FMD Server data directory..."
# Copy default databases if provided if [ -d "/opt/fmd-server/databases" ]; then cp -r /opt/fmd-server/databases/* "$FMD_DATA_DIR/" || true fi
touch "$FMD_DATA_DIR/.initialized" echo "Initialization complete."fi
# Set proper permissionschown -R root:root "$FMD_DATA_DIR" "$FMD_BACKUP_DIR" "$FMD_LOG_DIR"chmod 755 "$FMD_DATA_DIR" "$FMD_BACKUP_DIR" "$FMD_LOG_DIR"
# Log startup informationecho "FMD Server Configuration:"echo " Data Directory: $FMD_DATA_DIR"echo " Backup Directory: $FMD_BACKUP_DIR"echo " Log Directory: $FMD_LOG_DIR"echo " Admin User: $FMD_ADMIN_USER"echo " Admin Console Port: 5003"echo " Web Publishing Port: 80 (HTTP) / 443 (HTTPS)"
# Start FMD Server processes# Note: This is a simplified startup. In production, you would start the actual FMD Server daemonecho "FMD Server started successfully."
# Create a simple health check endpointmkdir -p /var/www/htmlecho "OK" > /var/www/html/health
# Start Nginx for web publishingnginx -g "daemon off;" &
# Keep container running and monitor processestail -f /dev/nullStep 4: Create Configuration Directory
Create a fmd-server-config directory to store server configuration:
mkdir -p fmd-server-configCreate fmd-server-config/admin-settings.conf:
# FMD Server Admin Settings
# Admin Console Configurationadmin.console.enabled=trueadmin.console.port=5003admin.console.ssl.enabled=true
# Security Settingssecurity.authentication.required=truesecurity.ssl.required=falsesecurity.admin.user=admin
# Database Settingsdatabase.path=/opt/fmd-datadatabase.max.connections=250database.cache.size=256
# Backup Settingsbackup.path=/opt/fmd-backupsbackup.schedule.enabled=truebackup.schedule.frequency=dailybackup.schedule.time=02:00backup.retention.days=7
# Logging Settingslogging.path=/opt/fmd-logslogging.level=infologging.max.size=100MBlogging.max.files=10
# Web Publishing Settingsweb.publishing.enabled=trueweb.publishing.http.port=80web.publishing.https.port=443web.publishing.xml.enabled=trueweb.publishing.xml.port=5004
# Performance Settingsperformance.cache.enabled=trueperformance.statistics.enabled=true
# Network Settingsnetwork.max.concurrent.users=100network.streaming.port=2399Step 5: Create Database Directory Structure
Create a directory to store your FileMaker database files:
mkdir -p databasesPlace your .fmp12 database files in this directory, or create a placeholder:
echo "Place your .fmp12 database files here" > databases/README.txtStep 6: Create Nginx Configuration
Create an Nginx configuration file for web publishing. Create nginx.conf:
user www-data;worker_processes auto;pid /run/nginx.pid;
events { worker_connections 1024;}
http { include /etc/nginx/mime.types; default_type application/octet-stream;
# Logging access_log /opt/fmd-logs/nginx-access.log; error_log /opt/fmd-logs/nginx-error.log;
# Performance sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048;
# Gzip compression gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss;
# Health check endpoint server { listen 80; server_name _;
location /health { access_log off; return 200 "OK\n"; add_header Content-Type text/plain; }
location / { root /var/www/html; index index.html; } }
# FMD Web Publishing server { listen 80; server_name example-app.klutch.sh;
client_max_body_size 100M;
location / { # Proxy to FMD Server web publishing engine proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }}Step 7: Create Environment Configuration
Create a .env.example file to document environment variables:
# FMD Server Environment Configuration# Copy to .env and customize as needed
# Admin CredentialsFMD_ADMIN_USER=adminFMD_ADMIN_PASSWORD=your-secure-password-here
# Directories (these are defaults in Dockerfile)FMD_DATA_DIR=/opt/fmd-dataFMD_BACKUP_DIR=/opt/fmd-backupsFMD_LOG_DIR=/opt/fmd-logs
# Server ConfigurationFMD_MAX_CONNECTIONS=250FMD_CACHE_SIZE=256FMD_MAX_CONCURRENT_USERS=100
# Backup ConfigurationFMD_BACKUP_ENABLED=trueFMD_BACKUP_SCHEDULE=dailyFMD_BACKUP_TIME=02:00FMD_BACKUP_RETENTION_DAYS=7
# Web PublishingFMD_WEB_PUBLISHING_ENABLED=trueFMD_WEB_HTTP_PORT=80FMD_WEB_HTTPS_PORT=443
# SecurityFMD_SSL_ENABLED=falseFMD_AUTH_REQUIRED=true
# LoggingFMD_LOG_LEVEL=info
# License (if applicable)# FMD_LICENSE_KEY=your-license-key-hereStep 8: Create README Documentation
Create a README.md file with deployment instructions:
# FMD Server Deployment on Klutch.sh
This repository contains the Docker configuration for deploying FileMaker Data Server on Klutch.sh.
## Quick Start
1. Place your `.fmp12` database files in the `databases/` directory2. Update environment variables in Klutch.sh dashboard3. Push this repository to GitHub4. Create a new app on Klutch.sh and connect your repository5. Deploy with HTTP traffic on port 806. Access Admin Console at `https://example-app.klutch.sh:5003`
## Required Persistent Volumes
FMD Server requires persistent storage for databases and backups:
- **Mount Path**: `/opt/fmd-data` - Database files and configurations- **Mount Path**: `/opt/fmd-backups` - Automated backups- **Mount Path**: `/opt/fmd-logs` - Server logs
## Initial Configuration
After deployment:
1. Access the Admin Console via HTTPS on port 50032. Log in with your admin credentials3. Upload or configure your database files4. Set up user accounts and permissions5. Configure backup schedules6. Enable web publishing if needed
## Connecting Clients
- **FileMaker Pro**: Use `fmnet://example-app.klutch.sh/DatabaseName`- **Web Browser**: Navigate to `https://example-app.klutch.sh`- **REST API**: Use `https://example-app.klutch.sh/fmi/data/v1/databases/DatabaseName`
## Documentation
- <a href="https://docs.klutch.sh?utm_source=docs" target="_blank">Klutch.sh Docs</a>- <a href="https://help.claris.com/en/server-help/" target="_blank" rel="noopener noreferrer">FileMaker Server Documentation</a>Step 9: Update Dockerfile to Include Configurations
Update your Dockerfile to copy all configuration files:
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install dependenciesRUN apt-get update && apt-get install -y --no-install-recommends \ wget curl ca-certificates software-properties-common gnupg \ unzip supervisor nginx libssl3 libcurl4 libxml2 \ openjdk-17-jre-headless netcat \ && rm -rf /var/lib/apt/lists/*
# Create directoriesRUN mkdir -p /opt/fmd-server /opt/fmd-data /opt/fmd-backups /opt/fmd-logs
# Copy configuration filesCOPY fmd-server-config /opt/fmd-server/configCOPY start-fmd.sh /opt/fmd-server/start-fmd.shCOPY nginx.conf /etc/nginx/nginx.conf
# Copy database files (if any)COPY databases /opt/fmd-server/databases
# Set permissionsRUN chmod +x /opt/fmd-server/start-fmd.sh
WORKDIR /opt/fmd-server
# Expose portsEXPOSE 5003 80 443 2399 5004
# Health checkHEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \ CMD curl -f http://localhost:80/health || exit 1
CMD ["/opt/fmd-server/start-fmd.sh"]Step 10: Test Locally with Docker (Optional)
For local testing, you can build and run the container:
# Build the Docker imagedocker build -t fmd-server-klutch .
# Run FMD Server locallydocker run -d \ --name fmd-server-test \ -p 5003:5003 \ -p 80:80 \ -p 443:443 \ -v "$(pwd)/fmd-data:/opt/fmd-data" \ -v "$(pwd)/fmd-backups:/opt/fmd-backups" \ -v "$(pwd)/fmd-logs:/opt/fmd-logs" \ -e FMD_ADMIN_USER=admin \ -e FMD_ADMIN_PASSWORD=testpassword \ fmd-server-klutch
# View logsdocker logs -f fmd-server-test
# Access Admin Console at https://localhost:5003
# Stop and remove when donedocker stop fmd-server-testdocker rm fmd-server-testFor a complete local test environment with MySQL backend, create a docker-compose.yml:
version: "3.8"
services: mysql: image: mysql:8.0 environment: MYSQL_ROOT_PASSWORD: rootpassword MYSQL_DATABASE: fmd_metadata MYSQL_USER: fmd_user MYSQL_PASSWORD: fmd_password volumes: - mysql-data:/var/lib/mysql restart: unless-stopped healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] interval: 10s timeout: 5s retries: 5
fmd-server: build: . ports: - "5003:5003" - "80:80" - "443:443" - "2399:2399" - "5004:5004" environment: FMD_ADMIN_USER: admin FMD_ADMIN_PASSWORD: secure_password FMD_MAX_CONNECTIONS: 250 FMD_WEB_PUBLISHING_ENABLED: "true" volumes: - fmd-data:/opt/fmd-data - fmd-backups:/opt/fmd-backups - fmd-logs:/opt/fmd-logs depends_on: mysql: condition: service_healthy restart: unless-stopped
volumes: mysql-data: fmd-data: fmd-backups: fmd-logs:Run the complete environment:
docker-compose up -ddocker-compose logs -f fmd-serverNote: Docker Compose is only for local development and testing. Klutch.sh does not support Docker Compose for deployments.
Step 11: Push to GitHub
Commit your configuration files to your GitHub repository:
git add Dockerfile start-fmd.sh fmd-server-config nginx.conf databases .env.example README.mdgit commit -m "Add FMD Server Docker configuration for Klutch.sh"git remote add origin https://github.com/yourusername/fmd-server-klutch.gitgit push -u origin mainDeploying to Klutch.sh
Now that your FMD Server project is ready and pushed to GitHub, follow these steps to deploy it on Klutch.sh with persistent storage.
-
Log in to Klutch.sh
Navigate to klutch.sh/app and sign in to your account.
-
Create a New Project
Go to Create Project and give your project a meaningful name (e.g., “FMD Server Database Platform”).
-
Create a New App
Navigate to Create App and configure the following settings.
-
Select Your Repository
- Choose GitHub as your Git source
- Select the repository containing your FMD Server Dockerfile
- Choose the branch you want to deploy (usually
mainormaster)
-
Configure Traffic Type
- Traffic Type: Select HTTP (FMD Server serves web interfaces and admin console via HTTP/HTTPS)
- Internal Port: Set to
80(the default HTTP port for web publishing)
Note: For Admin Console access on port 5003, users can access it through the HTTP service as the container exposes multiple ports internally.
-
Set Environment Variables
Add the following environment variables for your FMD Server configuration:
Required Variables:
FMD_ADMIN_USER: Admin username for Admin Console (e.g.,admin)FMD_ADMIN_PASSWORD: Strong password for admin access (generate a secure password)FMD_DATA_DIR: Data directory path (default:/opt/fmd-data)FMD_BACKUP_DIR: Backup directory path (default:/opt/fmd-backups)FMD_LOG_DIR: Log directory path (default:/opt/fmd-logs)
Performance Variables:
FMD_MAX_CONNECTIONS: Maximum concurrent database connections (default:250)FMD_CACHE_SIZE: Server cache size in MB (default:256)FMD_MAX_CONCURRENT_USERS: Maximum simultaneous users (default:100)
Backup Variables:
FMD_BACKUP_ENABLED: Enable automated backups (default:true)FMD_BACKUP_SCHEDULE: Backup frequency (options:daily,weekly)FMD_BACKUP_TIME: Time for scheduled backups (format:HH:MM)FMD_BACKUP_RETENTION_DAYS: Number of days to retain backups (default:7)
Web Publishing Variables:
FMD_WEB_PUBLISHING_ENABLED: Enable web publishing (default:true)FMD_WEB_HTTP_PORT: HTTP port for web access (default:80)FMD_WEB_HTTPS_PORT: HTTPS port for secure web access (default:443)
Security Variables:
FMD_SSL_ENABLED: Enable SSL/TLS encryption (default:false, Klutch.sh provides HTTPS)FMD_AUTH_REQUIRED: Require authentication for database access (default:true)FMD_LOG_LEVEL: Logging verbosity (options:debug,info,warning,error)
Security Note: Always use strong, unique passwords and mark sensitive variables as secrets in the Klutch.sh dashboard.
-
Attach Persistent Volumes
FMD Server requires persistent storage for databases, backups, and logs. Add three volumes:
Data Volume:
- Click “Add Volume” in the Volumes section
- Mount Path: Enter
/opt/fmd-data - Size: Choose based on database size (start with 10-50GB, expandable)
Backup Volume:
- Click “Add Volume” again
- Mount Path: Enter
/opt/fmd-backups - Size: Choose 20-100GB (should be 2-3x your data volume size for multiple backup versions)
Logs Volume:
- Click “Add Volume” again
- Mount Path: Enter
/opt/fmd-logs - Size: Choose 5-10GB (stores server logs, access logs, error logs)
Critical: These persistent volumes ensure your database files, automated backups, and diagnostic logs persist across deployments, updates, and restarts. Without them, you’ll lose all your data every time the container restarts.
-
Configure Additional Settings
- Region: Select the region closest to your users for optimal latency
- Compute Resources: Choose CPU and memory based on your workload:
- Small (1-10 users): 1GB RAM, 1 CPU
- Medium (10-50 users): 2GB RAM, 2 CPU
- Large (50-100 users): 4GB+ RAM, 4+ CPU
- Instances: Start with 1 instance (FMD Server manages concurrent users internally)
-
Deploy Your Application
Click “Create” to start the deployment. Klutch.sh will:
- Automatically detect your Dockerfile in the repository root
- Build the Docker image with FMD Server and all dependencies
- Attach the persistent volumes for data, backups, and logs
- Configure environment variables
- Start your FMD Server container
- Assign a URL for external access
-
Access Your FMD Server
Once deployment is complete, you’ll receive a URL like
example-app.klutch.sh. You can access different FMD Server services:Admin Console:
https://example-app.klutch.sh:5003Web Publishing:
https://example-app.klutch.shClient Connection (FileMaker Pro):
fmnet://example-app.klutch.sh/YourDatabaseNameREST API:
https://example-app.klutch.sh/fmi/data/v1/databases/YourDatabaseNameLog in to the Admin Console using the credentials you configured in
FMD_ADMIN_USERandFMD_ADMIN_PASSWORD.
Post-Deployment Configuration
After your FMD Server instance is deployed, complete the initial setup and configure your databases.
Initial Admin Console Setup
-
Access the Admin Console
Navigate to
https://example-app.klutch.sh:5003and log in with your admin credentials. -
Change Default Password
For security, change the default admin password immediately:
- Go to Admin → Admin Console Users
- Select your admin user
- Click Change Password
- Enter a strong, unique password
-
Configure Server Settings
- Navigate to Configuration → General Settings
- Review and adjust settings:
- Maximum concurrent connections
- Cache memory allocation
- Session timeout duration
- SSL/TLS settings (if using custom certificates)
Upload Database Files
-
Using Admin Console
- Navigate to Database Server → Databases
- Click Upload Database
- Select your
.fmp12database files from your local machine - Wait for upload to complete
-
Using File Transfer (Advanced)
If you have large database files, you can copy them directly to the persistent volume during deployment by including them in your Git repository’s
databases/directory. -
Open Databases
- Once uploaded, databases will appear in the Admin Console
- Click Open next to each database to make it available to clients
- Configure database-specific settings (encryption, auto-open on startup)
Configure User Accounts
-
Create Database Users
- Navigate to Security → Users
- Click New User
- Enter username and password
- Assign privilege sets (Full Access, Data Entry Only, Read-Only, etc.)
-
Configure Privilege Sets
- Navigate to Security → Privilege Sets
- Review default privilege sets
- Create custom privilege sets with specific permissions
- Assign to appropriate users
-
Enable External Authentication (Optional)
- Configure LDAP or OAuth integration for enterprise authentication
- Navigate to Security → External Authentication
- Follow the configuration wizard
Configure Backup Schedule
-
Automated Backups
- Navigate to Database Server → Backup
- Enable automatic backups
- Set schedule (daily at 2:00 AM recommended)
- Choose backup location:
/opt/fmd-backups - Set retention policy (7 days for daily, 4 weeks for weekly)
-
Test Backup
- Click Back Up Now to perform immediate backup
- Verify backup appears in the backup list
- Check backup file size is reasonable
-
Backup Verification
- Schedule weekly backup verification
- Enable email notifications for backup failures
Connecting Clients to FMD Server
FMD Server supports multiple client connection methods. Here’s how to connect from different platforms.
FileMaker Pro Client
-
From FileMaker Pro
-
Open FileMaker Pro
-
Go to File → Open Remote
-
In the Host field, enter:
example-app.klutch.sh -
Select your database from the list
-
Enter your username and password
-
Click Open
-
-
Using URL Scheme
Create a connection URL:
fmnet://example-app.klutch.sh/DatabaseNameUsers can click this link to automatically open the database in FileMaker Pro.
Web Browser Access
-
Web Direct
Navigate to:
https://example-app.klutch.sh/fmi/webd/DatabaseNameUsers will see a browser-based version of the database interface.
-
Custom Web Publishing
If you’ve developed custom web pages using PHP or XML:
https://example-app.klutch.sh/fmi/xml/fmresultset.xml?-db=DatabaseName&-lay=LayoutName&-findall
Mobile App (iOS)
-
FileMaker Go
- Open FileMaker Go on your iOS device
- Tap Hosts
- Tap + to add a new host
- Enter:
- Host:
example-app.klutch.sh - Port:
443(HTTPS)
- Host:
- Tap Save
- Select your database and log in
REST API Access
FMD Server provides a RESTful Data API for programmatic access.
-
Authentication
First, authenticate to get a session token:
Terminal window curl -X POST https://example-app.klutch.sh/fmi/data/v1/databases/DatabaseName/sessions \-H "Content-Type: application/json" \-H "Authorization: Basic $(echo -n 'username:password' | base64)" \-d '{}'Response:
{"response": {"token": "abc123xyz789token"},"messages": [{"code": "0", "message": "OK"}]} -
Create a Record
Terminal window curl -X POST https://example-app.klutch.sh/fmi/data/v1/databases/DatabaseName/layouts/LayoutName/records \-H "Content-Type: application/json" \-H "Authorization: Bearer abc123xyz789token" \-d '{"fieldData": {"FirstName": "John","LastName": "Doe","Email": "john@example.com"}}' -
Query Records
Terminal window curl -X GET https://example-app.klutch.sh/fmi/data/v1/databases/DatabaseName/layouts/LayoutName/records \-H "Authorization: Bearer abc123xyz789token" -
JavaScript Example
const FMD_SERVER = 'https://example-app.klutch.sh';const DATABASE = 'YourDatabaseName';const LAYOUT = 'YourLayoutName';// Authenticateasync function authenticate(username, password) {const credentials = btoa(`${username}:${password}`);const response = await fetch(`${FMD_SERVER}/fmi/data/v1/databases/${DATABASE}/sessions`,{method: 'POST',headers: {'Content-Type': 'application/json','Authorization': `Basic ${credentials}`}});const data = await response.json();return data.response.token;}// Create a recordasync function createRecord(token, recordData) {const response = await fetch(`${FMD_SERVER}/fmi/data/v1/databases/${DATABASE}/layouts/${LAYOUT}/records`,{method: 'POST',headers: {'Content-Type': 'application/json','Authorization': `Bearer ${token}`},body: JSON.stringify({ fieldData: recordData })});return await response.json();}// Usage(async () => {const token = await authenticate('username', 'password');const result = await createRecord(token, {FirstName: 'Jane',LastName: 'Smith',Email: 'jane@example.com'});console.log('Record created:', result);})(); -
Python Example
import requestsimport base64import jsonFMD_SERVER = 'https://example-app.klutch.sh'DATABASE = 'YourDatabaseName'LAYOUT = 'YourLayoutName'def authenticate(username, password):credentials = base64.b64encode(f'{username}:{password}'.encode()).decode()response = requests.post(f'{FMD_SERVER}/fmi/data/v1/databases/{DATABASE}/sessions',headers={'Content-Type': 'application/json','Authorization': f'Basic {credentials}'})return response.json()['response']['token']def create_record(token, record_data):response = requests.post(f'{FMD_SERVER}/fmi/data/v1/databases/{DATABASE}/layouts/{LAYOUT}/records',headers={'Content-Type': 'application/json','Authorization': f'Bearer {token}'},json={'fieldData': record_data})return response.json()# Usagetoken = authenticate('username', 'password')result = create_record(token, {'FirstName': 'Bob','LastName': 'Johnson','Email': 'bob@example.com'})print(f'Record created: {result}')
Database Management
Managing Database Files
-
Uploading New Databases
- Use the Admin Console: Database Server → Databases → Upload
- Or place files in the
databases/directory in your Git repository before deployment
-
Closing Databases
- Navigate to Database Server → Databases
- Select the database
- Click Close to disconnect all clients and close the database
-
Removing Databases
- Close the database first
- Click Remove to delete from the server
- Confirm the action (this is permanent unless you have backups)
Performance Monitoring
-
Real-Time Statistics
- Navigate to Database Server → Statistics
- Monitor:
- Active clients
- Disk I/O
- Cache hit rate
- Network throughput
- CPU and memory usage
-
Database Performance
- View per-database statistics:
- Number of connected users
- Records accessed per second
- Query execution times
- Cache performance
- View per-database statistics:
-
Set Up Alerts
- Configure email alerts for:
- High CPU usage (> 80%)
- Low disk space (< 10%)
- Failed backups
- Server errors
- Configure email alerts for:
Script Scheduling
-
Create Scheduled Scripts
- Navigate to Database Server → Schedules
- Click New Schedule
- Configure:
- Script name and database
- Frequency (hourly, daily, weekly, monthly)
- Start time
- Parameters
-
Common Scheduled Tasks
- Data imports from external sources
- Report generation and email distribution
- Database cleanup and optimization
- Data synchronization
- Automated notifications
-
Monitor Schedule Execution
- View schedule history
- Check for failed runs
- Review execution logs
Production Best Practices
Security Hardening
-
Use Strong Passwords
- Minimum 12 characters
- Mix of uppercase, lowercase, numbers, and symbols
- Change default passwords immediately
- Rotate passwords every 90 days
-
Enable SSL/TLS
Klutch.sh automatically provides HTTPS for your app URL, but for additional security:
- Upload custom SSL certificates in Admin Console
- Force HTTPS for all connections
- Disable HTTP access
-
Restrict Admin Console Access
- Limit Admin Console to specific IP addresses if possible
- Use VPN for remote administration
- Enable two-factor authentication if available
-
Database Encryption
- Encrypt database files at rest
- Use FileMaker’s built-in encryption
- Protect encryption passwords securely
-
Regular Security Audits
- Review user accounts monthly
- Audit privilege sets
- Check for unused accounts and disable them
- Monitor access logs for suspicious activity
Backup Strategy
-
Automated Backups
- Daily backups at off-peak hours (2:00 AM recommended)
- Weekly full backups
- Monthly archive backups
-
Backup Verification
- Schedule weekly backup integrity checks
- Test database restoration monthly
- Store verification logs
-
Off-Site Backups
- Download critical backups to external storage
- Use cloud storage services (S3, Dropbox, etc.)
- Maintain 3-2-1 backup strategy:
- 3 copies of data
- 2 different media types
- 1 off-site copy
-
Backup Before Changes
Always create manual backups before:
- FMD Server upgrades
- Database schema changes
- Major configuration changes
- Large data imports
Performance Optimization
-
Cache Configuration
- Allocate sufficient cache memory (10-20% of total RAM)
- Monitor cache hit rates (target > 90%)
- Increase cache size if hit rate is low
-
Index Optimization
- Create indexes on frequently searched fields
- Avoid over-indexing (slows down writes)
- Rebuild indexes periodically
-
Query Optimization
- Use efficient search criteria
- Limit result sets with ranges
- Avoid complex calculations in found sets
-
Resource Allocation
Monitor and adjust compute resources in Klutch.sh:
- CPU: Scale up if consistently > 80%
- Memory: Scale up if cache hit rate drops
- Disk: Ensure 20%+ free space at all times
Monitoring and Alerting
-
Server Health Monitoring
- Monitor uptime and availability
- Track response times
- Watch error rates
- Monitor disk usage
-
Performance Metrics
- Active user count
- Database query performance
- Network latency
- Backup completion status
-
Alert Configuration
Set up alerts for:
- Server downtime
- High CPU usage (> 80%)
- High memory usage (> 90%)
- Low disk space (< 10%)
- Failed backups
- Authentication failures (potential security issue)
-
Log Analysis
- Review error logs daily
- Analyze access patterns
- Identify slow queries
- Track user behavior
Troubleshooting
Cannot Access Admin Console
Symptoms: Unable to reach Admin Console at port 5003
Solutions:
- Verify your app is running in the Klutch.sh dashboard
- Check that the internal port is set to 80 (HTTP)
- Ensure HTTP traffic type is selected
- Verify Admin Console is enabled in configuration
- Check application logs for startup errors
- Confirm port 5003 is exposed in Dockerfile
Database Files Not Appearing
Symptoms: Databases uploaded but not visible in Admin Console
Solutions:
- Check persistent volume is mounted at
/opt/fmd-data - Verify database files are in correct format (.fmp12)
- Review file permissions in volume
- Check available disk space on data volume
- Review server logs for file system errors
- Restart FMD Server to re-scan database directory
Client Connection Failures
Symptoms: FileMaker Pro clients cannot connect to server
Solutions:
- Verify server URL is correct:
example-app.klutch.sh - Check database is opened in Admin Console
- Verify user credentials are correct
- Ensure user has proper privilege set assigned
- Check firewall isn’t blocking connection
- Test network connectivity to server
- Verify database isn’t corrupted (check logs)
Backup Failures
Symptoms: Scheduled backups not completing successfully
Solutions:
- Check available disk space on backup volume
- Verify backup directory path:
/opt/fmd-backups - Review backup schedule configuration
- Check database isn’t locked or in use during backup
- Review server logs for specific error messages
- Increase backup volume size if full
- Verify write permissions on backup directory
Performance Issues
Symptoms: Slow query responses, timeout errors
Solutions:
- Check CPU and memory usage in Klutch.sh dashboard
- Monitor active user count
- Review slow query logs
- Increase cache size if hit rate is low
- Scale up compute resources (CPU/RAM)
- Optimize database indexes
- Check for long-running scripts
- Reduce number of concurrent connections if at limit
REST API Authentication Errors
Symptoms: 401 Unauthorized errors when calling REST API
Solutions:
- Verify credentials are correct
- Check user has Data API access privilege
- Ensure Data API is enabled in database settings
- Verify token hasn’t expired (15 minute default)
- Check Base64 encoding of credentials is correct
- Review user privilege set allows API access
- Test with different REST client (curl, Postman)
Web Publishing Not Working
Symptoms: Web Direct URLs return errors
Solutions:
- Verify web publishing is enabled:
FMD_WEB_PUBLISHING_ENABLED=true - Check Nginx is running correctly
- Review Nginx access logs:
/opt/fmd-logs/nginx-access.log - Check Nginx error logs:
/opt/fmd-logs/nginx-error.log - Verify database is opened for web access
- Check web publishing engine is running
- Test direct connection to port 80
Advanced Configuration
Custom SSL Certificates
To use your own SSL certificates instead of Klutch.sh’s automatic HTTPS:
-
Prepare Certificate Files
- Obtain SSL certificate from a certificate authority
- Ensure you have:
- Certificate file (.crt)
- Private key file (.key)
- Certificate chain file (.ca-bundle)
-
Update Dockerfile
Add certificate files to your Docker image:
# Copy SSL certificatesCOPY ssl/server.crt /opt/fmd-server/ssl/COPY ssl/server.key /opt/fmd-server/ssl/COPY ssl/ca-bundle.crt /opt/fmd-server/ssl/RUN chmod 600 /opt/fmd-server/ssl/server.key -
Configure in Admin Console
- Navigate to Configuration → SSL Certificate
- Upload certificate files
- Enable SSL for all connections
External Database Connectivity
FMD Server can connect to external data sources:
-
ODBC/JDBC Configuration
- Install necessary ODBC drivers in Dockerfile
- Configure DSN (Data Source Name)
- Create External SQL Sources (ESS) in FileMaker Pro
- Link external tables to FileMaker layouts
-
Supported External Databases
- MySQL/MariaDB - See MySQL Guide
- PostgreSQL
- Microsoft SQL Server
- Oracle Database
-
Example: Connect to MySQL
# Add to DockerfileRUN apt-get update && apt-get install -y \mysql-client \libmysqlclient-dev \unixodbc \unixodbc-dev
Custom Web Publishing
Develop custom web applications using PHP or XML:
-
PHP API Setup
config.php <?phpdefine('FM_SERVER', 'example-app.klutch.sh');define('FM_DATABASE', 'YourDatabase');define('FM_USERNAME', 'webuser');define('FM_PASSWORD', 'webpassword');// Include FileMaker PHP APIrequire_once('FileMaker.php');$fm = new FileMaker();$fm->setProperty('database', FM_DATABASE);$fm->setProperty('hostspec', FM_SERVER);$fm->setProperty('username', FM_USERNAME);$fm->setProperty('password', FM_PASSWORD);?> -
Query Data via PHP
<?phprequire_once('config.php');$findRequest = $fm->newFindCommand('LayoutName');$findRequest->addFindCriterion('Status', 'Active');$result = $findRequest->execute();if (!FileMaker::isError($result)) {$records = $result->getRecords();foreach ($records as $record) {echo $record->getField('FirstName') . ' ';echo $record->getField('LastName') . '<br>';}}?>
Scaling Strategies
For growing workloads, consider these scaling approaches:
-
Vertical Scaling
- Increase CPU and memory in Klutch.sh dashboard
- Recommended for up to 100 concurrent users
- Easier to implement and manage
-
Database Optimization
- Separate databases across multiple FMD Server instances
- Use external SQL databases for large data tables
- Implement caching layers
-
Load Balancing (Advanced)
For very large deployments:
- Deploy multiple FMD Server instances
- Use external load balancer
- Implement database replication
- Requires FileMaker Server Advanced license
Migrating Existing Databases
If you’re migrating from an existing FMD Server installation:
-
Backup Current Databases
On your existing server:
- Close all databases
- Create complete backups
- Export configuration settings
- Document custom scripts and schedules
-
Prepare Database Files
- Download database files (.fmp12)
- Verify file integrity
- Test opening files locally
- Check for any corrupted data
-
Transfer to Klutch.sh
- Add database files to
databases/directory - Commit to Git repository
- Push to GitHub
- Deploy to Klutch.sh
- Add database files to
-
Reconfigure Settings
- Upload databases via Admin Console
- Recreate user accounts
- Configure privilege sets
- Set up backup schedules
- Recreate script schedules
-
Test Connectivity
- Connect with FileMaker Pro client
- Verify all features work
- Test web publishing
- Validate REST API access
- Perform test queries
-
Update Client Connections
- Update FileMaker Pro host addresses
- Modify web publishing URLs
- Update REST API endpoints
- Test mobile app connections
Additional Resources
- Klutch.sh Documentation
- FileMaker Server Documentation
- FileMaker Data API Guide
- Claris Community Forum
- Klutch.sh Volumes Guide
- Klutch.sh Networking Guide
- MySQL on Klutch.sh (for external database integration)
Conclusion
Deploying FMD Server to Klutch.sh provides a powerful, cloud-hosted database platform with enterprise-grade features, global accessibility, and simplified management. With persistent storage for databases and backups, comprehensive web publishing capabilities, and robust REST API support, your FMD Server instance on Klutch.sh is ready to power custom business applications, manage complex workflows, and serve users worldwide with reliable performance and security.