Create new installation directory
mkdir /opt/homebox && \
cd /opt/homebox/
Download the latest x86 executable from the releases page.
wget -q https://github.com/sysadminsmedia/homebox/releases/latest/download/homebox_Linux_x86_64.tar.gz
Extract the archive and set it's owner and permissions
tar -xzvf homebox_Linux_x86_64.tar.gz && \
chown root:root homebox
Create an .env
file to configure HomeBox
bash -c "cat > /opt/homebox/.env" <<'EOF'
HBOX_MODE=production
HBOX_WEB_PORT=7745
HBOX_WEB_HOST=
HBOX_WEB_MAX_UPLOAD_SIZE=10
HBOX_WEB_READ_TIMEOUT=10s
HBOX_WEB_WRITE_TIMEOUT=10s
HBOX_WEB_IDLE_TIMEOUT=30s
HBOX_STORAGE_DATA=./.data
HBOX_STORAGE_SQLITE_URL=./.data/homebox.db?_pragma=busy_timeout=999&_pragma=journal_mode=WAL&_fk=1
HBOX_LOG_LEVEL=warn
HBOX_LOG_FORMAT=text
HBOX_MAILER_HOST=
HBOX_MAILER_PORT=587
HBOX_MAILER_USERNAME=
HBOX_MAILER_PASSWORD=
HBOX_MAILER_FROM=
HBOX_DEBUG_ENABLED=false
HBOX_DEBUG_PORT=4000
HBOX_OPTIONS_ALLOW_REGISTRATION=true
HBOX_OPTIONS_AUTO_INCREMENT_ASSET_ID=true
HBOX_OPTIONS_CURRENCY_CONFIG=
EOF
Create a new systemd
service
bash -c "cat > /etc/systemd/system/homebox.service" <<'EOF'
[Unit]
Description=HomeBox
After=network.target
StartLimitIntervalSec=2
[Service]
Type=simple
Restart=on-failure
RestartSec=10
User=root
Group=root
WorkingDirectory=/opt/homebox
EnvironmentFile=/opt/homebox/.env
ExecStart=/opt/homebox/homebox
[Install]
WantedBy=multi-user.target
EOF
Reload systemd
and enable the new service
systemctl daemon-reload && \
systemctl enable --now homebox.service && \
systemctl status homebox.service