Server Cookbook
Servers

Server Cookbook

  • 2023-01-22 11:42:19

Restart PHP-FPM

When configuring your server, FlashVPS configures FPM so that it can be restarted without using the server's 'sudo' password. To do so, you should use the following command. Of course, you should adjust the PHP version to match the version of PHP installed on your machine:

echo "" | sudo -S service php8.1-fpm reload

Reset sudo password

FlashVPS does not store your server's sudo password and therefore cannot reset it for you. To reset your password, you need to contact your server provider or use the sudo password reset facilities on your server provider's dashboard.

Once the password has been reset, FlashVPS will not be able to SSH into your machine as root. This prevents you from editing the PHP/Nginx configuration files from the FlashVPS UI and will also prevent various FlashVPS functions from working properly. Before FlashVPS can access your server, you will need to SSH into your FlashVPS server under the username flashvpsand reset your user password root:

Upgrade Node.js

FlashVPS allows you to choose a NodeJS installation session when a new server is installed. However, as your server ages, you may want to upgrade your Node.js version:

sudo apt-get install --only-upgrade nodejs

DigitalOcean Droplet Limit Exceeded

This error is returned by DigitalOcean when you have reached the limit on the number of droplets you can create. You can ask DigitalOcean to increase your droplet limit by contacting their support. Once they have increased your limit you can create a server in FlashVPS

Server disconnected

There are a number of reasons why your server might be in a 'disconnected' state. We encourage you to check out these popular solutions before contacting support:

  • Verify that the server is enabled through your server provider's control panel. If the server is powered down, you should restart it using your provider's control panel.
  • Verify that the public key generated by FlashVPS for the server is included in the files /root/.ssh/authorized_keysand /home/flashvps/.ssh/authorized_keys. This key is available through the 'Settings' tab of the FlashVPS management panel on your server.
  • If your server is behind a firewall, make sure you allow FlashVPS IP addresses to access the server .
  • If you removed Port 22 from your server's firewall rules, you'll need to contact your server provider and ask them to reinstate the rule. Removing this rule prevents FlashVPS from accessing your server over SSH.
  • Remove any private keys or other lines that do not contain a valid public key from the files /root/.ssh/authorized_keysand /home/FlashVPS/.ssh/authorized_keys.

If you are still having connection problems, you should also verify that the permissions and ownership of the following folders and files are correct:

 
# Fixes the "root" user (run as root)

chown root:root /root
chown -R root:root /root/.ssh
chmod 700 /root/.ssh
chmod 600 /root/.ssh/authorized_keys

# Fixes the "flashvps" user

chown flashvps:flashvps /home/flashvps
chown -R flashvps:flashvps /home/flashvps/.ssh
chmod 700 /home/flashvps/.ssh
chmod 600 /home/flashvps/.ssh/authorized_keys

If after trying all the above solutions, FlashVPS still cannot connect to your server but you can still SSH into the server, please run the following command as root user and share the result with FlashVPS support:

grep 'sshd' /var/log/auth.log | tail -n 10

! FlashVPS Management
If FlashVPS cannot connect to your server, you will not be able to manage it through the FlashVPS control panel until the connection is restored.

Author FlashVPS Admin
FlashVPS Admin
Joined in 3 years ago