Why am I getting an error when I do "./writefreely"?

After extracting the writefreely_0.13.1_linux_amd64.tar.gz file, cding into the writefreely directory and using the command writefreely, it throws a command not found error. However when I use the command ./writefreely, it throws this error.

    2021/08/05 09:03:26 Starting WriteFreely 0.13.1...
    2021/08/05 09:03:26 Loading config.ini configuration...
    ERROR: 2021/08/05 09:03:26 app.go:146: Unable to load configuration: open config.ini: no such file or directory

I have already tried re-installing the file and extracting again but I get the same results. Can anyone help me out with this? I’d really appreciate it. Thanks in advance.

PS: I’m on Linux, Ubuntu 20.04 LTS release.
And this is the project directory.
keys pages static templates writefreely

It seems like you don’t have a config file, maybe try running ./writefreely config start to create one.

You’ll probably need to setup your database too, check the setup documentation out and see if any of this helps.

2 Likes

Thanks for the help! I have it all set up now. Really appreciate it :smiley:
However, there’s another problem. When I run the server, and I try to create an account and log in, it doesn’t work. It just reloads the page. Here, I’ll show you.

Please ignore the music. I left my Spotify on while recording it.
Anyways, could you help me out? Do I have to change something in my config file?
In the beginning you see me signing up for an account. Then after signing up, I go to the login page, type in my credentials and hit ‘Login’. But it just reloads the page. why is that? I already have an admin account set up but I can’t login to a normal user account.

@danielthetam Do you see any errors in your server logs when you try to log in?

It could be that you’re missing encryption keys needed to store your user session in the browser. Did you run this command?

./writefreely keys generate
1 Like

Yea, I’ve done that. It says that the files already exist.

This is the log I get while I’m trying to log in. I can clearly see the account in the MySQL database when I query it. I just can’t log in to it.

2021/08/06 13:39:05 Login: Attempting login for 'danieltam'
2021/08/06 13:39:06 Login: Redirecting to /
2021/08/06 13:39:06 "POST /auth/login" 200 350.300907ms "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"
2021/08/06 13:39:06 "GET /" 200 4.828163ms "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"