# Ghost Blog installation on FreeBSD 12

**URL:** <https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853>\
**Category:** Developer help\
**Created:** [June 3, 2020, 10:32am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853 "2020-06-03T10:32:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![macosxgeek](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@macosxgeek](https://forum.ghost.org/u/macosxgeek)\
**Post date:** [June 3, 2020, 10:32am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/1 "2020-06-03T10:32:05Z")

</div>

Hi @ll,

Can I ask if anyone has successfully installed Ghost Blog on FreeBSD? I’m using FreeBSD 12 STABLE.

I did clone Ghost from here: [GitHub - TryGhost/Ghost: Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.](https://github.com/TryGhost/Ghost)  
I did run: npm install ghost-cli -g  
And it went fine (well with minor hick ups really related to the Node version I had installed on the server). I was using node 13.x.x so I had to downgrade to node 12.x.x

Then I did try to run: ghost install --db=sqlite3 in an empty directory in order to install Ghost.

Unfortunately it gives me the following error message:

✔ Checking system Node.js version  
✔ Checking current folder permissions  
System checks failed with message: ‘Operating system is not Linux’  
Some features of Ghost-CLI may not work without additional configuration.  
For local installs we recommend using `ghost install local` instead.  
? Continue anyway? Yes  
System stack check skipped  
ℹ Checking operating system compatibility [skipped]  
✔ Checking memory availability  
✔ Checking for latest Ghost version  
✔ Setting up install directory  
✖ Downloading and installing Ghost v3.18.1  
A ProcessError occurred.

Message: Command failed: yarn install --no-emoji --no-progress  
SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn  
at Parser.unexpected (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64332:11)  
at Parser.parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64463:14)  
at parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64537:21)  
at module.exports.exports.default (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64099:96)  
at loadRcFile (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56942:58)  
at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56916:14  
at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101331:14  
at Array.map ()  
at parseRcPaths (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101329:78)  
at Object.findRc (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101343:10)

Exit code: 1

Debug Information:  
OS: FreeBSD, v12.1  
Node Version: v12.16.2  
Ghost-CLI Version: 1.14.0  
Environment: production  
Command: ‘ghost install --db=sqlite3’

Additional log info available in: /root/.ghost/logs/ghost-cli-debug-2020-06-03T10\_30\_20\_431Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to [Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.

Can I ask if I’m doing something wrong here? Any help would be greatly appreciated.

–  
Best regards  
macosxgeek

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [June 3, 2020, 11:49am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/2 "2020-06-03T11:49:39Z")

</div>

Hey @macosxgeek 👋  
You should be using the Ghost CLI to install Ghost and not cloning down the source from GitHub. You can see the install steps in the readme of the repo: [GitHub - TryGhost/Ghost: Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.](https://github.com/TryGhost/Ghost#quickstart-install)

---

<div class="post-metadata">

**Author:** ![macosxgeek](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@macosxgeek](https://forum.ghost.org/u/macosxgeek)\
**Post date:** [June 3, 2020, 12:03pm UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/3 "2020-06-03T12:03:35Z")

</div>

Hi @DavidDarnes,

Thank you for your response. Basically I did clone the Ghost repo to install the Ghost CLI. Then I’ve created an empty folder in different location and I did run ‘ghost install’ in it. Do you still think cloning would be a problem here?

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [June 3, 2020, 12:04pm UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/4 "2020-06-03T12:04:41Z")

</div>

I believe so yes. The Ghost CLI is designed to assist you with the entire installation process, there’s no need to clone down the codebase 😊

---

<div class="post-metadata">

**Author:** ![macosxgeek](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@macosxgeek](https://forum.ghost.org/u/macosxgeek)\
**Post date:** [June 3, 2020, 12:09pm UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/5 "2020-06-03T12:09:34Z")

</div>

OK. So I have removed the cloned folder from the file system and ran:

npm install ghost-cli@latest -g

Then when I run: ghost install --db=sqlite3

I still get the same error. Following is the exception from the log file:

> Blockquote  
> Debug Information:  
> OS: FreeBSD, v12.1  
> Node Version: v12.16.2  
> Ghost-CLI Version: 1.14.0  
> Environment: production  
> Command: ‘ghost install --db=sqlite3’  
> Message: Command failed: yarn install --no-emoji --no-progress  
> SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn  
> at Parser.unexpected (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64332:11)  
> at Parser.parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64463:14)  
> at parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64537:21)  
> at module.exports.exports.default (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64099:96)  
> at loadRcFile (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56942:58)  
> at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56916:14  
> at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101331:14  
> at Array.map ()  
> at parseRcPaths (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101329:78)  
> at Object.findRc (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101343:10)

Exit code: 1

--------------- stderr ---------------  
SyntaxError: Unknown token: { line: 1, col: 0, type: ‘INVALID’, value: undefined } 1:0 in /usr/local/share/.config/yarn  
at Parser.unexpected (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64332:11)  
at Parser.parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64463:14)  
at parse (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64537:21)  
at module.exports.exports.default (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:64099:96)  
at loadRcFile (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56942:58)  
at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:56916:14  
at /usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101331:14  
at Array.map ()  
at parseRcPaths (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101329:78)  
at Object.findRc (/usr/local/lib/node\_modules/ghost-cli/node\_modules/yarn/lib/cli.js:101343:10)

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [June 3, 2020, 3:58pm UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/6 "2020-06-03T15:58:55Z")

</div>

It might be wise to run `ghost doctor` to ensure everything on your server is good to go for a Ghost installation

> **[Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/ghost-cli/#ghost-doctor)**
>
> The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool.

---

<div class="post-metadata">

**Author:** ![macosxgeek](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@macosxgeek](https://forum.ghost.org/u/macosxgeek)\
**Post date:** [June 4, 2020, 7:42am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/7 "2020-06-04T07:42:52Z")

</div>

> [@DavidDarnes](#):
>
> ghost doctor

The result of ghost doctor:

~/heavenbot/src/heaven\_plugin ‹master\*› $ ghost doctor  
✔ Checking system Node.js version  
✔ Checking current folder permissions  
✖ Validating config  
✔ Checking memory availability  
✔ Checking binary dependencies  
One or more errors occurred.

1. Validating config

Error detected in the production configuration.

Message: Config file is not valid JSON

Debug Information:  
OS: FreeBSD, v12.1  
Node Version: v12.16.2  
Ghost-CLI Version: 1.14.0  
Environment: production  
Command: ‘ghost doctor’

Try running ghost doctor to check your system for known issues.

You can always refer to [Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/api/ghost-cli/) for troubleshooting.

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [June 4, 2020, 11:37am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/8 "2020-06-04T11:37:16Z")

</div>

> [@macosxgeek](#):
>
> Message: Config file is not valid JSON

Guess there’s something up with your config file 😅. We’ve got documentation and examples to refer to here:  
[https://ghost.org/docs/api/v3/ghost-cli/config/](https://ghost.org/docs/api/v3/ghost-cli/config/)

> **[Configuration - Adapt your publication to suit your needs](https://ghost.org/docs/config/)**
>
> Find out how to configure your Ghost publication or override Ghost's default behaviour with robust config options, including mail, storage, scheduling and more!

---

<div class="post-metadata">

**Author:** ![macosxgeek](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@macosxgeek](https://forum.ghost.org/u/macosxgeek)\
**Post date:** [June 9, 2020, 8:20am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/9 "2020-06-09T08:20:30Z")

</div>

I have a strange feeling this won’t be an easy one… 😉

The thing is the config file is not even created during the installation.  
When I run “ghost install --db=sqlite3” and it fails with the error posted above I end up with two directories in the installation folder and nothing else:

drwxr-xr-x 8 root wheel 8B Jun 9 09:17 content  
drwxr-xr-x 2 root wheel 2B Jun 9 09:17 versions

So config file is not even being created at this stage… I suspect it has something to do with Yarn installation… I was able to run this command manually: “yarn install --no-emoji --no-progress” and it works fine… But then when I try the ghost installation again it fails saying that installation directory is not empty…

---

<div class="post-metadata">

**Author:** ![marhub](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@marhub](https://forum.ghost.org/u/marhub)\
**Post date:** [September 22, 2020, 2:54pm UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/10 "2020-09-22T14:54:48Z")

</div>

@macosgeek have you managed to fix this issue ?  
have exactly same problem …

---

<div class="post-metadata">

**Author:** ![jlin](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jlin](https://forum.ghost.org/u/jlin)\
**Post date:** [September 28, 2020, 1:39am UTC](https://forum.ghost.org/t/ghost-blog-installation-on-freebsd-12/14853/11 "2020-09-28T01:39:46Z")

</div>

I had this issue during a ghost update and solved it by looking at the logs - it seems that it was getting stuck at ~/.config/yarn (read the logs for the specific folder, for the OP it is /usr/local/share/.config/yarn for example) so I removed that whole folder (make sure to make a backup of it first), presumably it wanted to read/write the files there but there was already a preexisting directory substructure that it didn’t understand so it got stuck rather than update.

Once I removed that directory the ghost update command was able to successfully complete. And subsequently, ghost start was able to start the blog.
