Beginner

Slik installerer du Sentora på en VPS

Picture of Richard Sutherland
Richard Sutherland

Introduction

Sentora is a free web hosting control panel, a browser-based tool for running websites, email, and DNS on your own server. It’s open source, and it began as a continuation of ZPanel, an older panel of the same kind. An administrator runs the server, and each client gets a login to look after their own sites within the limits of a hosting package.

Sentora’s current stable release only installs on operating systems that are past their standard support, so the only route onto a current Ubuntu is Sentora 3.0, which remains in beta. We’ll install the beta on a VPS we can wipe, we’ll give one client a website, and get that site onto HTTPS.

What You’ll Need

  • A VPS with 2 GB of RAM or more. Sentora’s requirements page lists Ubuntu 24 and 26 and Debian 12 and 13 for the beta, and recommends 4 GB. This guide uses Sentora 3.0 beta on Ubuntu 24.04 LTS, running on a GP34 from STW’s VPS range.
  • Root over SSH. You’ll type each command as root. The GP3 documentation explains adding an SSH key, and also opening the browser console as an alternative.
  • Two spare subdomains in a zone you manage. We use sentora.example.com to reach the control panel and site.example.com as the website.

Sentora sets up mail and DNS software whether you use them or not. We leave both idle, keep the domain’s DNS where it already is, and suggest a hosted mailbox such as STWmail, for the reasons in our guide to choosing a VPS control panel.

Step 1 — Rebuild the VPS and Publish Its Names

Sentora’s installer assumes an empty machine, so move anything you’d miss, files and databases alike, off the server and reinstall the operating system. To do this in the STW control panel, open Products, select the VPS, and choose Manage → Reinstallation. That wipes the disk and deletes the VPS’s existing snapshots.

When the rebuilt server boots, connect as root, then apply any waiting updates with the following command. The last line installs curl, which is used to fetch the installer.

apt update
apt -y upgrade
apt -y install curl ca-certificates

Point both names at the server

Partway through, the installer fetches the panel’s own certificate from Let’s Encrypt, which means sentora.example.com must already lead here when you run it. The certificate is how a browser knows it has reached your machine, and it lets the browser encrypt the connection.

Each subdomain needs an A record carrying the server’s public IPv4 address. Under DNS in the STW control panel, pick the domain, use New record → Add as draft once per name, then publish the pair. If subdomain records are unfamiliar, see how A records and subdomains work.

Type Name Value TTL
A sentora Your VPS’s IPv4 address 300
A site Your VPS’s IPv4 address 300

Published A records for the Sentora control panel and test website in STW's DNS editor.

Then check what the rest of the internet sees by querying Google’s resolver from your own computer.

nslookup sentora.example.com 8.8.8.8
nslookup site.example.com 8.8.8.8

You’re looking for your server’s address in each reply. An older one means a cached copy hasn’t expired, as our DNS propagation tutorial explains.

With dig on Linux or macOS, run dig +short sentora.example.com @8.8.8.8 and dig +short site.example.com @8.8.8.8.

Step 2 — Name the Server and Save a Restore Point

Every Linux machine has a hostname, the name it uses for itself. Sentora treats the full form, called the FQDN (fully qualified domain name), as the panel’s address, so give the server the control panel’s subdomain.

hostnamectl set-hostname sentora.example.com
printf 'preserve_hostname: true\n' > /etc/cloud/cloud.cfg.d/99-preserve-hostname.cfg

Without the printf line, cloud-init, which sets up cloud servers during boot, would potentially put the provider’s default name back after a restart.

/etc/hosts needs the new name too. Linux consults this short file ahead of DNS, and the 127.0.1.1 entry is what points the hostname back at this machine. Edit that entry so it reads as follows.

127.0.1.1 sentora.example.com sentora

Copy the identical entry into /etc/cloud/templates/hosts.debian.tmpl, or a reboot restores the old one. Reboot, reconnect, and hostname -f should now answer sentora.example.com.

Take the snapshot

Go to Snapshots → Take Snapshot, call it something like before-sentora-install, and make sure Include RAM is off.

STW's snapshot form saving the prepared server before the Sentora beta installer runs.

Step 3 — Run the Beta Installer

Sentora 3.0 installs through a bootstrap script.

curl -fsSLo sentora-bootstrap.sh https://beta.sentora.org/bootstrap.sh
bash ./sentora-bootstrap.sh \
  --panel-domain sentora.example.com \
  --public-ip 203.0.113.10

Swap in your panel hostname and your server’s IPv4 address. The bootstrap downloads the release archives and checks each one’s SHA-256 checksum, a fingerprint calculated from a file’s contents that changes if even one byte differs.

It then hands over to Ansible, an automation tool that works through a long list of setup tasks, from installing Apache, PHP, and MySQL to configuring Sentora itself. Installation typically takes about six minutes and ends with Ansible’s recap, where failed=0 means no task failed.

The installer saves the logins it generated in a credentials file. When you run it as root, that file is in /root/.config/sentora/.

stat -c '%a %U:%G %n' /root/.config/sentora/sentora-install-credentials.txt
cat /root/.config/sentora/sentora-install-credentials.txt

stat shows the file’s permissions, which should read 600, meaning only root can read or change it. cat prints the file, including the database administrator’s password in plain text, so copy the details somewhere private and clear your terminal afterwards.

Visit https://sentora.example.com/ and use the file’s admin_user and admin_password. The page should load over trusted HTTPS straight away, with plain http:// requests redirected, because the installer has already fetched the panel’s certificate.

Sentora's login form with its language selector, username, and password fields.

Step 4 — Tighten the Administrator Account

Before anyone else gets a login, tidy up the account you’re using. Under Account → Account Info, add an email address you check, so password recovery reaches you. Then use Account → Change Password to replace the generated password. Sentora signs you out when you save it, so log back in with the new one.

Step 5 — Create a Package and a Website Owner

Sentora controls each client in two ways. The package sets how much they can have, such as domains, databases, and disk space, while the group you’ve just looked at sets which tools they can open. You’ll choose both when you create the owner.

Open Reseller → Package manager and create a package, here called web-demo. Tick PHP enabled if the site will run PHP. These limits suit one small site.

Setting Example value
Domains / subdomains 1 / 5
Parked domains 0
SFTP accounts / MySQL databases 1 / 1
Mailboxes / forwarders / distribution lists 0 / 0 / 0
Disk space quota 5120 MB
Monthly bandwidth quota 102400 MB

A PHP hosting package with bounded website resources and no mailbox allowance.

Save the package, then open Reseller → Manage Clients. Enter a username and password (Generate password creates a strong one), choose the Users group, and select your package. Add a name and an email address. Leave Send welcome email unticked.

Creating a separate website owner in the Users group with the web-demo package and welcome email disabled.

Open a private browser window and sign in as the new owner. You should see the website, mail, and database tools, but no Server or Reseller menu. Use this account for the site and save the administrator login for running the server.

Step 6 — Add the Website

As the owner, go to Web Hosting → Domains. Under Add domain or subdomain, leave Purpose on Create a website, enter site.example.com, keep Create a new home directory, and choose Create.

Adding the test website under its separate owner's account, with a new home directory.

The site first shows as PENDING. Sentora saves your request to its database, and a background job it calls the daemon later writes the Apache configuration and reloads the web server. If you’ve read our Froxlor installation guide, it’s the same save-now, apply-later pattern. By default, cron, Linux’s task scheduler, runs the daemon every five minutes.

If you just can’t wait, you can run it yourself as root to apply the change straight away.

php /opt/sentora/panel/bin/daemon.php

When the site shows LIVE, open http://site.example.com/ and Sentora’s placeholder page should appear. The domain’s Hosting settings page shows its Document root, the folder Apache serves the site’s files from.

Step 7 — Get a Certificate for the Website

The website needs its own certificate before it can use HTTPS. Let’s Encrypt normally checks that you control a name by fetching a small file from the website, but in this beta that check fails for websites, so use the DNS check instead. You publish a short-lived TXT record, a DNS entry that holds a piece of text, and Let’s Encrypt looks it up.

As the owner, open Web Hosting → TLS Certificates and choose Add certificate → Let’s Encrypt certificate. Pick the website under Domain, set Validation method to DNS challenge, and enter a contact email for expiry notices. Under DNS provider, choose External DNS, since your DNS lives with your provider rather than in Sentora, then click Request certificate.

Requesting the website certificate with DNS challenge and External DNS selected in Sentora.

Sentora then shows the TXT record’s name and value under DNS challenge, each with a Copy button. It gives the full name, _acme-challenge.site.example.com, but most DNS editors, STW’s included, want only the part before your domain, which is _acme-challenge.site. Paste the value exactly as shown and publish the record.

The temporary Let's Encrypt TXT proof published in STW's DNS editor.

Check that the record is public before going back to Sentora.

nslookup -type=TXT _acme-challenge.site.example.com 8.8.8.8

On Linux or macOS, run dig +short TXT _acme-challenge.site.example.com @8.8.8.8. If nothing comes back, give it a few minutes, because a resolver that looked before you published can remember the empty answer for a while. Starting a new request in Sentora creates a new value, so the record must match the request you’re verifying.

Then choose Verify DNS and issue. Once the certificate is issued, delete the TXT record and publish the change, since it was only needed for this one check.

Step 8 — Send Visitors to HTTPS

With the certificate in place, go back to Web Hosting → Domains and open the site’s Hosting settings. Set Visitor delivery to Direct HTTPS, which means visitors connect straight to this server, not through a proxy service, and HTTP requests are redirected to HTTPS. Choose Save web settings, then wait for the daemon or run it yourself as before.

The website's hosting settings selecting Direct HTTPS after its certificate has been issued.

From your own computer, follow the redirect with curl.

curl -IL http://site.example.com/

With -I, curl asks for headers alone, and -L makes it chase each redirect, so every hop prints. Expect a 302 whose Location header points to https://site.example.com/, and finally 200 once curl reaches the HTTPS page. Curl won’t accept a certificate it can’t verify, so that last 200 vouches for the certificate too. If curl gives up after too many redirects, the site is bouncing visitors back to itself.

In a browser, https://site.example.com/ should now show Your hosting space is ready… without any certificate warning.

Sentora's unchanged default website served over trusted HTTPS, with the complete website address visible in Chrome.

That placeholder is just an index.html file, and its own to-do list points the way. Create a file-transfer login under Web Hosting → SFTP Accounts, separate from the owner’s panel login, then upload your site to replace index.html.

Once the site is how you want it, snapshot the server again. Sentora’s Backups module can also archive an account, but those archives aren’t encrypted, so download them to somewhere private.

Optional Security Measures

Sentora switches on more protection by itself than most control panels, and the installer normally starts Fail2ban for you. The site works without the steps below, but before the server holds anything you care about, check what’s covered and shut off the services you aren’t using.

See what Fail2ban covers (optional)

Fail2ban reads login logs and temporarily blocks an address after repeated failed sign-ins. Open Server → Fail2ban configuration. After a standard install, Overview should show the service Online, protection Enabled, and the configuration Applied. It lists seven jails, Fail2ban’s name for each login it watches, covering the Sentora panel, webmail, phpMyAdmin, SSH, and the mail services.

Fail2ban showing active, applied protection for Sentora login and the server's other authentication services.

Close the ports you don’t use (optional)

The mail and DNS servers Sentora installed are running and accepting connections, even with nothing set up in them. A firewall keeps outsiders from reaching them, whether that’s your provider’s firewall or UFW (Uncomplicated Firewall) on the server. These UFW rules let in SSH and web traffic and refuse other incoming connections.

ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw --force enable
ufw status

Port 22 carries SSH and SFTP, and ports 80 and 443 carry HTTP and HTTPS. Port 80 stays open because visitors who type http:// arrive there first and the panel’s certificate relies on Let’s Encrypt’s HTTP check. If SSH runs on another port, allow that port before enabling UFW, or your session drops and the console becomes your only way in.

A green light in Service Status only means a port answers locally. Sentora can show SMTP and DNS as running even while the firewall blocks them from outside.

Conclusion

Sentora gives you a classic shared-hosting setup on your own VPS, with a separate login for each client and packages that cap what each one can use. Your server now runs the Sentora 3.0 beta with trusted HTTPS on the control panel, a secured administrator account, and one client whose website loads over HTTPS.

Because 3.0 is still a beta, keep this installation for testing and follow the project’s progress on Sentora’s download page. The upkeep that comes next is the same whichever control panel you settle on, and our guide to securing, updating, and backing up a VPS control panel takes you through it.

Next steps:

Suksess!

Hvis du syntes denne veiledningen var nyttig, kan du gjerne like den og dele den med andre i fellesskapet.

Skroll til toppen

Del

Del denne lenken via

Eller kopier lenken

https://stw.no/no/kunnskapssenter/kontrollpaneler-for-webhosting-pa-vps/installer-sentora-pa-en-vps/Kopiert!

Gi oss en tilbakemelding