# Pritunl Client auto start on Ubuntu Server 22.04

**URL:** <https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083>\
**Category:** Pritunl\
**Tags:** pritunl-client\
**Created:** [June 1, 2023, 6:51pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083 "2023-06-01T18:51:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![user101](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@user101](https://forum.pritunl.com/u/user101)\
**Post date:** [June 1, 2023, 6:51pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/1 "2023-06-01T18:51:55Z")

</div>

Is there a way to configure the Pritunl Client to auto start and login when a server starts?

We’re using Ubuntu Server 22.04.

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 2, 2023, 3:47pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/2 "2023-06-02T15:47:06Z")

</div>

pritunl-client enable + id

---

<div class="post-metadata">

**Author:** ![user101](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@user101](https://forum.pritunl.com/u/user101)\
**Post date:** [June 2, 2023, 3:55pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/3 "2023-06-02T15:55:51Z")

</div>

We require a PIN in our environment. Is there a way to pass the PIN to the client when it auto starts?

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 2, 2023, 4:04pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/4 "2023-06-02T16:04:34Z")

</div>

that is the exact same issue I have in my side. I cant find any way to pass the PIN to start … the docs say nothing about the PIN… only a password that does not substitute the pin as I have test. I spent a good amount of time yesterday trying to find out how to give the pin on the commend line.

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 2, 2023, 9:37pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/5 "2023-06-02T21:37:45Z")

</div>

found something interesting. if you reboot the server the connection will be stablish with out asking for the pin as long as the profile is “enable” on the client arguments.

by the time I noticed that I already had the openvpn client configured and working. has way more documentation than pritnl client.

---

<div class="post-metadata">

**Author:** ![user101](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@user101](https://forum.pritunl.com/u/user101)\
**Post date:** [June 3, 2023, 6:39am UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/6 "2023-06-03T06:39:57Z")

</div>

Looks like there is a way to pass in the PIN.

```auto
 pritunl-client start provile_id -p password

```

This worked for me; however, I can’t seem to fine the option to disable the default gateway

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 3, 2023, 4:58pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/7 "2023-06-03T16:58:49Z")

</div>

yeah that also worked form me

pritunl-client start --password 11111 b829rfampxlceqbn --mode wg

I tried that before but didn’t work. now it did

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 3, 2023, 5:42pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/8 "2023-06-03T17:42:07Z")

</div>

I am getting this conclusions so far

1. in order to make the client to work you need to install wireguard-tools apart from the PRITUNL itself
2. only manual connection works as far as you pass the --password argument but not on OS boot as there is nowhere to store the password that I can find
3. Ones WG tunnels are created they do not route to other peers. seems like is the gateway you mention. This is not the case when using OpenVPN.

---

<div class="post-metadata">

**Author:** ![user101](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/u/a9a28c/32.png) [@user101](https://forum.pritunl.com/u/user101)\
**Post date:** [June 3, 2023, 7:42pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/9 "2023-06-03T19:42:50Z")

</div>

hmm… I’m using Ubuntu 22.04 server and v1.3.3484.2 of the Pritunl Client.

I did the following and it seems to work. The client auto-starts after a reboot and connects automatically.

```auto
pritunl-client enable profile_id
pritunl-client start profile_id -p password

```

I did not have to install wireguard-tools.  
My only problem now is trying to figure out a way to disable the default route, which is mentioned in this post.

> [@How to configre routes? E.g. disable replacing the default route](https://forum.pritunl.com/t/how-to-configre-routes-e-g-disable-replacing-the-default-route/457/7):
>
> I’m using v1.3.3484.2 of the Pritunl Client on Ubuntun 22.04. I still don’t see an option to disable he default gateway. Was this option added? The GUI version of the client has this option. It would be great to include it in the CLI version. [image]

---

<div class="post-metadata">

**Author:** ![gdewey](https://forum.pritunl.com/user_avatar/forum.pritunl.com/gdewey/32/457_2.png) [@gdewey](https://forum.pritunl.com/u/gdewey)\
**Post date:** [June 4, 2023, 7:15am UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/10 "2023-06-04T07:15:39Z")

</div>

I tried 3 fresh new servers and the only way I could connect via WG was installing the wireguard-tools after the client install

there is other problem I was not able to solve, that is the **re-connect**. If you disable the tunnel, the client wont reconnect.

I gave up on this client. OpenVPN client is easy to install and reconnects very fast after connection drops. is not WG but works.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [June 4, 2023, 6:45pm UTC](https://forum.pritunl.com/t/pritunl-client-auto-start-on-ubuntu-server-22-04/1083/11 "2023-06-04T18:45:02Z")

</div>

The commands are similar to systemd. The enable/disable commands will control the auto start and start/stop commands activate or deactivate the connection.
