This guide explains how to deploy the Binance Square Automator to a Linode VPS.
- A Linode account and a running Linode (Ubuntu 22.04 LTS recommended).
- Docker and Docker Compose installed on your Linode.
- A Gemini API Key.
- Binance API Key and Secret.
Connect to your Linode via SSH:
ssh root@your_linode_ipInstall Docker (if not already installed):
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.shUpload your project files to the Linode or clone them from a repository.
Create a .env file in the project root:
touch .envAdd your Gemini API Key to the .env file:
GEMINI_API_KEY=your_actual_gemini_api_keyRun the following command to build and start the application:
docker compose up -d --buildThe application will now be running on http://your_linode_ip:3000.
For production, it's recommended to use Nginx with SSL (Certbot).
Install Nginx:
apt update && apt install nginx -yCreate a configuration file /etc/nginx/sites-available/square-ai:
server {
listen 80;
server_name your_domain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}Enable the site and restart Nginx:
ln -s /etc/nginx/sites-available/square-ai /etc/nginx/sites-enabled/
nginx -t
systemctl restart nginxTo view logs:
docker compose logs -fTo stop the app:
docker compose downTo update the app:
git pull
docker compose up -d --build