Quoting Peter Pentchev via stunnel-users <stunnel-users@stunnel.org>:
On Tue, Feb 24, 2026 at 05:48:52PM -0900, Mike via stunnel-users wrote:
I'm setting up a new ubuntu server and it includes stunnel version 5.74.
My ultimate goal is to have the service managed by systemd.
[snip]
So after further searching I found the following files:
/usr/lib/systemd/system/stunnel.target /usr/lib/systemd/system/stunnel@.service
It feels like you're doing this on a Debian/Ubuntu installation. Take a look at the /usr/share/doc/stunnel4/README.Debian file; its purpose is to document Debian-specific changes to the installation. In particular, it could have pointed you to the per-config-file services quicker :)
Most definitely. After reading that file is when I actually started moving in a good direction. :)
I executed the command:
systemctl enable stunnel@myconffile
When I use this command:
systemctl start stunnel@myconffile
It definitely executes the correct command, but then the whole service shuts down and I get this:
○ stunnel@myconffile.service - TLS tunnel for network daemons - per-config-file service Loaded: loaded (/etc/systemd/system/stunnel@.service; enabled; preset: enabled) Active: inactive (dead) since Tue 2026-02-24 20:44:54 CST; 11s ago Duration: 20.157s Invocation: 46cddb34062b401b87e8516f47b1482b Docs: man:stunnel4(8) Process: 5099 ExecStart=/usr/bin/stunnel4 /etc/stunnel/myconffile.conf (code=exited, status=0/SUCCESS) Main PID: 5099 (code=exited, status=0/SUCCESS) CPU: 128ms
No stunnel service is running. There wasn't anything in the log that I could find that would indicate why it stopped.
What does `journalctl -u stunnel@myconffile.service` say?
And BTW, did you stop any running stunnel4 processes before starting the per-config-file service?
I definitely did. Just did it again to be sure...same result. My hope is that someone else has been running an ubuntu installation and got this running without using the initd stuff.
G'luck, Peter
-- Peter Pentchev roam@ringlet.net roam@debian.org peter@morpheusly.com PGP key: https://www.ringlet.net/roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13