Server connection
Server connection available
INFO
An available server is a server that is not automatically initialized via the API
WARNING
- Make sure you are using or creating a new Ubuntu server (20.04, 22.04 LTS 64bit)
- FlashPanel may not work on pre-installed servers.
TIP
For existing servers that are not usually updated, running the update command below before making a connection will avoid crashes during installation.
apt update
apt upgrade -y
Go to page create server
Click to select Custom Server
Enter Server Name: is the server name
Enter the server's v4 IP
Select the authentication type as Password or SSH Key
WARNING
FlashPanel only uses this information during the first installation, does not store it anywhere!
- If Password: enter SSH Password of
root
account - If SSH Key: Select private key file and fill in passphrase (if any)
If the OpenSSH type private key file has the passphrase FlashPanel and cannot be read, please remove the passphrase from the key with the command:bashssh-keygen -p -f path_to_private_key
- If Password: enter SSH Password of
Select the applications to install initially
Click add server.
Connect to server via API
WARNING
If the server provider's API Key
has not been registered, the connection cannot be made. Registration instructions here
- Go to page create server
- Select the providers that `FlashPanel supports
- Select login information
- Select Region, select Package
- Enter the server name
- Select pre-installed applications
- Click connect new server
Common problems
Root account login disabled (OVH)
Some server providers disable the root user by default (such as OVH), instead there is a user account such as ubuntu
that can be promoted to root
To allow root
login, do the following
SSH Login to the account your server provider created for you, for example
ubuntu
Then copy the command below and paste it into the terminal
bashif [ "$EUID" -ne 0 ]; then sudo su fi # Find the line in the file that contains "PermitRootLogin" line1=$(grep -n -m 1 "^#*\s*PermitRootLogin" /etc/ssh/sshd_config | cut -d: -f1) # Replace the line with "PermitRootLogin yes" sed -i "${line1}s/.*/PermitRootLogin yes/" /etc/ssh/sshd_config # Find the line in the file that contains "PasswordAuthentication" line2=$(grep -n -m 1 "^#*\s*PasswordAuthentication" /etc/ssh/sshd_config | cut -d: -f1) # Replace the line with "PasswordAuthentication yes" sed -i "${line2}s/.*/PasswordAuthentication yes/" /etc/ssh/sshd_config # Restart the ssh service to apply the changes systemctl restart ssh # Set the password for the root user sudo passwd root
Return to FlashPanel and proceed to connect as instructed above.
Please login as the user "ubuntu" rather than the user "root" (AWS)
With AWS servers, logging in with the root
account will result in a message like this and the connection will be lost. Please log in to your ubuntu
account and execute the following command
sudo su
sed -i -e 's/.*exit 142" \(.*$\)/\1/' /root/.ssh/authorized_keys