{"id":2924,"date":"2018-06-06T07:00:44","date_gmt":"2018-06-06T07:00:44","guid":{"rendered":"https:\/\/blog.ssdnodes.com\/blog\/?p=2029"},"modified":"2025-05-18T12:17:16","modified_gmt":"2025-05-18T12:17:16","slug":"tutorial-vestacp-ubuntu","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/tutorial-vestacp-ubuntu\/","title":{"rendered":"How to install VestaCP (cPanel alternative) on your server"},"content":{"rendered":"<p>VestaCP is another open source hosting control panel that provides a set of features to manage domains, DNS, mail, databases, cron jobs, backups and much more. Compared with other control panels, it\u2019s a very lightweight web hosting control panel that runs smoothly even with very low system specifications.<\/p>\n<p>In this article, We will look at how to install VestaCP and configure its various services in Ubuntu 16.04.<\/p>\n<h2><a id=\"Prerequisites_6\"><\/a>Prerequisites<\/h2>\n<ul>\n<li>You will require a fresh Ubuntu 16.04 machine with at least 1 GB of RAM.<\/li>\n<li>A valid DNS name pointing its A record to the IP address of your Ubuntu machine.<\/li>\n<\/ul>\n<div class=\"cta-inline\"><\/div>\n<h2><a id=\"Step_1_Configure_FQDN_of_the_host_11\"><\/a>Step 1. Configure FQDN of the host<\/h2>\n<p>To change the hostname of your system, use the <code>hostnamectl<\/code> command. <code>hostnamectl<\/code> will directly update the kernel about the change in the hostname, and you don\u2019t need to reboot the machine afterward.<\/p>\n<pre><code>$ sudo hostnamectl set-hostname dwijadasdey\n<\/code><\/pre>\n<p>Next, edit the file <code>\/etc\/hosts<\/code> and add the following line at the end. The format is <code>IP_ADDRESS HOSTNAME.TLD HOSTNAME<\/code>. This is an example using a domain of mine and a fake IP.<\/p>\n<pre><code>$ sudo vi \/etc\/hosts\n123.456.78.9 dwijadasdey.tk dwijadasdey\n<\/code><\/pre>\n<p>Run the command below to restart the network manager and apply these changes:<\/p>\n<pre><code>$ sudo systemctl restart networking\n<\/code><\/pre>\n<p>Check the hostname and FQDN of the host:<\/p>\n<pre><code>$ hostname\ndwijadasdey\n$ hostname -f\ndwijadasdey.tk\n<\/code><\/pre>\n<p>Now that your FQDN has been set let\u2019s proceed toward the process of installing VestaCP in detail.<\/p>\n<h2><a id=\"Step_2_Install_VestaCP_43\"><\/a>Step 2. Install VestaCP<\/h2>\n<h3><a id=\"Update_the_system_45\"><\/a>Update the system<\/h3>\n<p>Make sure all the packages in the system are up-to-date by issuing the following commands in the terminal:<\/p>\n<pre><code>$ sudo apt-get update\n$ sudo apt-get upgrade\n<\/code><\/pre>\n<h3><a id=\"Download_the_VestaCP_install_script_54\"><\/a>Download the VestaCP install script<\/h3>\n<p>Next, download the Vesta Control panel install script with the following command and make it executable:<\/p>\n<pre><code>$ curl -O http:\/\/vestacp.com\/pub\/vst-install.sh\n$ sudo chmod u+x vst-install.sh\n<\/code><\/pre>\n<h3><a id=\"Generate_the_install_command_63\"><\/a>Generate the install command<\/h3>\n<p>VestaCP provides an intuitive way to generate the install command. Visit <a href=\"http:\/\/vestacp.com\/install\/\" target=\"_blank\" rel=\"noopener\"><a href=\"http:\/\/vestacp.com\/install\/\" target=\"_blank\" rel=\"noopener\">http:\/\/vestacp.com\/install\/<\/a><\/a>, scroll down the page a little bit, and find the <em>Advanced Install Settings<\/em> section.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"VestaCP Advance settings\" src=\"https:\/\/lh3.googleusercontent.com\/zS6fOf91pTQCSy4r13YjUsPoddLxpkgaRsGEW8AZ_QLwvbcxGgKeyWYecVljuNGmWCOWn3Cq_Qk4\" alt=\"enter image description here\" \/><\/p>\n<p>Now, judiciously choose the advanced install settings according to your requirements.<\/p>\n<ul>\n<li>For Web options, choose <code>nginx + apache<\/code> if you plan to use a reverse proxy at a later stage.<\/li>\n<li>Choose <code>named<\/code> in the DNS section if you want a DNS server, too. Otherwise, choose <code>No<\/code>.<\/li>\n<li>If you want an extra repository for packages, then select <code>Remi<\/code>.<\/li>\n<li>Type in the FQDN that we configured in Step 1.<\/li>\n<li>VestaCP does not provide a file system browser of its own, so choose either <code>vsftpd<\/code> or <code>proftpd<\/code> as a FTP server for easy file upload and download.<\/li>\n<li>Next is the firewall. You can choose whether to use <code>iptables<\/code> and <code>fail2ban<\/code>, <code>iptables<\/code> only, or no firewall at all. It is advisable to use at least one of the options for a secure system.<\/li>\n<li>If you are going to use VestaCP as Shared Web Hosting service then choose <code>File System Quota<\/code>, to <code>yes<\/code>. Otherwise, choose <code>no<\/code>.<\/li>\n<li>Provide your email.<\/li>\n<li>For the email server, choose <code>Exim + dovecot + SpamAssassin + ClamAV<\/code>. SpamAssassin will protect the email server from spam. ClamAV will mitigate virus activity in your server but the CPU load on the server will increase significantly.<\/li>\n<li>It is always better to choose Softaculous option to <code>yes<\/code>. This auto-installer will make your life easier by installing scripts in your server with a click.<\/li>\n<li>Choose a database from MySQL or PostgreSQL.<\/li>\n<li>Finally, choose a password.<\/li>\n<\/ul>\n<p>After selecting the options that suit you, click the <code>Generate Install Command<\/code> button. It will generate installation command for you like below:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"VestaCP install command\" src=\"https:\/\/lh3.googleusercontent.com\/cOFLrUx54c4eyAY7GS8nGW0oAURHXc7aQo-gVBTMCRZmKqQRRDja8I4i11-VsZz3yyCSetkpovIw\" alt=\"enter image description here\" \/><\/p>\n<h3><a id=\"Running_the_installation_command_88\"><\/a>Running the installation command<\/h3>\n<p>Finally, run the install command that you have generated above in the terminal.<\/p>\n<pre><code>$ bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi no --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --softaculous yes --mysql yes --postgresql no --hostname dwijadasdey.tk --email youremail.com --password Passw0rd!\n<\/code><\/pre>\n<p>VestaCP will show you the components it will install. Press \u2018Y\u2019 to continue.<\/p>\n<pre><code> _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|\n _|      _|  _|        _|            _|      _|    _|\n _|      _|  _|_|_|      _|_|        _|      _|_|_|_|\n   _|  _|    _|              _|      _|      _|    _|\n     _|      _|_|_|_|  _|_|_|        _|      _|    _|\n\n                                  Vesta Control Panel\n\nFollowing software will be installed on your system:\n   - Nginx Web Server\n   - Apache Web Server (as backend)\n   - Bind DNS Server\n   - Exim mail server + Antivirus Antispam\n   - Dovecot POP3\/IMAP Server\n   - MySQL Database Server\n   - Vsftpd FTP Server\n   - Softaculous Plugin\n   - Iptables Firewall + Fail2Ban\n\nWould you like to continue [y\/n]: y\n<\/code><\/pre>\n<p>Installation of the above components should take no more than 10 minutes. Once the installation completes successfully, VestaCP will provide you a link, username, and password to login to the panel. VestaCP will also send login details to the email address that you mentioned in the generation of install command earlier.<\/p>\n<pre><code>Congratulations, you have just successfully installed Vesta Control Panel\n\n    https:\/\/HOSTNAME.DOMAIN:8083\n    username: admin\n    password: Passw0rd!\n\nWe hope that you enjoy your installation of Vesta. Please feel free to contact us anytime if you have any questions.\nThank you.\n\n--\nSincerely yours\nvestacp.com team\n<\/code><\/pre>\n<h1><a id=\"Step_3_Configuring_VestaCP_139\"><\/a>Step 3. Configuring VestaCP<\/h1>\n<p>Now that you have successfully installed VestaCP in your Ubuntu 16 server, Login to the control panel using the URL <code><a href=\"https:\/\/HOSTNAME.DOMAIN:8083\" target=\"_blank\" rel=\"noopener\">https:\/\/HOSTNAME.DOMAIN:8083<\/a><\/code> and credentials provided by VestaCP at the end of the installation. The browser will warn you about the self-signed certificate\u2014you can safely add it to your exception list and proceed with logging to VestaCP.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"VestaCP Login\" src=\"https:\/\/lh3.googleusercontent.com\/DjgGDAvXQBXcohL5WKK6iIzyvpzECR1N7kpOu0SkIHNzVAh_kf7IELaZTo7UIZHLwrp-3FRAGtIH\" alt=\"enter image description here\" \/><\/p>\n<h3><a id=\"Changing_the_admin_password_145\"><\/a>Changing the admin password<\/h3>\n<p>Once logged in successfully, the first thing you want to do is change the admin password. Click the <code>admin<\/code> link at the top right corner of the dashboard. You can also change other settings through this page.<\/p>\n<h3><a id=\"Configuring_services_149\"><\/a>Configuring services<\/h3>\n<p>To view the services that are installed on the server, click the server link from the menu bar (extreme right). All the services will be listed, with the first one being the VestaCP server itself. Hover the mouse over it to restart or configure VestaCP. You can configure, stop, and restart the rest of the services after hovering the mouse over them.<\/p>\n<h3><a id=\"Configuring_the_firewall_153\"><\/a>Configuring the firewall<\/h3>\n<p>To configure the firewall, click the <code>firewall<\/code> link from the menu. All the firewall rules created during install time will be listed. You can edit, delete, or suspend them according to your requirements. To add new rules, click the green plus icon and then choose the action, protocol, and port to add it. You will see a confirmation that a new rule was added successfully.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"VestaCP firewall rule\" src=\"https:\/\/lh3.googleusercontent.com\/9tnVGa2wUepRWh4oOILPAl8_Ld5LaK8wc6OnabrTo_hFaTIj-ILUEMOTJJEpzC6HNvW05R9xeIZp\" alt=\"enter image description here\" \/><\/p>\n<h3><a id=\"Creating_and_adding_a_nameserver_159\"><\/a>Creating and adding a nameserver<\/h3>\n<p>Remember how we selected <code>named<\/code> as part of VestaCP installation in step 1? We chose that option because we want to create private child nameservers for our VestaCP installation. Nameservers are servers with specialized DNS software installed and are used to handle queries regarding the services running under a given domain name.<\/p>\n<p>By using child nameservers, you\u2019ll have more control over the services you start using VestaCP later on.<\/p>\n<p>First, you need to register your chosen domain name through any domain name registrar, if you haven\u2019t already. <a href=\"https:\/\/www.ssdnodes.com\">SSD Nodes<\/a> provides domain registration and domain management service at ease through an easy-to-use interface, but you can choose any registrar.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"Registering a domain through SSD Nodes\" src=\"https:\/\/lh3.googleusercontent.com\/U4HBDIw6MyGdpMHlCsOJ-jmd5fdgSIOaY7WFr_qsija4aEl6U7TL8DwjWFn8M9pvsYWHJZhtDftd\" alt=\"Registering a domain through SSD Nodes&amp;quot;\" \/><\/p>\n<p>Once you\u2019ve registered your domain, you need to manage your domain\u2019s DNS settings. More specifically, you need to change which nameservers the domain points to. Please refer to your domain registrar\u2019s documentation or help for more information on the specific procedure for their interface.<\/p>\n<p>No matter which domain registrar you choose, you must change the nameserver settings to point to your domain. Add two nameservers\u2014<code>NS1.DOMAIN.TLD<\/code> and <code>NS2.DOMAIN.TLD<\/code>, replacing <code>DOMAIN<\/code> and <code>TLD<\/code> with your own.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"Create your own nameserver\" src=\"https:\/\/lh3.googleusercontent.com\/VsW326PJFFLeG1rvIW-Qh70sxxNmgl7u0MaNeFYPGNEnpxS9EUDlSKkt3RH2bDPWzYaEpDhT2hdV\" alt=\"enter image description here\" \/><\/p>\n<p>As an example, in the image above, I registered the domain <code>dwijadasdey.tk<\/code> and added two nameservers <code>NS1.DWIJADASDEY.TK<\/code> and <code>NS2.DWIJADASDEY.TK<\/code>.<\/p>\n<p>Now, head back to your VestaCP installation. Click the <code>User<\/code> link, hover your mouse over <code>Admin\/System Administrator<\/code> and click <code>edit<\/code>. Scroll down to change the default nameservers to <code>NS1.DOMAIN.TLD<\/code> and <code>NS2.DOMAIN.TLD<\/code>, and then click <code>Save<\/code> to complete nameserver configuration. In my case, I changed the defaults to <code>NS1.DWIJADASDEY.TK<\/code> and <code>NS2.DWIJADASDEY.TK<\/code>.<\/p>\n<h3><a id=\"Adding_your_domain_179\"><\/a>Adding your domain<\/h3>\n<p>To add a new domain, click <code>Web<\/code> from the menu, followed by green plus symbol. Type in the domain name you want to use, plus any subdomains. In my case, I\u2019m using <code>vps.dwijadasdey.tk<\/code>.<\/p>\n<p>From the IP address drop-down, select the IP of your VPS. Under the advanced options, provide an alias of the domain (e.g. <code>www.vps.dwijadasdey.tk<\/code>), enable SSL support, and choose either <code>webalizer<\/code> or <code>awstats<\/code> for your web statistics. Under the SSL support option, enable Let\u2019s Encrypt if you aren\u2019t going to use a paid SSL certificated, which is an option available to you.<\/p>\n<p>You can now add your domain by clicking the <code>Add<\/code> button at the end of the page.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"Adding your domain in VestaCP\" src=\"https:\/\/lh3.googleusercontent.com\/kVARxO8zwk5KtYqlklQKAWCq0O7ApRle2oaaPb3W8P-cSuxvTzDxYEXWuVo1VGlMCtqIhsc4NOGZ\" alt=\"Adding your domain in VestaCP\" \/><\/p>\n<p>There will be a confirmation message that your domain was created successfully.<\/p>\n<p>Head over to DNS page and click the edit button over the domain you have just created. Change the template for the BIND9 option to <code>child-ns<\/code> and SOA to your nameserver (<code>NS1.DOMAIN.TLD<\/code>) and save it.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"Changing the nameserver defaults in VestaCP\" src=\"https:\/\/lh3.googleusercontent.com\/dAIowLW2K4ChJ2Vi6k_fJj6WBHwnEtrpE3wt_icJO_xLG8pbOfbwUl0dEqoQnkLBQqTGcGAEdgPv\" alt=\"Changing the nameserver defaults in VestaCP\" \/><\/p>\n<p>Open up your browser of choice and visit the domain you just created. I\u2019m visiting <code>vps.dwijadasdey.tk<\/code>. You\u2019ll be greeted by the VestaCP welcome page. Congratulations! You\u2019re all set up with VestaCP.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" title=\"The VestaCP welcome page\" src=\"https:\/\/lh3.googleusercontent.com\/YgbzCSotDAP6c4bWAuUxWd4ii7mx_DRRwMaDDTG52iMrrJ8cozQPi45fia_OpKQAYNlmpPDHMg6M\" alt=\"The VestaCP welcome page\" \/><\/p>\n<p>You might be interested in installing Softaculous on top of VestaCP so that you can have access to one-click installs for more than 400 apps and services. Check out the <a href=\"https:\/\/softaculous.com\/docs\/Installing_Softaculous_in_VestaCP\" target=\"_blank\" rel=\"noopener\">Softaculous documentation<\/a> for more information.<\/p>\n<p>Now\u2019s a good time to read the <a href=\"http:\/\/vestacp.com\/docs\/\" target=\"_blank\" rel=\"noopener\">VestaCP documentation<\/a> as well for more customization options. Enjoy the terminal-free experience!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Get one-click installs for more than 400 apps and services, plus a bunch more, with VestaCP and our tutorial on the installation process. Plus, it&#8217;s 100% free!<\/p>\n","protected":false},"author":20,"featured_media":2041,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[18,30],"tags":[246,269],"class_list":["post-2924","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials","tag-cpanel","tag-vestacp"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=2924"}],"version-history":[{"count":2,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2924\/revisions"}],"predecessor-version":[{"id":12974,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/2924\/revisions\/12974"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/2041"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=2924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=2924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=2924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}