Setup, development workflow, and deployment guide
mkdir -p /home/mysite/{includes,assets/{css,js,icons},api,endpoints,help}
cp /home/test/includes/security.php /home/mysite/includes/
cp /home/test/includes/functions.php /home/mysite/includes/
cp -r /home/test/assets/css /home/mysite/assets/
cp -r /home/test/assets/js /home/mysite/assets/
<?php
require_once __DIR__ . '/includes/security.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Site</title>
<link rel="stylesheet" href="/assets/css/app.css">
</head>
<body>
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">☽</button>
<div class="container">
<h1>Welcome</h1>
</div>
<script src="/assets/js/app.js"></script>
</body>
</html>
See the Troubleshooting page for the full vhost template and SSL setup steps.
server {
listen 80;
listen [::]:80;
server_name mysite.kim8.s4s.host;
return 301 https://mysite.kim8.s4s.host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name mysite.kim8.s4s.host;
ssl_certificate /etc/letsencrypt/live/mysite.kim8.s4s.host/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite.kim8.s4s.host/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
root /home/mysite;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 300;
}
location ~ /\.(?!well-known) {
deny all;
}
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
Save to /etc/nginx/sites-available/mysite.kim8.s4s.host.conf, symlink, and reload:
ln -s /etc/nginx/sites-available/mysite.kim8.s4s.host.conf /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
# Install certbot (if not already)
apt install certbot python3-certbot-nginx
# Get certificate
certbot --nginx -d mysite.kim8.s4s.host
# Verify auto-renewal
certbot renew --dry-run
Certbot automatically adds SSL directives to your Nginx config and sets up a cron job for renewal.
| PHP Version | 8.3.6 (FPM) |
| Required Extensions | curl, json, mbstring, openssl |
| PHP-FPM Socket | unix:/run/php/php8.3-fpm.sock |
| Process Manager | dynamic |
apt install php8.3-fpm php8.3-curl php8.3-mbstring php8.3-xml php8.3-mysql
/home/mysite/ — changes are live immediatelycd /home/mysite
git init
git add .
git commit -m "Initial setup"
git add .
git commit -m "Description of changes"
CHANGELOG.md and TODO.md as needednginx -t && systemctl reload nginx
systemctl restart php8.3-fpm
certbot renew
df -h
systemctl status nginx php8.3-fpm mariadb
find /tmp/sess_* -mtime +7 -delete 2>/dev/null
| test.kim8.s4s.host | Main hub, API reference, project docs |
| vision.kim8.s4s.host | Vision AI, OCR, screenshot QA |
| featherless.kim8.s4s.host | Model catalog, text playground |
| generate.kim8.s4s.host | Image generation, upscaling |
| api.kim8.s4s.host | Unified API gateway (no auth needed) |