🌐 Sites Engine & Jekyll Integration


On My Disk features an integrated Sites Engine that allows you to generate and host static websites (such as blogs, documentation sites, or landing pages) directly from your storage device.


1. Jekyll Integration

The Jekyll static site generator is used to build and serve these websites. It runs automatically in the background on the Connector/node.

Ensure Jekyll is installed on the host machine:

sudo which jekyll
# Output: /usr/local/bin/jekyll 

Sites Systemd Service

If Jekyll needs to run under your local user account, configure the Sites service /etc/systemd/system/sites.service as follows:

[Unit]
Description=On My Disk Sites Service
After=network.target

[Service]
Type=simple
User=your_username
WorkingDirectory=/usr/lib/onmydisk/sites
# Set environment variables
Environment="PATH=/home/your_username/.rbenv/shims:/home/your_username/.rbenv/bin:/home/your_username/gems/bin:/usr/local/bin:/usr/bin:/bin"
Environment="GEM_HOME=/home/your_username/gems"
Environment="GEM_PATH=/home/your_username/gems:/usr/lib/ruby/gems/3.0.0"

ExecStart=/bin/bash /usr/lib/onmydisk/sites/serve-all.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

After modifying the service, reload systemd configuration and restart On My Disk:

sudo systemctl daemon-reload
sudo systemctl restart onmydisk

2. Using the New Website Wizard

You can create a website in seconds using the built-in wizard:

  1. Open the file manager and navigate to the Sites folder on your device.
  2. Launch the New Website wizard from the menu/toolbar.
  3. Fill in the fields:
    • Site Name: The directory name (use letters and numbers, no spaces).
    • Title: The title displayed on the site.
    • Description: A short bio or description.
    • Template: Choose a theme tailored to your needs (e.g. personal blog, landing page, or documentation site).
  4. The wizard will automatically create the directories (like _posts/), write a default _config.yml config, and touch a .conf metadata file.
  5. In the background, serve-all.sh will detect the new directory, start a Jekyll process on an allocated port (e.g. 4005), and begin compiling the site.

Public Access

Although compiled and hosted locally on your device, your site is automatically tunneled through the gateway and made accessible on the web at: https://onmydisk.net/sites/<your_site_name>/