refactor(sshbot): update .env and compose.yaml for improved configuration

This commit is contained in:
Viren070
2025-04-28 16:04:38 +01:00
parent 24290c37b4
commit 245129256d
2 changed files with 32 additions and 18 deletions
+23 -12
View File
@@ -1,14 +1,25 @@
# SSH Bot Configuration
SSHBOT_DISCORD_TOKEN=your_discord_bot_token_here
SSHBOT_SSH_HOST=your_vps_host
SSHBOT_SSH_PORT=22
SSHBOT_SSH_USERNAME=your_ssh_username
SSHBOT_SSH_PASSWORD=your_ssh_password
# This is a discord bot that allows you to manage your VPS via commands. It also allows discord to be used as a terminal.
# You should only use this if you understand the risks of using discord as an interface to your VPS; You are allowing Discord to see the
# commands you run and what you use your VPS for.
# If you are using key-based authentication, I would recommend running this bot on a separate machine, preferably local, as otherwise
# you would have to add your private key to your VPS, which is not recommended.
# Timezone
${TZ}=UTC
# Discord Bot Configuration
DISCORD_TOKEN=your_discord_bot_token_here
# Optional: Key-based authentication
# SSH_PRIVATE_KEY_PATH=/path/to/your/private/key
# SSH_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\nYOUR_PRIVATE_KEY_CONTENT_HERE\n-----END RSA PRIVATE KEY-----
# SSH_KEY_PASSPHRASE=your_key_passphrase
# SSH Connection details
SSH_HOST=your_vps_host
SSH_PORT=22
# SSH Authentication Details
SSH_USERNAME=your_ssh_username
# You may either use password authentication:
SSH_PASSWORD=your_ssh_password
# Or key-based authentication, you can either provide the path to the private key here, or modify the compose.yaml file and provide the contents
# of the private key in the SSH_PRIVATE_KEY variable.
SSH_PRIVATE_KEY_PATH=/path/to/your/private/key
# If you have a passphrase for your private key, you can provide it here.
SSH_KEY_PASSPHRASE=your_key_passphrase
+9 -6
View File
@@ -3,13 +3,16 @@ services:
image: nhyyeb/sshbot:latest
container_name: sshbot
restart: unless-stopped
env_file:
- .env
environment:
- DISCORD_TOKEN=${SSHBOT_DISCORD_TOKEN}
- SSH_HOST=${SSHBOT_SSH_HOST}
- SSH_PORT=${SSHBOT_SSH_PORT}
- SSH_USERNAME=${SSHBOT_SSH_USERNAME}
- SSH_PASSWORD=${SSHBOT_SSH_PASSWORD}
- TZ=${TZ:-UTC}
TZ: ${TZ:-UTC}
# SSH_PRIVATE_KEY: |
# -----BEGIN OPENSSH PRIVATE KEY-----
# your_key_line_1
# your_key_line_2
# your_key_line_3
# -----END OPENSSH PRIVATE KEY-----
profiles:
- sshbot
- all