Running your own vestacp instance

Discussion in 'Tutorials and Guides' started by wlanboy, Dec 17, 2013.

Tags:
  1. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    VestaCP is a free and open source contol panel.

    I am running two instances for about three months and have to admit that I do like it more than zpanel.

    The basic configuration is solid and the integration of:

    • Nginx
    • SSL
    • SPF and DKIM
    • AntiSpam / Antivirus
    • Backups
    is really well done.

    Installation is done by following two commands:


    curl -O http://vestacp.com/pub/vst-install.sh
    sudo bash vst-install.sh

    Enter a valid email address where the login information is sent to.

    The welcome email looks like this:


    Congratulations, you have just successfully installed the Vesta Control Panel

    You can login in Vesta with following credentials:
    username: admin
    password: ***************
    https://ip-address:8083

    We hope that you enjoy your installation of Vesta. Please feel free to contact us anytime if you have any questions.
    Thank you.

    --
    Sincerely yours
    vestacp.com team

    Things I changed:

    1. Add SSL support for mail server:


    nano nano /etc/exim4/exim4.conf.template

    Uncomment following lines:


    # tls_advertise_hosts = *
    # tls_certificate = /usr/local/vesta/ssl/certificate.crt
    # tls_privatekey = /usr/local/vesta/ssl/certificate.key

    You should replace the generated certs with your own.

    The SSL certs for web can be entered through the web frontend.

    2. Add secondary DNS servers

    The dns zone files are located at:


    /home/[user]/conf/dns/[domainname].db

    If you look to the bind config:


    cat /etc/bind/named.conf

    Content:


    // This is the primary configuration file for the BIND DNS server named.
    //
    // Please read /usr/share/doc/bind9/README.Debian.gz for information on the
    // structure of BIND configuration files in Debian, *BEFORE* you customize
    // this configuration file.
    //
    // If you are just adding zones, please do that in /etc/bind/named.conf.local

    include "/etc/bind/named.conf.options";
    include "/etc/bind/named.conf.local";
    include "/etc/bind/named.conf.default-zones";

    zone "domain.com" {type master; file "/home/admin/conf/dns/domain.com.db";};


    The zone files themselfs are allready defined as master!

    So we only have to definde the options:


    nano /etc/bind/named.conf.options

    And add:


    options {
    allow-transfer { [ip-address of slave]; };
    notify yes;
    };

    On the secondary dns servers we just have to add the zones to the named.conf:


    nano /etc/bind/named.conf

    Add:


    zone "domain.com" {
    type slave;
    masters { [ip of vestacp server]; };
    file "domain.com.db";
    };

    Done.

    As I said - everything prepared and well performed.

    Really enjoying my VerstaCP time.
     
  2. nunim

    nunim VPS Junkie

    485
    157
    May 15, 2013
    How?  Editing default domain?  I haven't figured out how to do this yet for the CP only domains, been too lazy to install my cert through SSH.

    Very happy with VestaCP so far, it's been 3x WordPress sites and some random others for me for the last 2 months and it's been working great.  Their UI could use a little bit of polish but they seem to be actively improving things and I've read support for nginx+php-fpm  only is not far off.
     
    Last edited by a moderator: Dec 17, 2013
  3. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    Quite simple.

    Select "web" -> "edit" domain and klick on the "SSL" checkbox.

    That will popup the SSL boxes:

    vestadomainssl.jpg
     
  4. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,717
    May 13, 2013
    You! Rock!

    VestaCP is quite slick.

    (bows to you)
     
  5. jarland

    jarland The ocean is digital

    873
    562
    Apr 4, 2013
    If you want SSL for the panel itself, you want /usr/local/vesta/nginx/conf/nginx.conf
     
  6. nunim

    nunim VPS Junkie

    485
    157
    May 15, 2013
    Ah, I figured as much.  I got confused when he said certs for the web, I assumed he meant the panel itself. At least my default domain has SSL now :)   I'll get around to it eventually, just haven't had much of a need as I'm the only one who sees the panel. 
     
  7. peterw

    peterw New Member

    800
    189
    Jun 14, 2013
    Thank you for the dns steps. Great panel.
     
  8. Joodle

    Joodle Member

    37
    0
    May 26, 2013
    Seems like a nice panel. Will try this out as soon as I have a new VPS xd.

    Sent from my Samsung Galaxy S4 Mini LTE using Tapatalk
     
  9. Shados

    Shados Professional Snake Miner

    213
    47
    May 15, 2013
    Really hoping you were using dummy values or a random self-signed cert there...
     
  10. rsk

    rsk Active Member Verified Provider

    173
    27
    May 18, 2013
    Does vesta offer API?
     
  11. nunim

    nunim VPS Junkie

    485
    157
    May 15, 2013
  12. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    Yup - just a dummy .ml domain with a self signed cert.
     
  13. Nikolai

    Nikolai New Member

    1
    0
    Dec 26, 2013
    Using & studing it on CentOs 6.5. Simple and clear so far. Developement for developers.
     
  14. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
  15. nehafarzana80

    nehafarzana80 New Member

    2
    0
    Jul 24, 2013
    @wlanboy

    Thanks for the nice tutorial. I have configured two DNS servers as ns1.mydomain.com, ns2.mydomain.com to other 2 VPSs. I want to use mydomain2.com to use ns1-ns2.mydomain.com too. But, each time I need to change DNS settings to slave servers  ie; [ zone "domain.com" {

    type slave;
    masters { [ip of vestacp server]; };
    file "domain.com.db";
    };

    Is there any option to automate this process? I mean when I will add an addon domain, slave servers will sync the zone info automatically?

    Thanks for your help.
     
  16. ndelaespada

    ndelaespada Member Verified Provider

    82
    8
    Aug 29, 2013
    great howto.. thanks for sharing
     
  17. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    Not an easy one.

    You can create a dns-cluster using "/usr/local/vesta/bin/v-add-remote-dns-host".

    First you have to create a new user "dns-cluster" to all instances.

    Afterwards you have to add the dns hosts on the master:


    [email protected]:/usr/local/vesta/bin# ./v-add-remote-dns-host
    Error: not enought arguments
    Usage: v-add-remote-dns-host HOST PORT USER PASSWORD [TYPE] [DNS_USER]

    So e.g.:
    ./v-add-remote-dns-host ns1.wlanboy.com 8083 admin password
    This of course includes that all servers are running VestaCP...

    I am using small 64 MB vps for dns slaves - so no chance to install Vesta CP on them.
     
  18. jarland

    jarland The ocean is digital

    873
    562
    Apr 4, 2013
    New challenge: To strip Vesta to bare essentials for DNS clustering, in a way that Vesta reads as a slave without problem.
     
  19. wlanboy

    wlanboy Content Contributer

    2,126
    1,169
    May 16, 2013
    Would be a nice to have - but all the jobs/crons/auth is based on the database.

    So php + Mysql + DNS on 64 MB RAM. Tough goal.
     
  20. Reece-DM

    Reece-DM New Member Verified Provider

    400
    58
    May 16, 2013
    I will have to say I've been using this for a few weeks myself on various projects, its a nice bit of kit!