Cannot find SSL Key: No such file or directory

If you hit any installation issues or cannot connect to your freshly installed UnrealIRCd then this forum is for you.

Moderator: Supporters

Locked
gwynfshae
Posts: 3
Joined: Sat Feb 29, 2020 12:18 am

Cannot find SSL Key: No such file or directory

Post by gwynfshae »

{cut out the part where I tell my life story}

I got the server up and running (and connectable externally) for the first time with some error codes on launch. Modified the config a few times while it was running to address errors. No idea what I did, it restarted ok so it didn't seem to be a huge issue. Left it running overnight.

Today, I couldn't connect and when I try to start it up I get the following:

Code: Select all

Loading IRCd configuration..
config error: /home/ircadmin/unrealircd/conf/unrealircd.conf:198: listen::tls-options::key: could not open '/etc/letsencrypt/archive/irc.mywebsite.com/privkey.pem': No such file or directory
config error: 1 errors encountered
config error: IRCd configuration failed to pass testing
I had had quite a few SSL issues last night and regenerated my key a few times. Today, I started the SSL process from scratch but left the config file as is, because it should be referencing the same files once they've been remade. There is a privkey1.pem in the archives folder but not a privkey.pem... and I've tried using the privkey1 and it does not work.

So my question is thus:
How do I fix? and if I cannot, how to I disable SSL so that I can run as OPERS without needing to use a secure port? I am not in the least bit concerned with security at the moment.

SSL Checker assures me I am secured, but self-signed

OS: CentOS 7
Version: 5.0.3.1
SSL: Letsencrypt/certbot
I followed the install instructions on the wiki exactly, far as I can tell... Until errors popped up and I had to deviate a little.
Lord255
Posts: 95
Joined: Sat Feb 29, 2020 12:58 am
Location: offline

Re: Cannot find SSL Key: No such file or directory

Post by Lord255 »

hi.
did you do an
$ ls -ltr /etc/letsencrypt/archive/irc.mywebsite.com/privkey.pem
? is the file there? owner:group? rights? all good?

when you install unreal, it generates self-signed certs. those should be enough for users connecting and oper up (if they ack the cert). of course LE signed certs are better.. but just sayin.
btw i would recommend you two articles / hints:

LE cert gen && certbot:
https://www.unrealircd.org/docs/Using_L ... UnrealIRCd
https://www.unrealircd.org/docs/Setting ... UnrealIRCd

and last resort if you cannot make it (and you dont like the self-signed):
https://www.unrealircd.org/docs/Set_blo ... ext-policy
gwynfshae
Posts: 3
Joined: Sat Feb 29, 2020 12:18 am

Re: Cannot find SSL Key: No such file or directory

Post by gwynfshae »

So those guides are exactly what I followed to end up in this situation. It doesn't generate a privkey.pem in the /archive/ folder, only the /live/ folder. Which, by everything I've seen from my research... is normal? But then that would mean the guides are flawed and wouldn't work, but they did work last night so I am totally lost.

I will try that last resort. Would I need to remove the block saying where to look for the SSL port to have it function?

For the record, it would not allow me to connect as OPER without going through certbot or equivalent
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Cannot find SSL Key: No such file or directory

Post by Syzop »

I have updated the guide, it should have used live/ and not archive/

The guide was rewritten "only" 2 months ago, so that is probably why it was not noticed before. And possibly others noticed but did not bother to report it.
gwynfshae
Posts: 3
Joined: Sat Feb 29, 2020 12:18 am

Re: Cannot find SSL Key: No such file or directory

Post by gwynfshae »

Thank you!!
It seems to be fully functional now
Locked