Skip to content

Dockerized Vesta Control Panel aka vestacp. Base container

License

Notifications You must be signed in to change notification settings

modos189/docker-vestacp-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VestaCP

Vesta control panel with docker. Based on niiknow/vestacp (1.9.0).

What's different from niiknow/vestacp?

Removed golang, couchdb, redis, openvpn, mongodb, nodejs and dotnet.

Comparison of size with niiknow/vestacp:

image compressed uncompressed
niiknow/vestacp 1.69 GB 4.87GB
modos189/vestacp-base 933.84 MB 2.66GB

What's included?

  • ubuntu 16.04 lts + Vesta 0.9.8-25
  • nginx (proxy) -> apache2 -> php-fcgi - high performance and flexible implementation
  • ssh/sftp, letsencrypt, memcached, MariaDB 10.2
  • folder redirection for data persistence and automatic daily backup provided by VestaCP
  • DNS, named, dovecot/roundcube, spamassassin, clamav, etc... -- disabled by default
  • vesta panel SSL (LE-issued) for mail and control panel - provide $HOSTNAME environment variable
  • added ability to also run php-fpm

Run this image:

mkdir -p /opt/vestacp/{vesta,home,backup}

docker run -d --restart=always \
-p 3322:22 -p 80:80 -p 443:443 -p 9088:8083 \
-v /opt/vestacp/vesta:/vesta -v /opt/vestacp/home:/home -v /opt/vestacp/backup:/backup \
modos189/vestacp-base

Volumes

/vesta -- configurations

/home -- users data

/backup -- users backup

Authorization

Login: admin

To get the password, run

sudo docker exec $CONTAINER_ID cat /vesta-start/root/password.txt

Alternatively, you can change the password with:

sudo docker exec $CONTAINER_ID /usr/local/vesta/bin/v-change-user-password admin YOURNEWPASSWORD

SSH for FTP

FTP was not installed on purpose because it's not secure. Use SFTP instead on the 3322 port. Disable ssh if you don't really need it and use the Vesta FileManager plugin. Also, make sure you change the user shell in the Vesta panel in order to use ssh.

How to running VestaCP-docker behind a Caddy Reverse Proxy with Free SSL

First, download Caddy

curl https://getcaddy.com | bash -s personal

Now Caddy is installed, but you still need a service to run Caddy http server on the background.

You can find services backed by the community here

You must have at least the port 443 opened so the Caddy server will request an SSL certificate from Let's Encrypt

You can also open the port 80 to redirect http requests to https.

Open /etc/caddy/Caddyfile

Insert

your_domain.com {
        proxy / 127.0.0.1:8080 {
                header_upstream X-Forwarded-Proto {scheme}
                header_upstream X-Forwarded-For {host}
                header_upstream Host {host}
                websocket
        }
}

Your site is now proxied to vestcp-docker and automatically received a ssl certificate. But so far no access to the vesta control panel. Let's fix this.

Open nano /opt/vestacp/vesta/local/vesta/nginx/conf/nginx.conf and change ssl on; to ssl off;

Then restart vesta:

docker exec $CONTAINER_ID service vesta restart

Open /etc/caddy/Caddyfile again

Insert

panel.your_domain.com {
        proxy / 127.0.0.1:9088 {
                header_upstream X-Forwarded-Proto {scheme}
                header_upstream X-Forwarded-For {host}
                header_upstream Host {host}
                header_upstream X-Forwarded-Port 8083
                websocket
        }
}

MIT