How to make tunnel persistent at boot? #150
Replies: 3 comments 2 replies
-
|
Hi @msanaullahsahar glad you are happily using loophole :) The loophole cli itself is not a service. As you mention, it is just a binary for starting tunnels ad hoc. So when you want some binary to be executed with every boot of your raspi, you need to set up a system service. I guess you use something like raspbian on you pi which is using In your case the file could look roughly like this (did not test the file): [Unit]
Description=Loophole
After=network-online.target
[Service]
ExecStart=./loophole http 80 --hostname mytestwebsite
WorkingDirectory=/home/pi/loophole
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
[Install]
WantedBy=multi-user.targetSave this file as e.g. |
Beta Was this translation helpful? Give feedback.
-
|
Ok. I replaced I am stuck due to my limited knowledge of linux. |
Beta Was this translation helpful? Give feedback.
-
|
Or you could just add the line @reboot /home/pi/loophole/loophole http 80 --hostname mytestwebsite > /dev/null 2>&1 to your crontab. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am using loophole to access my test website hosted on my raspberry pi. I am using these two commands to expose my website.
cd home/pi/loophole./loophole http 80 --hostname mytestwebsiteThis works fine and i am able to access my website at the generated url until my raspberry pi does not get restart. So how can i make this persistent to eliminate the need of running this code again and again at every boot?
Beta Was this translation helpful? Give feedback.
All reactions