Install Jekyll on Qnap NAS

Hello,

After years building websites/webshops with Wordpress, i will give Jekyll a try.
I have a Qnap NAS, and want install the Ruby environment incl. Jekyll in a container (Container Station).
The reason: i work on several computers at home (Mac Mini, Macbook and a Chromebook) and it may be useful if i can access the Ruby-server in my LAN.

Have someone experience with a similar setup?
Can someone help me with a step-by-step guide how install this on my NAS?

No, I don’t have experience using container station for that.

But experience with container station is that it does not allways update packages frequently enough.

If you have problems with container station you can allways install Linux station amd have a full blown ubuntu Linux where you can install ruby or other packages needed.

If you have enough memory it works great if your nas supports it.

I have it running and can view films un full hd and even view them with transcoding in a web browser, or access re,otly the nas and use it as an unbuntu Linux station.

It works great.
You should not have problems for running Jekyll in it.
I have 8 GB, for running Linux station, 4gb should do if you have not plenty of services running in the nas and are not going to bloat Linux station with running apps.

I have tried virtual station, a full blown virtualization system, but it takes much more resources and is slower.
If you have just basic needs and the container gives what you need it would work with less memory requirements.

But Linux station lets you have a virtual machine you can tweak to your needs.

Hi @ariznaf ,
Thanks for your help.
I’m not so familiar with Container Station, what i mean i can setup a prebuild container, and hope it works :-/
I found a Jekyll Docker container, install it, but doesn’t work!
But in the past installing LXC Linux container with succes.
So your solution is a very good tip!
I give this a try :slight_smile:

Hi @ariznaf,
Follow your tip!
Installing a LXC Linux container, here a step-bystep guide:

  1. Installing an LXC Ubuntu container in Container Station
  • before installing steup the network:
    BRIDGE -> give a static ip-address (in my case 192.168.0.205)
  1. When the container is started, type this in the container’s terminal:
    $sudo apt-get update
    $sudo apt-get upgrade

  2. Install SSH on the Linux Container, so you have remote access from your computer:
    $sudo apt-get install -y openssh-server

  3. After installing SSH in the Linux container, having remote access. Open the terminal (MacOS, Linux, ChromeOS) or Putty (Windows) and type:
    $ssh your-container-username@192.168.0.205 -p 22

  4. follow the steps in this tutorial for install Jekyll:
    https://computingforgeeks.com/how-to-install-jekyll-on-ubuntu-18-04/

  5. After generate a Jekyll website, you can watch your website inn the browser with this command:
    $jekyll serve --host 192.168.0.205

Now i can see my Jekyll website when type:
http://192.168.0.205:4000

Disclaimer: In my case, i use the static ip 192.168.0.205 and works on a Qnap NAS (TS-251 with 8Gb RAM)

Hope this can help others.

1 Like

I think it is better to use Jekyll build to build the site files
And then use nginx to serve the files in the standard or desired port

The built in server is just for developement, it cannot compete with the eficiency of nginx.

Or better use the server that comes with the nas and create a virtual host that points to the static files that are generated by jekill.

Thus you have not to install more software and do not overload the server.

Saludos

I’m happy with my setup!
I know that Jekyll’s build-in server only for development. The reason for this ‘NAS’ setup is only for development in my LAN. Now i can developing Jekyll websites on several machines, Mac or my Chromebook. No hassle with different Ruby configurations on several machines!
Now i have one ‘central’ Ruby environment accessing in my LAN.
When finishing a Jekyll-project, i can upload to the hosting company where i have a paid-plan :slight_smile:

You probably could have install a container station package and save some memory and disk.

BUth now you have a completly ubuntu machine that you can operate remotely or locally with a display and keyboard (ir your NAS has a graphic card).

If you want to save space, you can install a ubuntu server container station package and so you can access it via ssh and install everything you want.
You even can have Linux station (which depends on container station) and other containers installed in the same machine to try best solution for you.

I talk about Ubuntu because it seems that de Linux bundle with qnap, that is the reason that Linux station install a version of Ubuntu (and there are not to many options of versions to install).

It seems that Linux station uses container technology to share much of the resources with the base operating system in the qnap, basically they just added some services like x windows and the graphhical interface and other things.

That is the reason of it being less resource demanding and quicker than a full virtual machine.

Hi,
I understand.
The LXC Ubuntu container is without a UI, it is only accessing in the terminal.
When setup choosing 2Gb instead of 8Gb.
So i don’t think it used mutch resources.

In the meanwhile i have a strange issue. Trying install a new Jekyll-project, but gives an error:
$jekyll new website
-bash: jekyll: command not found

$jekyll build
-bash: jekyll: command not found

The command not found :frowning:

Ah, OK.
Mine has 8GB so I have a complete ubuntu extension and show the output in my TV, and use a small wireless keyboard to be able to play films and videos, music, etc in a safari web page.
It works great.

If you do not install the graphical interface, it won’t take as much resources, I guess Linux station would be the least resource hungry option, as it is optimized to share resources with base OP.

Have you done the Jekyll install?

sudo apt install Jekyll?

I dont remember if it comes with apt package by default, if not you would have to install apt first.

Jekyll package depends on ruby and some others packages that will bi installed with it automatically.

I have not tried in the NAS, but have installed it in debian Linux windows console with no problem.

i trying Linux Station in the past, nice container, but the problem is the keyboard region layout. Most apps works with QUERTY and i’m live in Belgium = AZEETY and somethimes difficult changing the language when access the apps, the LXC Linux containers are best option for me. On my NAS using also a lot of other apps and services:

  • FTP for my IP Camera’s (don’t use the Surveillance Station app (lot of resources i think)
  • A lot of backup options (backup my Google Drive, Dropbox, …)
  • Qsync (centralize all my files so easy access in the MacOS Finder or Windows Explorer

Okay, about the strange issue:
Now follow the steps and reinstall:

export GEM_HOME=$HOME/gems
export PATH=$HOME/gems/bin:$PATH

$ source ~/.bashrc

$ sudo gem install bundler

$ sudo gem install jekyll

Strange that the re-install only works as ‘root’ user.

$gem install bundler
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /var/lib/gems/2.5.0 directory.

$ jekyll -v
Traceback (most recent call last):
	12: from /usr/local/bin/jekyll:23:in `<main>'
	11: from /usr/local/bin/jekyll:23:in `load'
	10: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/exe/jekyll:11:in `<top (required)>'
	 9: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
	 8: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler.rb:107:in `setup'
	 7: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:20:in `setup'
	 6: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/runtime.rb:108:in `block in definition_method'
	 5: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/definition.rb:226:in `requested_specs'
	 4: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/definition.rb:237:in `specs_for'
	 3: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/definition.rb:170:in `specs'
	 2: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/spec_set.rb:81:in `materialize'
	 1: from /var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/spec_set.rb:81:in `map!'
/var/lib/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find jekyll-feed-0.12.1 in any of the sources (Bundler::GemNotFound)

I don’t know whats happening!
Yesterday it works successfully and now … :frowning:

Sorry I cannot help with that.

I am quite new to Jekyll and have no knowledge of Ruby and gems.

Let’s see if others can help.

If you cannot solve it, only thing I can do is try to install it in mine to see if I have the same error.

Regards

Hi @ariznaf,

You help me a lot man with all the other things :wink:
Okay, do a reboot and now it works perfectly. Strange :thinking:

For testing, my very very very first Jekyll website online:

1 Like

Glad it worked, but yes it is strange.

It works… almost.
I see in my live website there is a problem with some url’s, okay but thats a next step.

Thanks a lot man!!!

UPDATE: now it works! i forgot refreshing my FTP client when uploading the files :blush: