Ryan Kraus 4dea071ff8 Refactor Getting Started page.
This commit is a large refactoring of the getting started page. This
version contains only the information necessary to get off the ground
and get your bearings. There is also one consistent flow on information
rather than a spaghetti flow. Advanced installation details have been
moved to their own page (Docker and daemons). Details about opening
firewall ports have been expanded a bit and moved to the
troubleshooting page. The install instructions contain details about
all three install types (production, beta, and dev).
2015-09-02 02:23:51 -04:00

4.6 KiB

layout, title, description, date, sidebar, comments, sharing, footer
layout title description date sidebar comments sharing footer
page Advanced Installation Brief advanced installation tutorials. 2015-9-1 22:57 false false true true

Here are some general tutorials on how to setup some of the more advanced deployments that are frequently requested.

**Docker Deployment**

Installation with Docker is straightforward. Adjust the following command so that /path/to/your/config/ points at the folder where you want to store your config and run it:

docker run -d --name="home-assistant" -v /path/to/your/config:/config -v /etc/localtime:/etc/localtime:ro --net=host balloob/home-assistant

This will launch Home Assistant and serve its web interface from port 8123 on your Docker host.

When using boot2docker on OS X you are unable to map the local time to your Docker container. Replace -v /etc/localtime:/etc/localtime:ro with -e "TZ=America/Los_Angeles" (replacing America/Los_Angeles with your timezone)

**Debian Deamon**

Debian based systems, including Ubuntu and Raspbian for the Raspberry Pi use an application called Init to manage daemon services. Init will launch init scripts that are located in the directory /etc/init.d/. A sample init script for Debian based systems is maintained in this project.

To install this script, download it, tweak it to you liking, and install it by following the directions in the header. This script will setup Home Assistant to run when the system boots. To start/stop Home Assistant manually, issue the following commands: ```bash sudo service hass-daemon start sudo service hass-daemon stop ```

When running Home Assistant with this script, the configuration directory will be located at /var/opt/homeassistant. This directory will contain a verbose log rather than simply an error log.

When running daemons, it is good practice to have the daemon run under its own user name rather than the default user's name. Instructions for setting this up are outside the scope of this document.

**Fedora Daemon**

If you want that Home Assistant is lauched automatically, an extra step is needed to setup systemd. You need a service file to control Home Assistant with systemd.

su -c 'cat <<EOF >> /lib/systemd/system/home-assistant.service
[Unit]
Description=Home Assistant
After=network.target

[Service]
Type=simple
ExecStart=hass

[Install]
WantedBy=multi-user.target
EOF'

You need to reload systemd to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.

sudo systemctl --system daemon-reload
sudo systemctl enable home-assistant
sudo systemctl start home-assistant

If everything went well, sudo systemctl start home-assistant should give you a positive feedback.

$ sudo systemctl status home-assistant -l
● home-assistant.service - Home Assistant
   Loaded: loaded (/usr/lib/systemd/system/home-assistant.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2015-06-25 23:38:37 CEST; 3min 13s ago
 Main PID: 8557 (python3.4)
   CGroup: /system.slice/home-assistant.service
           └─8557 /usr/bin/python3.4 -m homeassistant
[...]

To get Home Assistant's logging output, simple use journalctl.

sudo journalctl -f -u home-assistant

###« Back to Getting Started