Skip to main content
Version: Current (Latest)

Connecting to a Server

The DockWallet Android app supports two modes: server-connected sync mode and standalone local mode. The mode is chosen during the initial onboarding and can be changed at any time from the settings.


First Launch – Onboarding

When the app is opened for the first time, the onboarding screen appears with two options.

Connect to server: syncs passes with a self-hosted DockWallet instance. Passes are stored on the server and kept in sync across all connected devices.

Use locally only: stores passes only on the device using a local Room database. No server required, no sync.


Connecting to a Server

Tap Connect to server to open the connection form. Three fields are required:

FieldDescription
Server URLThe full URL of your DockWallet backend, e.g. http://192.168.1.100:8080
UsernameYour DockWallet username or email
PasswordYour DockWallet password

Tap Connect & Sign In. The app will contact the server, authenticate, and store the JWT token securely in EncryptedSharedPreferences. On success, the app registers the device with the server to enable sync tracking.

note

The server URL does not need a trailing slash. The app adds /api/ automatically.


Switching Modes Later

Both modes can be changed from Settings at any time.

From local to server: tap Connect to server in the Server section. This opens the onboarding form again. After a successful login, existing local passes remain on the device and are merged with the next sync.

From server to local: tap Disconnect in the Server section. A confirmation dialog appears. After disconnecting, the JWT token is deleted and the app switches to local mode. Passes that were previously synced to the device remain in the local database.


Logging Out

Tap Sign out in the Settings under Account. This deletes the stored token and returns to the login screen. The device is removed from the server's registered device list on next sync.


Importing .pkpass Files

The app registers as a handler for .pkpass files. Opening a .pkpass file from any app — a file manager, email client, browser, or share sheet — will automatically import it into DockWallet. In server mode, the pass is uploaded to the server immediately. In local mode, it is stored only on the device.

The app handles both the application/vnd.apple.pkpass MIME type and any file with a .pkpass extension opened via a content URI.