2016-04-18 11:00:29 +02:00
# What is wallabag?
2020-11-27 14:52:31 +01:00

2016-09-01 12:04:11 +02:00
[](https://hub.docker.com/r/wallabag/wallabag/)
[](https://hub.docker.com/r/wallabag/wallabag/)
2016-04-18 11:00:29 +02:00
[wallabag ](https://www.wallabag.org/ ) is a self hostable application for saving web pages. Unlike other services, wallabag is free (as in freedom) and open source.
With this application you will not miss content anymore. Click, save, read it when you want. It saves the content you select so that you can read it when you have time.
# How to use this image
Default login is `wallabag:wallabag` .
## Environment variables
- `-e MYSQL_ROOT_PASSWORD=...` (needed for the mariadb container to initialise and for the entrypoint in the wallabag container to create a database and user if its not there)
2019-05-24 22:16:19 +02:00
- `-e POSTGRES_PASSWORD=...` (needed for the postgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
2016-08-24 18:25:03 +02:00
- `-e POSTGRES_USER=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
2016-04-18 11:00:29 +02:00
- `-e SYMFONY__ENV__DATABASE_DRIVER=...` (defaults to "pdo_sqlite", this sets the database driver to use)
- `-e SYMFONY__ENV__DATABASE_HOST=...` (defaults to "127.0.0.1", if use mysql this should be the name of the mariadb container)
- `-e SYMFONY__ENV__DATABASE_PORT=...` (port of the database host)
- `-e SYMFONY__ENV__DATABASE_NAME=...` (defaults to "symfony", this is the name of the database to use)
- `-e SYMFONY__ENV__DATABASE_USER=...` (defaults to "root", this is the name of the database user to use)
- `-e SYMFONY__ENV__DATABASE_PASSWORD=...` (defaults to "~", this is the password of the database user to use)
2018-08-12 08:45:44 -04:00
- `-e SYMFONY__ENV__DATABASE_CHARSET=...` (defaults to utf8, this is the database charset to use)
2016-04-18 11:00:29 +02:00
- `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
2019-02-27 11:15:10 +01:00
- `-e SYMFONY__ENV__LOCALE=...` (default to en)
2018-11-24 21:57:13 +01:00
- `-e SYMFONY__ENV__MAILER_HOST=...` (defaults to "127.0.0.1", the SMTP host)
2016-06-11 15:43:04 +02:00
- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user)
- `-e SYMFONY__ENV__MAILER_PASSWORD=...` (defaults to "~", the SMTP password)
2019-12-03 16:44:19 -08:00
- `-e SYMFONY__ENV__FROM_EMAIL=...` (defaults to "`wallabag@example.com` ", the address wallabag uses for outgoing emails)
2020-04-14 21:53:34 +02:00
- `-e SYMFONY__ENV__TWOFACTOR_AUTH=...` (defaults to "true", enable or disable two-factor authentication)
- `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org` ", the address wallabag uses for two-factor emails)
2016-11-02 11:57:04 +01:00
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...` (defaults to "true", enable or disable public user registration)
2017-12-15 14:32:20 +01:00
- `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...` (defaults to "true", enable or disable registration confirmation)
2019-12-03 16:44:19 -08:00
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-url-instance.com` ", the URL of your wallabag instance)
2018-12-07 22:42:18 -05:00
- `-e SYMFONY__ENV__REDIS_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http))
- `-e SYMFONY__ENV__REDIS_HOST=...` (defaults to "redis", IP or hostname of the target server)
- `-e SYMFONY__ENV__REDIS_PORT=...` (defaults to "6379", port of the target host)
- `-e SYMFONY__ENV__REDIS_PATH=...` (defaults to "~", path of the unix socket file)
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
2019-06-18 19:50:50 +02:00
- `-e SYMFONY__ENV__SENTRY_DSN=...` (defaults to "~", this is the data source name for sentry)
2017-01-16 22:44:43 +01:00
- `-e POPULATE_DATABASE=...` (defaults to "True". Does the DB has to be populated or is it an existing one)
2016-04-18 11:00:29 +02:00
2016-08-24 15:17:36 +02:00
## SQLite
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
2016-04-18 11:00:29 +02:00
```
2016-08-24 12:33:22 +02:00
$ docker run -p 80:80 wallabag/wallabag
2016-04-18 11:00:29 +02:00
```
2016-10-11 12:08:50 +02:00
and point your browser to `http://localhost:80` . For persistent storage you should start the container with a volume:
2016-04-18 11:00:29 +02:00
```
2018-02-09 20:23:10 -06:00
$ docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 wallabag/wallabag
2016-04-18 11:00:29 +02:00
```
2016-08-24 15:17:36 +02:00
## MariaDB / MySQL
2016-04-18 11:00:29 +02:00
2016-08-24 15:17:36 +02:00
For using MariaDB or MySQL you have to define some environment variables with the container. Example:
2016-04-18 11:00:29 +02:00
```
2016-09-17 01:04:01 +02:00
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
2018-08-12 08:45:44 -04:00
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -p 80:80 wallabag/wallabag
2016-04-25 12:15:07 +02:00
```
2016-08-24 15:17:36 +02:00
## PostgreSQL
2016-04-25 12:15:07 +02:00
2016-08-24 15:17:36 +02:00
For using PostgreSQL you have to define some environment variables with the container. Example:
2016-04-25 12:15:07 +02:00
```
2017-12-13 22:32:43 +01:00
$ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d postgres:9.6
2020-12-10 16:04:00 +01:00
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 wallabag/wallabag
2016-04-18 11:00:29 +02:00
```
2016-10-05 12:57:15 +02:00
## Redis
2018-12-07 22:44:48 -05:00
To use redis with a Docker link, a redis container with the name `redis` is needed and none of the `REDIS` environmental variables are needed:
2016-10-05 12:57:15 +02:00
```
2016-10-13 11:18:24 +02:00
$ docker run -p 6379:6379 --name redis redis:alpine
2016-10-05 12:57:15 +02:00
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
```
2018-12-07 22:42:18 -05:00
To use redis with an external redis host, set the appropriate environmental variables. Example:
```
$ docker run -p 80:80 -e "SYMFONY__ENV__REDIS_HOST=my.server.hostname" -e "SYMFONY__ENV__REDIS_PASSWORD=my-secret-pw" wallabag/wallabag
```
2017-01-31 16:33:19 +01:00
## Upgrading
2016-10-11 16:18:33 +02:00
2017-01-31 16:33:19 +01:00
If there is a version upgrade that needs a database migration. The most easy way to do is running the `migrate` command:
2016-10-11 16:18:33 +02:00
```
2017-01-31 16:33:19 +01:00
$ docker run --link wallabag-db:wallabag-db -e < ... your config variables here . . . > wallabag/wallabag migrate
```
Or you can start the container with the new image and run the migration command manually:
```
$ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
2016-10-11 16:18:33 +02:00
```
2016-04-18 11:00:29 +02:00
## docker-compose
2016-04-21 15:50:09 +02:00
It's a good way to use [docker-compose ](https://docs.docker.com/compose/ ). Example:
2016-04-18 11:00:29 +02:00
```
2017-02-20 12:38:51 +01:00
version: '3'
2016-04-18 11:00:29 +02:00
services:
wallabag:
2016-04-25 12:15:07 +02:00
image: wallabag/wallabag
2016-04-18 11:00:29 +02:00
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
2018-08-12 08:45:44 -04:00
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
2016-06-11 15:43:04 +02:00
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example .com
2019-12-03 16:44:19 -08:00
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com
2016-04-18 11:00:29 +02:00
ports:
- "80"
2017-05-30 11:19:31 +02:00
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
2016-04-18 11:00:29 +02:00
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
2017-05-30 11:19:31 +02:00
- /opt/wallabag/data:/var/lib/mysql
2016-10-05 12:57:15 +02:00
redis:
image: redis:alpine
2016-04-18 11:00:29 +02:00
```
2016-08-24 15:17:36 +02:00
2016-06-11 15:43:04 +02:00
Note that you must fill out the mail related variables according to your mail config.
2016-04-18 11:00:29 +02:00
## nginx
I use nginx to make wallabag public available. This is a example how to use it:
```
server {
listen 443;
server_name wallabag.foo.bar;
ssl on;
ssl_certificate /etc/letsencrypt/live/wallabag.foo.bar/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wallabag.foo.bar/privkey.pem;
location / {
proxy_pass http://wallabag;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
```
2017-01-17 16:01:20 +01:00
2017-01-23 09:45:42 +01:00
## Import worker
2017-01-17 16:01:20 +01:00
2019-10-30 17:25:17 +01:00
To run the [async redis import worker ](https://doc.wallabag.org/en/admin/asynchronous.html#install-redis-for-asynchronous-tasks ) use the following command:
2017-01-17 16:01:20 +01:00
```
$ docker run --name wallabag --link wallabag-db:wallabag-db --link redis:redis -e < ... your config variables here . . . > wallabag/wallabag import < type >
```
2017-01-23 09:45:42 +01:00
Where `<type>` is one of pocket, readability, instapaper, wallabag_v1, wallabag_v2, firefox or chrome.