C
CENTER OF AI Dev Server Portal
HEALTHY // ONLINE
SYSTEM INSTANTIATED

DevOps Engine &
Getting Started Guide

Welcome to the Center of AI (CAI) development environment. Multiple developers build, test, and host apps concurrently on this Contabo VPS. Use this guide to deploy safely, configure Caddy proxies, prevent port conflicts, and manage dockerised configurations.

cai-dev-srv:~$ monitor
UTC 00:00:00
▶ SYSTEM UPTIME Loading...
▶ RAM USAGE Loading...
▶ CPU LOAD Loading...
▶ LIVE PORTS Loading...
[sys] Connecting to status api...
[sys] Awaiting payload...

Core Server Rules (Strict Compliance Required)

  • Minimum Exposure Rule: Only ports 80 (HTTP) and 443 (HTTPS) should be exposed externally via the firewall/DNS. Caddy manages everything.
  • Unique Ports Registry: Every project running on the server must occupy a unique port (e.g., 8010, 8020). Coordinate with the team and register your port in the registry below to avoid resource locking!
  • Folderization Standard: Folderise and scope all projects neatly inside ~/cai-apps/<project-name>, grouped by team scope.
  • Gitignore hygiene: Never commit secrets, environment configs (.env), node_modules, log files, or SSH private keys. Ensure a solid gitignore is in place.
  • Docker-First: All apps must run within Docker containers. No direct Node/Python runtimes should run raw on the host to avoid version conflicts and memory leak failures.

DevOps Reference Guides

Filter topics or copy quick scripts instantly.

1. Login & SSH Session

Access the server using secure SSH keypairs. Password login has been locked down completely on the Contabo daemon to prevent bot bruteforcing.

SSH Commands
ssh root@<CONTABO_IP>
Clean Exit

Always exit sessions cleanly to release terminal hooks:

exit
Contabo Security Tip

2. Editing Server Files

For rapid config edits, use server-friendly terminal editors like nano or vim.

NANO Quick Reference
nano <filename> - Open/Create File
Ctrl + O - Save / Write Out Changes
Enter - Confirm File name write
Ctrl + X - Exit Nano Editor

Avoid editing large application source files on the server directly. Build and deploy them using Git.

Nano Editor

3. Project Folderization

Organize projects cleanly within defined directories. Group all production/test apps inside the shared ~/cai-apps root.

Directory Structure Standard
~ (Root Directory)
└── cai-apps/ # Central hub
    ├── project-amara/
    ├── cai-dev-server/ # This app
    └── project-beta/
mkdir -p ~/cai-apps && cd ~/cai-apps
Workspace Standard

4. Git & Private Clones

To clone private git repositories securely, you must generate a deployment key on the server and add it to Github/Gitlab.

1. Generate Key on VPS
ssh-keygen -t ed25519 -C "cai-dev-vps"
2. View & Copy Key to GitHub
cat ~/.ssh/id_ed25519.pub

Use deploy keys with Read-Only access in your repositories' Settings -> Deploy Keys to maximize project security.

Git Access

5. Env Config & Gitignores

Maintain a strict separation between code and secrets. Keep values inside a .env file.

Clean .gitignore File Example
# Ignore environment secrets
.env
# Ignore node modules & logs
node_modules/
*.log
# Ignore local system keys
*.pem
Secure Env Permissions
chmod 600 .env
Security Hygiene

6. Docker Build & Run

Dockerise every application. Do not run processes in background screens directly on the VPS host system.

1. Build Docker Image
docker build -t app-name .
2. Run Container (Localhost bound)
docker run -d --name app-name -p 127.0.0.1:8080:8080 --restart always app-name
Dockerisation

7. Caddy & Auto-SSL

Caddy sits as the gateway reverse-proxy. It intercepts all HTTPS requests and forwards them internally.

Caddyfile Rule (/etc/caddy/Caddyfile)
your-sub.yourdomain.com {
reverse_proxy localhost:8000
}
Reload Caddy Daemon
systemctl reload caddy
Web Routing

8. Cron Maintenance

Contabo dev server uses standard Linux crontab routines to run nightly disk cleanups, docker log rotations, and automated backups.

View Active Cron Tasks
crontab -l
Edit Cron Registry
crontab -e
Crontab Jobs

9. Port & Socket Inspector

To inspect active ports, see what processes are running, or identify conflicting local binds, run these diagnostic scripts.

Show All Listening Ports
ss -tulpn
Identify Specific Port Process
netstat -tulpn | grep :8000
Server Audit

Active Port Registry

Review ports currently listening or mapped in Caddy configurations.

Port Number Application details Owner / Agent Local IP Bind Proxy domain Status
Loading port registry from server api...

Live Sync: This table reads real-time server sockets from /proc/net/tcp and routing parameters from /etc/caddy/Caddyfile.

If your port is mapped in Caddy but shows OFFLINE, it means the backend application container is down or not bound to that specific port.

Interactive Deploy Script Generator

Configure your project specs below to generate customized setup scripts, Dockerfiles, and Caddy proxy entries.


                

Troubleshooting logs & Common Errors

Diagnostic definitions for errors often encountered on our Docker/Contabo architecture.

SUCCESS: Snippet copied to clipboard!