# Self-host Wallabag with Postgres

> A read it later app that saves web articles in a clean, distraction free format, with its data kept in a bundled Postgres database instead of SQLite. The default login is wallabag with the password wallabag, change it first.

- Page: https://levelrail.com/templates/wallabag-postgres/
- JSON: https://levelrail.com/templates/wallabag-postgres.json
- Category: Productivity
- Licence: MIT (Permissive license)
- Source: https://github.com/wallabag/wallabag
- Upstream docs: https://doc.wallabag.org/

## Requirements
- Memory: about 512 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 17.11-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 17.11-alpine | none | pgdata -> /var/lib/postgresql/data |
| wallabag | wallabag/wallabag | 2.6.15 | 80 | wallabag_images -> /var/www/wallabag/web/assets/images |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| wallabag | SYMFONY__ENV__DATABASE_CHARSET | preset |
| wallabag | SYMFONY__ENV__DATABASE_DRIVER | preset |
| wallabag | SYMFONY__ENV__DATABASE_HOST | preset |
| wallabag | SYMFONY__ENV__DATABASE_NAME | preset |
| wallabag | SYMFONY__ENV__DATABASE_PASSWORD | generated |
| wallabag | SYMFONY__ENV__DATABASE_PORT | preset |
| wallabag | SYMFONY__ENV__DATABASE_USER | preset |
| wallabag | SYMFONY__ENV__DOMAIN_NAME | preset |
| wallabag | SYMFONY__ENV__FOSUSER_REGISTRATION | preset |
| wallabag | SYMFONY__ENV__SECRET | generated |

## Deploy

### CLI

```bash
levelrail-cli templates install wallabag-postgres --name my-wallabag-postgres
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/wallabag-postgres/install \
  -d '{
    "name": "my-wallabag-postgres"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## First run
1. Sign in as wallabag with the password wallabag, then change the password under your profile.

## Questions

### Can I deploy Wallabag with Postgres on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Wallabag with Postgres, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:17.11-alpine, wallabag/wallabag:2.6.15 is what you deploy there.

Self-host Wallabag with Postgres, Wallabag with Postgres docker compose file, deploy Wallabag with Postgres on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
