Hello World
Linux Guides
Setting up Qbot on a virtual private server (VPS) takes some prior knowledge about how to navigate and access Linux servers without a GUI.
This page is reference material for later pages of this documentation and does not contain any steps you need to follow unless you were linked here from elsewhere.
How to login
Once you have the IP address of your VPS, you can use the ssh
command on your computer to access the terminal of your cloud server/VPS remotely.
- Open the terminal on your computer. On Mac, you can do this by searching for the Terminal application. On Windows, press Windows + R and enter
cmd
. - Run the command
ssh root@
followed by the server IP address. Certain providers may instruct you to replaceroot
with something likeubuntu
. - If prompted, enter the server's password or the passphrase to your SSH key.
It is normal for it to look like you are not typing anything when entering a password in your terminal.
How to navigate directories
By default, you will likely be in the ~
directory when you open a terminal or SSH. This represents the home directory. On your computer, this may be the directory above folders like Documents or Downloads.
The following commands will help you navigate from here:
ls
shows you what is in your current directory.cd <folder>
brings you into a folder.cd ..
goes down a directory (exits your current folder).
When working with Qbot, you will likely need to run cd qbot
every time you login to your server so you are in the directory of the bot's code.
How to edit a file
The easiest way to edit files from a terminal is the nano
text editor. This should be installed automatically on most Linux distributions.
- Type
nano <file name>
to open the file editor in your terminal. - Use your arrow keys to move your cursor and scroll. Additionally,
Ctrl+W
can be used to search for text in the document. - Make your desired changes to the file.
- Press
Ctrl+X
, theny
, and thenenter
/return
to save the file.
How to view PM2 Logs
You can run pm2 logs
to see a history of output by your PM2 applications running in the background. Additionally, you can use pm2 monit
to view your bot's console logs live.