Documentation Menu
1. API Overview
Coming Soon: The SillyHost public API is currently in development. It will allow you to programmatically manage domains, hosting accounts, DNS records, and billing. Stay tuned for announcements.
In the meantime, you can use the DirectAdmin API and Cloudflare DNS API to automate many tasks. Details below.
2. DirectAdmin API Access
DirectAdmin provides a comprehensive API that allows you to automate hosting management tasks. You can use it to create email accounts, manage databases, configure domains, and much more.
Authentication
The DirectAdmin API uses your DirectAdmin username and password for authentication, passed via HTTP Basic Auth or as login tokens.
# Example: List email accounts for a domain
curl -u "username:password" \
"https://yourserver:2222/CMD_API_POP?domain=yourdomain.co.uk&action=list"
Common API Commands
| Command | Description |
|---|---|
| CMD_API_POP | Manage email accounts |
| CMD_API_DATABASES | Manage MySQL databases |
| CMD_API_SUBDOMAINS | Manage subdomains |
| CMD_API_SSL | Manage SSL certificates |
| CMD_API_FILE_MANAGER | File operations |
| CMD_API_DNS_CONTROL | Manage DNS records (if using DA DNS) |
Creating a Login Key (Recommended)
Instead of using your main password, create a login key with restricted permissions:
- Go to DirectAdmin > Login Keys
- Create a new key with only the API commands you need
- Optionally restrict the key to specific IP addresses
- Use the key name and value in place of username and password
Tip: Always use login keys with minimal permissions for API access rather than your main account credentials. This limits the damage if the key is compromised.
3. Cloudflare DNS API
SillyHost uses Cloudflare for DNS management. If you need to programmatically manage DNS records for your domains, you can do so through the Cloudflare API.
DNS changes made through the SillyHost dashboard are automatically pushed to Cloudflare. However, for advanced automation, you can contact support to discuss direct Cloudflare API access for your zones.
Example: List DNS Records
# Using the Cloudflare API (requires API token)
curl -X GET "https://api.cloudflare.com/client/v4/zones/{zone_id}/dns_records" \
-H "Authorization: Bearer {api_token}" \
-H "Content-Type: application/json"
Info: Direct Cloudflare API access is available on Enterprise hosting plans. Contact support to request your zone ID and an API token.
4. Webhook Integrations
SillyHost can send webhook notifications for certain events, allowing you to integrate with external services. Supported webhook events include:
- Domain registration complete
- Hosting account provisioned
- Invoice paid / payment received
- Service renewal reminders
- SSL certificate issued/renewed
Webhooks send a POST request with a JSON payload to a URL of your choice. Configure webhooks in Dashboard > Settings > Webhooks (coming soon with the SillyHost API).
5. FTP/SFTP Access Details
Use FTP or SFTP to transfer files between your local machine and your hosting account.
FTP (All Plans)
Host: ftp.yourdomain.co.uk
Port: 21
Username: your DirectAdmin username
Password: your DirectAdmin password
Encryption: FTPS (Explicit TLS) recommended
SFTP (Business & Enterprise Plans)
Host: yourdomain.co.uk (or server hostname)
Port: 22
Username: your DirectAdmin username
Password: your DirectAdmin password
Protocol: SFTP (SSH File Transfer)
Recommended FTP clients:
- FileZilla -- free, cross-platform, most popular FTP client
- Cyberduck -- free, macOS and Windows
- WinSCP -- free, Windows only, with advanced features
6. SSH Access (Business & Enterprise)
SSH gives you command-line access to your hosting account, allowing you to run scripts, manage files, use Git, and perform advanced tasks.
# Connect via SSH
ssh username@yourdomain.co.uk -p 22
# Or with a specific server hostname
ssh username@server.sillyhost.co.uk -p 22
SSH Key Authentication (Recommended)
For better security, use SSH keys instead of passwords:
# Generate an SSH key pair (if you don't have one)
ssh-keygen -t ed25519 -C "your.email@example.com"
# Copy your public key to the server
ssh-copy-id username@yourdomain.co.uk
Available Tools via SSH
Your SSH environment includes:
- PHP CLI (multiple versions)
- Composer (PHP dependency manager)
- WP-CLI (WordPress command-line interface)
- Git
- Node.js and npm (on request)
- MySQL/MariaDB CLI client
7. Git Deployment
If you develop your website locally using Git, you can deploy changes directly to your hosting account using Git over SSH.
Setting Up Git Deployment
SSH into your server
Connect via SSH and navigate to your domain's directory.
Create a bare Git repository
mkdir ~/repos/mysite.git && cd ~/repos/mysite.git
git init --bare
Create a post-receive hook
# Create the hook file
cat > hooks/post-receive << 'EOF'
#!/bin/bash
GIT_WORK_TREE=/home/user/domains/yourdomain.co.uk/public_html git checkout -f
EOF
chmod +x hooks/post-receive
Add the remote locally
# On your local machine
git remote add production ssh://user@yourdomain.co.uk/~/repos/mysite.git
git push production main
Now every time you run git push production main, your changes are automatically deployed to your live website.
8. Developer Tools and Resources
Here are some useful tools and resources for developers working with SillyHost:
WP-CLI (WordPress Command Line)
Manage WordPress from the command line. Install plugins, update themes, manage users, and run database operations without using the browser.
wp plugin install woocommerce --activate
wp theme update --all
wp db export backup.sql
Composer (PHP Package Manager)
Manage PHP dependencies for your projects. Available via SSH.
composer install
composer require vendor/package
cURL (HTTP Client)
Test APIs and HTTP requests directly from the server command line. Useful for debugging webhook endpoints and API integrations.
Error Logs
Access PHP error logs and Apache access/error logs from DirectAdmin or via SSH at /home/user/domains/yourdomain.co.uk/logs/.
Tip: If you need a specific tool or software version that is not available by default, contact our support team. We can often accommodate developer requests on Business and Enterprise plans.