website/docs/install/linux.md
2023-02-25 23:04:11 +01:00

60 lines
2.3 KiB
Markdown

# 🐧 Linux
Pre-built binaries are available for Linux systems with x86_64 and ARM architecture. They should work on any distribution, but haven't been tested on all. Please open an issue if problems arise.
If you're not on a supported architecture, please check the [Building on Linux](https://gitea.massivebox.net/ecodash/ecodash/src/branch/master/BUILD.md) guide.
The [docker image](/docs/install/Docker) is recommended over running from binaries.
## Download
1. Grab the appropriate ZIP from the [latest release page](https://gitea.massivebox.net/ecodash/ecodash/releases/latest). Make sure to select the right file for your architecture:
`wget LINK_TO_APPROPRIATE_FILE`
2. Extract the contents. This will create a folder named `ecodash` in the current directory, which will contain the binary, the configuration, the database and HTML templates folder:
`unzip FILE_NAME`
3. To start the container, first enter the `ecodash` directory:
`cd ecodash`
Then run it. This will expose EcoDash on port 80 by default:
`./ecodash`
If you want to run on any other port, use an environment variable like this:
`env PORT=8080 ./ecodash`
## Set up auto-restart
You might want your EcoDash server to restart automatically in the event of system reboots, programming bugs or configuration saves. This tutorial only covers distributions with systemd.
1. Create a file at `/etc/systemd/system/ecodash.service` with this content:
```
[Unit]
Description=EcoDash
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
User=USER
ExecStart=EXTRACTION_PATH/ecodash/ecodash
[Install]
WantedBy=multi-user.target
```
Make sure to replace USER with your username and EXTRACTION_PATH with the path where you performed the `wget` earlier.
2. Test if it works:
`systemctl start ecodash`
3. If it does (you don't see any error) you can set the OS to automatically start it after reboots with this:
`systemctl enable ecodash`
## Get notified about new releases
Since EcoDash doesn't have any way to notify admins of new releases, you're encouraged to add our repository's feed into your RSS reader: https://gitea.massivebox.net/ecodash/ecodash.rss
## Moving on
Now that EcoDash is installed, you can proceed to the Setup.