Access your Raspberry Pi remotely
This tutorial will explain how to install LocalXpose in your raspberry pi and enable it on boot and access your services anytime anywhere.
Suppose we have a custom domain name called pi.xtestgo.xyz, configured and ready to use with LocalXpose (see previous create custom domain), now it is time to use it on raspberry pi.
wget https://api.localxpose.io/api/v2/downloads/loclx-linux-arm.zip
unzip loclx-linux-arm.zip
To keep LocalXpose running in the background and on boot, we need to create a unit file
nano localxpose.service
paste the following and save it
[Unit]
Description=localxpose
After=network-online.target
[Service]
ExecStart=/home/pi/loclx tunnel http --reserved-domain pi.xtestgo.xyz --to 8000
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target
Replace the domain and the port with yours.
sudo cp localxpose.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo ./loclx account login
will ask you to enter your access token which you can get from your dashboard https://localxpose.io/dashboard
sudo systemctl enable localxpose.service
sudo systemctl start localxpose.service