Skip to content

Instantly share code, notes, and snippets.

@grplyler
Last active September 16, 2020 02:00
Show Gist options
  • Save grplyler/b9b336c647075d47a4ea0ff4b8251e53 to your computer and use it in GitHub Desktop.
Save grplyler/b9b336c647075d47a4ea0ff4b8251e53 to your computer and use it in GitHub Desktop.
Run Discord Bot with Tmux

Run Discord bot with Tmux

Log into server

ssh root@zeta.sico.dev -p 22000

Navigate to folder

cd /opt/tecbot

Start tmux

Creates a new tmux sesions with name "tecbot"

tmux new -s tecbot

Pull git updates

git pull

Run Bot

node index.js

Disconnect from tmux session

Hit Ctrl-B then D

To Exist tmux session

Hit Ctrl-D until the last window exists.

List tmux sessions

tmux list-sessions
tecbot: 1 windows (created Tue Sep 15 21:56:05 2020) [211x46]

Reconnect to session by name

tmux a -t tecbot

A Better Solution: pm2

Comming soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment