Confused with the latter half of installation instructions

Hi friends, first time attempting something like this before. I believe I have followed the installation instructions as accurately as possible, however, the end part relating to writefreely.service is throwing me off big time.
First question: Do I simply save the text file as writefreely.service? That is what I have done currently.

Second: when the bolded text says /var/www/example.com, is the example.com the domain I own? Also, what is /var/www? Very new to Ubuntu so any guidance would be helpful.

Thanks for the assistance! :slight_smile:

Edit 1 So I think I’m making progress: I believe I need to include my domain in the /var/www/example.com. I have done so by creating a folder in /www/ and have then dragged and dropped the writefreely folder into it.

However, I am now I’m encountering an error when trying to run
sudo journalctl -f -u writefreely

It produces the following error:

-- Logs begin at Wed 2020-04-08 00:01:21 BST. --
Apr 08 14:51:03 AMCosyClub systemd[4925]: writefreely.service: Failed to execute command: Permission denied
Apr 08 14:51:03 AMCosyClub systemd[4925]: writefreely.service: Failed at step EXEC spawning /var/www/amcosy.club/writefreely: Permission denied
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Main process exited, code=exited, status=203/EXEC
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Failed with result 'exit-code'.
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Service hold-off time over, scheduling restart.
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Scheduled restart job, restart counter is at 5.
Apr 08 14:51:03 AMCosyClub systemd[1]: Stopped WriteFreely Instance.
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Start request repeated too quickly.
Apr 08 14:51:03 AMCosyClub systemd[1]: writefreely.service: Failed with result 'exit-code'.
Apr 08 14:51:03 AMCosyClub systemd[1]: Failed to start WriteFreely Instance.

Path /var/www/example.com is example location of website files - HTTP server (Apache or Nginx) would by default store sites (domains) under /var/www, so you would need to replace example.com with your domain you want to use.

Now this path heavily depends on whether your server has any hosting control panel installed or not. In case of cPanel, DirectAdmin, Vesta/Hestia or similar, sites typically reside under/home.

Are you setting up WriteFreely on totally fresh Ubuntu server?

When it comes to setting up system service, you can refer to my guide on building WriteFreely from source - I document there build process and installing on CentOS, but since Ubuntu uses systemctl to control services, similar applies anyway.

2 Likes

Hi, thanks for the response. After a lot of troubleshooting over on ServerFault, I’ve decided to scrap the entire thing and start again. I’ve actually dug out a Raspberry Pi 4B and would like to try running it off that, would your guide be applicable still? I’m not as technical as I’d like to be but hopefully I can learn ^^ Alternatively, I could go ahead and install CentOS!

If you decide to build from source, you can try it on Raspberry Pi or any other device that supports Go lang. Or you can use already compiled binary from releases page. If not mistaken, RPi 4 is arm64 architecture, so pick corresponding asset.

Although if you are ready to go through building from source guide, it should be bullet-proof on CentOS 7 and most likely CentOS 8.

If you will be using RPi’s default Raspbian (pretty much same as Ubuntu), some dependencies might have different package names and it will be apt instead of yum :grin:

Thank you so much! I’ll give a go on CentOS7… surely I can’t mess that up! ^^ Will report back if I run into any problems! :stuck_out_tongue: