Your home connected. With Docker. www.supla.org
- Install Docker CE 17.09+, docker-compose 1.25+ and Git.
- Clone this repository.
git clone https://github.com/SUPLA/supla-docker.git
- Generate sample config by running
Review the settings in
./supla-docker/supla.sh
./supla-docker/.env
file. - Start SUPLA!
./supla-docker/supla.sh start
Before you launch the containers, set the FIRST_USER_EMAIL
and FIRST_USER_PASSWORD
settings in the .env
file.
The account will be automatically created for you. You can remove these settings afterwards not to expose your password.
If the containers are started already, you can create new user account interactively with:
./supla-docker/supla.sh create-confirmed-user
cd supla-docker
git pull
./supla.sh upgrade
After the first launch, a self-signed certificate will be generated for you to make sure everything works. However,
web browser will complain when using such certificate so it's good idea to further configure your instance.
If you have your own SSL certificate, put it in server.key
and server.crt
files inside ssl/cloud
directory
and restart the application.
If your SSL certificate consists of a chainfile (i.e. there is another certificate file besides the .crt
and .key
files):
- Make a copy of original certificate files.
- Prepare one-file certificate by concatenating the certificate file and the chain (in this order!)
cat server_original.crt rootca_chain.crt > server.crt
- Store the resulting
server.crt
inssl/cloud
. - Restart the application.
If you either
- already have another dockerized application running on ports 80 or 443 or
- do not own a valid SSL certificate for your domain but still wants your cloud instance to be accepted by the browsers
then you should run the SUPLA containers in proxy mode. Here's how.
- Execute all installation steps but the last one (do not start the application yet). If you have started it already, stop it with
./supla.sh stop
. - Clone and run the docker-compose-letsencrypt-nginx-proxy-companion according to the instructions on their site. Clone it outside the
supla-docker
directory. An example desired directory structure is as follows:/some/apps/directory/ supla-docker/ docker-compose-letsencrypt-nginx-proxy-companion/
- In the file
supla-docker/.env
find the following configurationand change it toCOMPOSE_FILE=docker-compose.yml:docker-compose.standalone.yml
COMPOSE_FILE=docker-compose.yml:docker-compose.proxy.yml
- In the file
supla-docker/.env
make sure thatCLOUD_DOMAIN
is valid domain name that should point to the SUPLA instance (can not be an IP address!) and theADMIN_EMAIL
is a correct e-mail address. - Start SUPLA!
./supla-docker/supla.sh start
If everything went smoothly, you should be able to access SUPLA Cloud by going to the configured domain name and it should introduce you a valid SSL certificate from Let's Encrypt.
docker logs --since=5m supla-cloud
docker logs --since=5m supla-server
docker logs --since=5m supla-db
Moreover, if you are running in the proxy mode, you might also be interested in logs from the proxy containers.
Cannot start service supla-cloud: driver failed programming external connectivity on endpoint supla-cloud (***): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
It means that you have another application running on the port 80 or 443. You can either
- turn it off and try to launch SUPLA again or
- change the ports that supla-cloud container listens on in the .env file or
- try to run them both with proxy configuration described above.