# Help installing ZNC



## kkiller23 (Apr 12, 2012)

I'm looking for help installing ZNC on my BOX, I've never used freebsd FreeBSD before in my life. This is my first time using it and *I* can't seem to get ZNC to work. I can install it fine using *pkg_add -r znc*, but when after setup it won't let me create the configuration file and it tells me that 


```
.znc/configs/znc.conf]... [ Unable to open ]
```
and

```
Please specify an alternate location (or "stdout" for displaying the config) [.znc/configs/znc.conf]:
```

So, *I* just don't know what to do from here. I don't understand why there is no .znc path to place the conf in and it won't let me put it in any other path. I tried just playing it in my root folder, but it said that znc was running from there. Can someone please help me  get this set up. I paid for 3 months of a vps already to use as a BNC and *I* can't even get this thing set up.


----------



## SirDice (Apr 12, 2012)

Don't run it as root. Create the .znc directory in your home directory.


----------



## kkiller23 (Apr 12, 2012)

SirDice said:
			
		

> Don't run it as root. Create the .znc directory in your home directory.



Thank you for the reply, but *I* planned on just setting it up on my root account because *I* don't know how to make a user with enough privileges to install znc, I do have another user set up on the box though. Also, should *I* create the home folder as well? Because there is no home folder when I try to *cd* to /home.


----------



## SirDice (Apr 12, 2012)

*Install* the application as root, *use* the application with a normal user account.


----------



## kkiller23 (Apr 12, 2012)

SirDice said:
			
		

> *Install* the application as root, *use* the application with a normal user account.




That's what *I* was doing. There is no home dir etc. though. So do *I* have to make them in my root dir first? Also, do *I* have to make the sub dirs in .znc?


----------



## SirDice (Apr 12, 2012)

How did you create the user account? It's home directory should be automatically created.


----------



## kkiller23 (Apr 12, 2012)

SirDice said:
			
		

> How did you create the user account? It's home directory should be automatically created.



I used adduser as that's the only command *I* found while googling how to add a user on FreeBSD. I guess *I* did it wrong if it's supposed to make the home dir for me.


----------



## Dereckson (Apr 12, 2012)

Each user has to run this command to get a wizard helping it to create a new configuration fileset:

`$ znc --makeconf`


----------



## kkiller23 (Apr 12, 2012)

Dereckson said:
			
		

> Each user has to run this command to get a wizard helping it to create a new configuration fileset:
> 
> `$ znc --makeconf`



I only have root and then another user in the wheel group. It won't even allow me run it on root and on the other it just won't let me save the znc.conf file anywhere after *I* already filled out all the info like port etc. I created a home folder tried creating a /.znc folder,  but it wouldn't allow me to create that for some reason. So *I* just created /home/znc/configs, I tried pointing it to that folder it just tells me 

```
[ !! ] Writing config [/home/znc/conf/]... [ Unable to open file ] [ ?? ] Please specify an
 alternate location (or "stdout" for displaying the config) [/home/znc/conf/]:"]
```

*W*hen *I* do stdout it just opens the conf in the ssh session then goes back to normal ssh session. I added the user to the group wheel then went in and commented a line that a tutorial told me to comment to get around some error *I* was getting to get su. I'm no pro so that's why *I*'m pretty lost right now. I don't understand and *I* know you guys think *I*'m dumb since *I* can't even install ZNC.


----------



## kkiller23 (Apr 12, 2012)

It wouldn't allow me to edit my post, but this is what ZNC was telling me when trying to save the znc.conf:


```
Writing config [/home/znc/conf/ Unable to open file 
Please specify an alternate location (or "stdout" for displaying the config) [/home/znc/conf/]
```


----------



## SirDice (Apr 12, 2012)

adduser(8) is good, don't give it any options, just run the plain command. It'll ask a few questions and everything should work _automagically_. Run it again, create an account named kkiller23 or something else but not the same one you choose before.

Then use secure shell (PuTTY I presume?) with _that_ username to login on the FreeBSD host. If that works run the already mentioned `$ znc --makeconfig`

And please turn off root logins in sshd_config(5). You _really_ don't want to leave that on. Unless you like getting owned by hackers. Search the forums on how to deal with the inevitable brute-force attacks too. You're going to need them. If you haven't already noticed them, you will soon enough :e


----------



## Dereckson (Apr 13, 2012)

The correct command is:
`$ znc --makeconf`

--makeconfig isn't a valid option.


----------



## SirDice (Apr 13, 2012)

Oops. Typed it from the top of my head without checking :r


----------

