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.

  1. 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.
  2. Run the command ssh root@ followed by the server IP address. Certain providers may instruct you to replace root with something like ubuntu.
  3. 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.

  1. Type nano <file name> to open the file editor in your terminal.
  2. Use your arrow keys to move your cursor and scroll. Additionally, Ctrl+W can be used to search for text in the document.
  3. Make your desired changes to the file.
  4. Press Ctrl+X, then y, and then enter/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.

Previous
Join our Discord