Suppose we have a custom domain name called, configured and ready to use with LocalXpose (see previous create custom domain), now it is time to use it on raspberry pi.

1. SSH into the raspberry pi

ssh pi@

2. Download LocalXpose


3. Unzip LocalXpose


5. Create a unit file

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

ExecStart=/home/pi/loclx tunnel http --reserved-domain --to 8000

Replace the domain and the port with yours.

6. Copy the service file to system directory

sudo cp localxpose.service /etc/systemd/system/

7. Reload the systemd manager

sudo systemctl daemon-reload

8. Login through the CLI

sudo ./loclx account login

will ask you to enter your access token which you can get from your dashboard (opens in a new tab)

9. Enable the service to be run on boot

sudo systemctl enable localxpose.service

10. Run LocalXpose service

sudo systemctl start localxpose.service

© xLab 2023. All Rights Reserved