Unable to start pritunl-web.service

I have setup the pritunl but I am unable to start the pritunl web service. When I check for status for webservice

myusername@pritunl-deb12-vpn:~$ sudo systemctl status pritunl-web
× pritunl-web.service
     Loaded: loaded (/etc/systemd/system/pritunl-web.service; static)
     Active: failed (Result: resources)
        CPU: 0

Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to load environment files: No such file or directory
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to run 'start' task: No such file or directory
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed with result 'resources'.
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: Failed to start pritunl-web.service.
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to load environment files: No such file or directory
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to run 'start' task: No such file or directory
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed with result 'resources'.
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: Failed to start pritunl-web.service.

When I follow the instructions on High Security Environment to set up the app.web_systemd true; it fails with this error

myusername@pritunl-deb12-vpn:~$ sudo pritunl set app.web_systemd true
[local][2025-12-02 21:38:20,212][ERROR] Pritunl setup failed
Traceback (most recent call last):
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/setup/__init__.py", line 93, in setup_db_host
    setup_mongo()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/setup/mongo.py", line 337, in setup_mongo
    client = pymongo.MongoClient(
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pymongo/mongo_client.py", line 791, in __init__
    seeds.update(uri_parser.split_hosts(entity, port))
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pymongo/uri_parser.py", line 376, in split_hosts
    raise ConfigurationError("Empty host (or extra comma in host list).")
pymongo.errors.ConfigurationError: Empty host (or extra comma in host list).
Traceback (most recent call last):
  File "/usr/bin/pritunl", line 33, in <module>
    sys.exit(load_entry_point('pritunl==1.32.4400.99', 'console_scripts', 'pritunl')())
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/__main__.py", line 186, in main
    setup.setup_db_host()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/setup/__init__.py", line 93, in setup_db_host
    setup_mongo()
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pritunl/setup/mongo.py", line 337, in setup_mongo
    client = pymongo.MongoClient(
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pymongo/mongo_client.py", line 791, in __init__
    seeds.update(uri_parser.split_hosts(entity, port))
  File "/usr/lib/pritunl/usr/lib/python3.9/site-packages/pymongo/uri_parser.py", line 376, in split_hosts
    raise ConfigurationError("Empty host (or extra comma in host list).")
pymongo.errors.ConfigurationError: Empty host (or extra comma in host list).

Journalctl says this about webservice –

Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to load environment files: No such file or directory
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to run ‘start’ task: No such file or directory
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed with result ‘resources’.
Subject: Unit failed
Defined-By: systemd
Support: 


The unit pritunl-web.service has entered the ‘failed’ state with result ‘resources’.
Dec 02 21:19:20 pritunl-deb12-vpn systemd[1]: Failed to start pritunl-web.service.
Subject: A start job for unit pritunl-web.service has failed
Defined-By: systemd
Support: 


A start job for unit pritunl-web.service has finished with a failure.

The job identifier is 1368 and the job result is failed.
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to load environment files: No such file or directory
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed to run ‘start’ task: No such file or directory
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: pritunl-web.service: Failed with result ‘resources’.
Subject: Unit failed
Defined-By: systemd
Support: 


The unit pritunl-web.service has entered the ‘failed’ state with result ‘resources’.
Dec 02 21:21:35 pritunl-deb12-vpn systemd[1]: Failed to start pritunl-web.service.
Subject: A start job for unit pritunl-web.service has failed
Defined-By: systemd
Support: 


A start job for unit pritunl-web.service has finished with a failure.

The job identifier is 1451 and the job result is failed.

How do I start the pritunl-web.service? Please help.

The service isn’t intended to be started directly. It needs to be started by the Pritunl process which will configure required environmental variables before starting it. The command sudo pritunl set app.web_systemd true failed because the server does not yet have a MongoDB server configured. This must be done first then run sudo pritunl set app.web_systemd true then sudo systemctl restart pritunl.

1 Like

That solved it, thank you.

Thank you @zach

I was able to start the webservice but it is showing tls errors in the journalctl for pritunl-web

Dec 03 15:27:15 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:27:15 http: TLS handshake error from abc.123.2.88:30269: read tcp 10.1.1.10:443->abc.123.2.88:30269: read: connection reset by peer
Dec 03 15:27:15 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:27:15 http: TLS handshake error from abc.123.2.88:30268: read tcp 10.1.1.10:443->abc.123.2.88:30268: read: connection reset by peer
Dec 03 15:28:16 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:16 http: TLS handshake error from abc.123.2.88:41966: read tcp 10.1.1.10:443->abc.123.2.88:41966: read: connection reset by peer
Dec 03 15:28:16 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:16 http: TLS handshake error from abc.123.2.88:41967: read tcp 10.1.1.10:443->abc.123.2.88:41967: read: connection reset by peer
Dec 03 15:28:16 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:16 http: TLS handshake error from abc.123.2.88:42043: read tcp 10.1.1.10:443->abc.123.2.88:42043: read: connection reset by peer
Dec 03 15:28:16 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:16 http: TLS handshake error from abc.123.2.88:42044: read tcp 10.1.1.10:443->abc.123.2.88:42044: read: connection reset by peer
Dec 03 15:28:19 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:19 http: TLS handshake error from abc.123.2.88:18424: read tcp 10.1.1.10:443->abc.123.2.88:18424: read: connection reset by peer
Dec 03 15:28:19 pritunl-deb12-vpn pritunl-web[913]: 2025/12/03 15:28:19 http: TLS handshake error from abc.123.2.88:9277: read tcp 10.1.1.10:443->abc.123.2.88:9277: read: connection reset by peer

I am not sure where to look. I have checked the firewall rules. Would you please share your thoughts?

It appears that it isn’t reaching the internal web server. You cannot start the pritunl-web service, it needs to be managed by the pritunl process. Run the commands below and restart the server.

sudo systemctl disable pritunl-web
sudo reboot