Skip to content
Skip to Content

Connect a cloud server

Prepare a server at Hetzner, DigitalOcean, OVHcloud or Scaleway for OpenPanel, including one created with an SSH key and no password.

Any cloud provider works. The quickest way is One command: create the server, sign in to it with SSH as you normally do (an SSH key is fine), and run the install command the console shows. No password and no firewall rule are needed, since the agent only connects out.

This page covers the SSH setup, where OpenPanel signs in with a password and hardens the server. The server must run Ubuntu Server 22.04 or 24.04 LTS, and the parts that differ between providers are getting a password and opening the ports in the provider's firewall.

Before you start

  • A new server with Ubuntu 24.04 LTS (22.04 LTS works too), nothing else installed. See Requirements.
  • Its public IPv4 address, from the provider's control panel.
  • If the provider has a firewall in front of the server, it must let in TCP on the SSH port (usually 22) and TCP 20000 to 60000. The setup moves SSH to a random port in that range.

1. Create the server

In the Hetzner Cloud Console, create a server with the Ubuntu 24.04 image.

  • Without an SSH key, Hetzner emails you the root password. Use root and that password.
  • With an SSH key, you get no password. Set one as in Servers created with an SSH key.

If you attach a Firewall, add inbound rules for TCP on port 22 and TCP 20000–60000.

A password from an email

If the provider emailed you a password, sign in with it yourself once before you connect the server. Some providers make you choose a new password at the first sign-in, and OpenPanel's setup cannot answer that prompt.

Servers created with an SSH key

The connect form takes a password, not a key. A server created with only an SSH key has no usable password, and its SSH usually refuses passwords. Give it both, then connect it.

Sign in with your key

On your computer

Use your server's address, and ubuntu instead of root on OVHcloud.

Set a password

On the server
sudo passwd root

For a user that is not root, name that user instead, for example sudo passwd ubuntu.

Let SSH accept the password

On the server
printf '%s\n' 'PasswordAuthentication yes' 'PermitRootLogin yes' | sudo tee /etc/ssh/sshd_config.d/10-password-for-openpanel.conf
sudo sshd -t && sudo systemctl restart ssh

Leave out the PermitRootLogin yes line if you sign in as a user other than root.

SSH uses the first value it reads for each setting, in file-name order. The name 10-… comes before 50-cloud-init.conf, which turns passwords off on key-only cloud images, and after OpenPanel's own 00-openpanel.conf. Once the setup has run, OpenPanel's file wins and SSH takes only OpenPanel's key again.

Check that the password works

On your computer
ssh -o PubkeyAuthentication=no [email protected]

SSH should ask for the password and let you in. If it does, sign out and connect the server.

2. Connect it

In Servers, choose Add server → Connect over SSH, and enter the server's public IP address, SSH port 22, the username and the password. Then confirm. The full flow is in Connect your own server.

After the setup

  • SSH moves to a new port and accepts only OpenPanel's key. Your own SSH key and the password stop working over SSH.
  • The provider's web console still works: sign in there as root with the Console access password from the server's page.
  • Your provider's firewall can be narrowed to the one SSH port shown on the server's Overview. The port 22 rule is no longer needed: the server's own firewall closes port 22 after the setup.

See What OpenPanel changes on your server.