Install and configure the CloudForge Agent on your server
The fastest way to install the agent:
curl -fsSL https://cloud-forge.me/install.sh | sh -s -- --token YOUR_TOKENThis script will:
Run directly with npx (no installation required):
npx cloudforge-agent --token YOUR_TOKENOr install globally:
npm install -g cloudforge-agent
cloudforge-agent --token YOUR_TOKENdocker run -d \
--name cloudforge-agent \
--restart unless-stopped \
cloudforge/agent:latest \
--token YOUR_TOKEN| Option | Description | Default |
|---|---|---|
-t, --token | Agent token from CloudForge dashboard | Required |
-s, --server | CloudForge server URL | https://cloud-forge.me |
-d, --debug | Enable debug logging | false |
-V, --version | Show version number | - |
-h, --help | Show help | - |
You can configure the agent using environment variables instead of command line options:
| Variable | Description |
|---|---|
CLOUDFORGE_TOKEN | Agent token (alternative to --token) |
CLOUDFORGE_SERVER_URL | Server URL (alternative to --server) |
CLOUDFORGE_DEBUG | Set to "true" to enable debug mode |
Create a systemd service file:
sudo nano /etc/systemd/system/cloudforge-agent.service[Unit]
Description=CloudForge Agent
After=network.target
[Service]
Type=simple
User=YOUR_USERNAME
Environment="CLOUDFORGE_TOKEN=cf_your_token_here"
ExecStart=/usr/bin/npx cloudforge-agent
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.targetEnable and start the service:
sudo systemctl daemon-reload sudo systemctl enable cloudforge-agent sudo systemctl start cloudforge-agentView logs:
sudo journalctl -u cloudforge-agent -fCreate a launchd plist file:
nano ~/Library/LaunchAgents/me.cloud-forge.agent.plist<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>me.cloud-forge.agent</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/npx</string>
<string>cloudforge-agent</string>
<string>--token</string>
<string>cf_your_token_here</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>Load the service:
launchctl load ~/Library/LaunchAgents/me.cloud-forge.agent.plistcf_)cloud-forge.me:443 are allowed--debug flag to see detailed logscloud-forge.me