Deploy Wallabag | (Just Updated) Read-It-Later, Pocket Alternative With Admin Login Generated, Save Articles
Wallabag self-hosted read-it-later, Pocket alternative with API, Postgres
wallabag
Just deployed
/var/www/wallabag/data
database
Just deployed
/var/lib/postgresql
Deploy and Host Wallabag on Railway
Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the administrator login, the database credentials, the application secret and the OAuth API client are generated, the app cannot start without them, and the default wallabag / wallabag login that upstream ships is replaced before the web server accepts its first request. Wallabag is a self-hosted read-it-later application, an open-source alternative to Pocket and Instapaper: save articles from a URL or a browser extension, tag and annotate them, and read them offline through the web interface, the mobile apps or the REST API.
About Hosting Wallabag
This template runs two services: wallabag, the official Wallabag image (2.6.17) pinned by digest through a thin wrapper, with a volume at /var/www/wallabag/data that holds the site-credentials key and the downloaded article images; and database, a PostgreSQL 18 instance with a volume at /var/lib/postgresql that holds users, articles, tags, annotations and settings. One public domain serves the web interface and the API. nginx listens on Railway's injected PORT (8080), and GET /api/info answers 200 once the schema is installed.
What the wrapper fixes. Upstream installs a super-administrator named wallabag with the password wallabag, and it serves requests while that login still works. The wrapper keeps nginx down until the bootstrap has replaced that password with the generated ADMIN_PASSWORD and created the OAuth API client from API_CLIENT_ID and API_CLIENT_SECRET, so no request is served while the default login is valid. Public registration stays closed (allowed_registration is false in /api/info). Railway mounts volumes owned by root, so the wrapper creates the data layout and hands it to upstream's user, and it moves the article image directory onto the volume. It maps the service variables onto upstream's entrypoint, refuses to start without a 12-character admin password, a 32-character application secret and database credentials, and runs the schema migrations on every boot.
Using it. Open the domain and sign in as wallabag with ADMIN_PASSWORD. Create your own user in the settings if you want a different name, install the browser extension or the mobile app, and point it at the domain with the API client from API_CLIENT_ID (client id 1_ plus that value) and API_CLIENT_SECRET. Mail (password resets, confirmations) is off by default; add a SYMFONY__ENV__MAILER_DSN variable to enable it.
Agent contract
- Public URL:
https://$RAILWAY_PUBLIC_DOMAIN(the generated domain of thewallabagservice) - Private URL:
http://wallabag.railway.internal:8080 - Credentials: the variables
ADMIN_PASSWORD,API_CLIENT_IDandAPI_CLIENT_SECRETon thewallabagservice (the admin user iswallabag, the OAuth client id is1_plusAPI_CLIENT_ID) - Auth:
POST /oauth/v2/tokenwithgrant_type=password,client_id,client_secret,usernameandpasswordreturns anaccess_token; send it asAuthorization: Bearer $TOKENon every/api/call - Health:
GET /api/inforeturns 200 without credentials - Refusals: a write with no credential is refused,
write without key: 401, and public sign-up is closed,public signup: 404
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, ADMIN_PASSWORD, API_CLIENT_ID, API_CLIENT_SECRET (variables of the wallabag service); also curl.
R="https://$RAILWAY_PUBLIC_DOMAIN"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/api/info")" = 200 ]; do n=$((n+1)); [ "$n" -le 90 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/api/info"
# the OAuth client and the admin login (user wallabag) are created at boot; the client id is 1_ plus API_CLIENT_ID
T=$(curl -s -X POST "$R/oauth/v2/token" -d grant_type=password -d client_id="1_$API_CLIENT_ID" -d client_secret="$API_CLIENT_SECRET" -d username=wallabag --data-urlencode "password=$ADMIN_PASSWORD" | sed -n 's/.*"access_token":"\([^"]*\)".*/\1/p')
if [ -n "$T" ]; then echo "token: ok"; else echo "token: none"; fi
# write-auth: saving an article with the bearer token succeeds, the same call with no credential is refused
curl -s -o /dev/null -w "write with key: %{http_code}\n" -X POST "$R/api/entries.json" -H "Authorization: Bearer $T" -d "url=https://example.com/agent-check-$$"
curl -s -o /dev/null -w "write without key: %{http_code}\n" -X POST "$R/api/entries.json" -d "url=https://example.com/anonymous"
# signup: public registration is closed, the register route does not exist for a stranger
curl -s -o /dev/null -w "public signup: %{http_code}\n" -X POST "$R/register" -d "fos_user_registration_form[email]=stranger@example.org"
Expected output against a fresh deploy:
health: 200
token: ok
write with key: 200
write without key: 401
public signup: 404
The refusals are the contract: a write without the token answers 401, and a registration attempt from a stranger answers 404 because registration is closed.
Why Deploy Wallabag on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Wallabag on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
- Agent-ready - no deployer fields, a contract block, and one script that proves the app is healthy, a stranger is refused, and the generated login can write through the API.
- No default login - upstream's
wallabag/wallabagadministrator is replaced before the first request is served. - Data survives redeploys - articles in PostgreSQL on a volume, the credentials key and images on a volume.
- Migrations run - the schema is migrated on every boot, so an image bump upgrades the database.
- Pinned - the upstream image is pinned by digest and the wrapper by tag and digest.
Common Use Cases
- A private Pocket or Instapaper replacement - save articles from any browser and keep them on infrastructure you control.
- An agent-readable reading list - let an AI agent save, tag and fetch articles through the REST API.
- Research archive - keep full-text copies of pages, with tags and annotations, that survive link rot.
Dependencies for Wallabag Hosting
- The wallabag service and a PostgreSQL service, each with its volume, created by the template.
Deployment Dependencies
Template Content
database
postgres:18-alpine