PTGBastion

The BASTION app

Connect to a server

Link the app to your website account, your own server, or a PTG library.

Where servers live in the app

Open Sync. Under SERVERS, choose + Add Server. This opens the SERVER PROFILE form.

You can save several servers. One of them is the default: it is the one Sync Now and scheduled auto-sync use.

Connect to your website account

  1. On the website, open Devices and create a device token. A QR code appears. See Connect a device.
  2. In the app, open Sync, then + Add Server.
  3. Tap Scan setup code at the top of the form and scan the QR code. The first time, Android asks for camera access.
  4. The form fills itself in. Review it and choose Save Server.

If the app says "That QR isn't a BASTION setup code", you scanned something else. Scan the code on the Devices page.

Connect to your own server

Enter the fields by hand, from the connection card your server's admin tool printed. See Run your own server.

Field What to enter
SERVER NAME Anything that helps you recognise it
Protocol SFTP for a self-hosted server. HTTPS (BASTION server) is for a hosted BASTION server such as this website.
Host The server's address
Port Filled in when you pick the protocol: 22 for SFTP, 443 for HTTPS. Change it to match your card; a port you type is kept. A server set up from the server kit uses 2222.
Username The account name on the card
Remote root path The path on the card
Method Password, or Private Key with the key file's path and an optional passphrase

Turn on Default server if this is the one you sync with most, then choose Save Server.

The user name and the root path are case-sensitive. Type them exactly as they are on the card.

The protocol list also offers FTPS. It does not work in this version, so don't choose it.

Trusting your server the first time

On the first sync with an SFTP server, the app shows Verify Server Identity with the server's key fingerprint.

  1. Compare the fingerprint with the one on your connection card.
  2. If they match, choose Trust & Sync.

The app remembers the key. If the server later presents a different one, the sync stops with SERVER KEY MISMATCH. That is the app protecting you from connecting to the wrong machine.

If you know the key changed for a good reason, such as a rebuilt server, delete the server in the app and add it again.

The folders the app looks for

Under the root path, the app expects these folders. Names are lowercase.

Folder What it holds
library/ Books and documents: PDF, EPUB, MOBI, TXT. Folders inside it become categories.
maps/ Map packs (.mbtiles) and overlays from other tools (.kml, .kmz, .geojson, .cot)
annotations/ Drawing layers written by BASTION
waypoints/ Waypoints written by BASTION
apps/ App installers (.apk)
config/ App configuration files
reports/ Assistance reports, uploaded by the app

A file from another tool placed in annotations/ or waypoints/ is refused. Overlays from other tools go in maps/.

The link Don't see the files you expect? at the bottom of the form shows this layout in the app.

Add a PTG library

A PTG curated library is added with the same Scan setup code button, using the QR code from PTG library access on the website's Devices page.

It appears as its own server card marked READ-ONLY. Its button is Pull library content. It only downloads; it never uploads anything.

Reading a server card

Each saved server shows as a card on the Sync screen with:

  • its name, and a DEFAULT badge on the default one;
  • how it connects, for example "HTTPS (BASTION server) · user@host:443";
  • Secured by TLS certificate for an HTTPS server, or the key status for an SFTP server;
  • its own sync button, and an Edit button.

To remove a server, edit it and choose Delete Server. The app asks you to confirm, because the stored password goes with it.

Where your password is kept

Passwords and tokens are kept in the device's protected credential store, not in the server profile.