[GH-ISSUE #243] How to setup Shiori on a Raspberry Pi #180

Closed
opened 2026-02-25 23:33:38 +03:00 by kerem · 17 comments
Owner

Originally created by @szethh on GitHub (Apr 22, 2020).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/243

How can I install in a Raspberry Pi?
I've tried building from source using Go. No luck. I also tried building the dockerfile provided, as well as this modification by 5hay. Neither worked.

Does anyone know how to install it on Raspbian?

Originally created by @szethh on GitHub (Apr 22, 2020). Original GitHub issue: https://github.com/go-shiori/shiori/issues/243 How can I install in a Raspberry Pi? I've tried building from source using Go. No luck. I also tried building the dockerfile provided, as well as [this modification](https://gist.github.com/5hay/a97816bd9da723a9d6dabdc7f816eea7) by 5hay. Neither worked. Does anyone know how to install it on Raspbian?
kerem 2026-02-25 23:33:38 +03:00
Author
Owner

@NoverNobida commented on GitHub (Apr 22, 2020):

Maybe you can pull docker images(such as radhifadlillah/shiori) directly?

<!-- gh-comment-id:617921543 --> @NoverNobida commented on GitHub (Apr 22, 2020): Maybe you can pull docker images(such as `radhifadlillah/shiori`) directly?
Author
Owner

@szethh commented on GitHub (Apr 22, 2020):

So I tried to pull the image with docker pull radhifadlillah/shiori and then run it with docker run --publish 80:80 --name shiori radhifadlillah/shiori, but it returns standard_init_linux.go:211: exec user process caused "exec format error"

When running docker ps -a it shows that the last command was /usr/bin/dumb-init -- /usr/local/bin/shiori serve.

<!-- gh-comment-id:617934479 --> @szethh commented on GitHub (Apr 22, 2020): So I tried to pull the image with `docker pull radhifadlillah/shiori` and then run it with `docker run --publish 80:80 --name shiori radhifadlillah/shiori`, but it returns `standard_init_linux.go:211: exec user process caused "exec format error"` When running `docker ps -a` it shows that the last command was `/usr/bin/dumb-init -- /usr/local/bin/shiori serve`.
Author
Owner

@Pixtriks commented on GitHub (Apr 22, 2020):

Yeah that's because the image has only been built for amd64. You can build it yourself using the Dockerfile which will result in an arm image.

<!-- gh-comment-id:618025445 --> @Pixtriks commented on GitHub (Apr 22, 2020): Yeah that's because the image has only been built for amd64. You can build it yourself using the Dockerfile which will result in an arm image.
Author
Owner

@szethh commented on GitHub (Apr 23, 2020):

I've already tried that. Not working :/

<!-- gh-comment-id:618593444 --> @szethh commented on GitHub (Apr 23, 2020): I've already tried that. Not working :/
Author
Owner

@veverkap commented on GitHub (May 5, 2020):

I've also tried to build locally on a Pi 4 32bit using the Dockerfile and I get this error:

github.com/spf13/pflag (download)
Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1
Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200)
get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1
get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag
github.com/go-sql-driver/mysql (download)
github.com/lib/pq (download)
github.com/mattn/go-sqlite3 (download)
github.com/shurcooL/vfsgen (download)
github.com/shurcooL/httpfs (download)
src/github.com/RadhiFadlillah/shiori/main.go:6:2: use of internal package not allowed
The command '/bin/sh -c go get -d -v github.com/RadhiFadlillah/shiori' returned a non-zero code: 1
<!-- gh-comment-id:623800970 --> @veverkap commented on GitHub (May 5, 2020): I've also tried to build locally on a Pi 4 32bit using the Dockerfile and I get this error: ```bash github.com/spf13/pflag (download) Fetching https://golang.org/x/crypto/ssh/terminal?go-get=1 Parsing meta tags from https://golang.org/x/crypto/ssh/terminal?go-get=1 (status code 200) get "golang.org/x/crypto/ssh/terminal": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/ssh/terminal?go-get=1 get "golang.org/x/crypto/ssh/terminal": verifying non-authoritative meta tag github.com/go-sql-driver/mysql (download) github.com/lib/pq (download) github.com/mattn/go-sqlite3 (download) github.com/shurcooL/vfsgen (download) github.com/shurcooL/httpfs (download) src/github.com/RadhiFadlillah/shiori/main.go:6:2: use of internal package not allowed The command '/bin/sh -c go get -d -v github.com/RadhiFadlillah/shiori' returned a non-zero code: 1 ```
Author
Owner

@microcreators commented on GitHub (May 5, 2020):

I have built it on arm7 (RPi3). A standalone bin. What's wrong?

<!-- gh-comment-id:624204585 --> @microcreators commented on GitHub (May 5, 2020): I have built it on arm7 (RPi3). A standalone bin. What's wrong?
Author
Owner

@veverkap commented on GitHub (May 5, 2020):

I'm trying to build using the Dockerfile - I'm not compiling directly on the RPI - I don't even have go installed on the PI

<!-- gh-comment-id:624206432 --> @veverkap commented on GitHub (May 5, 2020): I'm trying to build using the Dockerfile - I'm not compiling directly on the RPI - I don't even have go installed on the PI
Author
Owner

@microcreators commented on GitHub (May 5, 2020):

Apologies, can't help with docker. But for @MateoPeri , you need a newer go version than in raspbian repos (assuming you use it). After that, building wen smooth. I'm ongo1.14.1 linux/arm
Also:
https://github.com/go-shiori/shiori/issues/234#issue-586315408

<!-- gh-comment-id:624308622 --> @microcreators commented on GitHub (May 5, 2020): Apologies, can't help with docker. But for @MateoPeri , you need a newer go version than in raspbian repos (assuming you use it). After that, building wen smooth. I'm on`go1.14.1 linux/arm` Also: https://github.com/go-shiori/shiori/issues/234#issue-586315408
Author
Owner

@lapwat commented on GitHub (Aug 11, 2020):

Try to replace the Dockerfile with this one:

# build stage
FROM golang:alpine AS builder
RUN apk add --no-cache build-base
WORKDIR /src
COPY . .
RUN GOOS=linux GOARCH=arm GOARM=5 go build

# server image
FROM golang:alpine
COPY --from=builder /src/shiori /usr/local/bin/
ENV SHIORI_DIR /srv/shiori/
EXPOSE 8080
CMD ["/usr/local/bin/shiori", "serve"]

Build and run:

docker build -t shiori .
docker run -p 4444:8080 shiori

It should build for Raspberry and be available at http://localhost:4444

<!-- gh-comment-id:672339513 --> @lapwat commented on GitHub (Aug 11, 2020): Try to replace the Dockerfile with this one: ```Dockerfile # build stage FROM golang:alpine AS builder RUN apk add --no-cache build-base WORKDIR /src COPY . . RUN GOOS=linux GOARCH=arm GOARM=5 go build # server image FROM golang:alpine COPY --from=builder /src/shiori /usr/local/bin/ ENV SHIORI_DIR /srv/shiori/ EXPOSE 8080 CMD ["/usr/local/bin/shiori", "serve"] ``` Build and run: ```sh docker build -t shiori . docker run -p 4444:8080 shiori ``` It should build for Raspberry and be available at `http://localhost:4444`
Author
Owner

@clach04 commented on GitHub (Aug 16, 2020):

I have some notes in #268 too

<!-- gh-comment-id:674550585 --> @clach04 commented on GitHub (Aug 16, 2020): I have some notes in #268 too
Author
Owner

@tiagosvf commented on GitHub (Oct 8, 2020):

Try to replace the Dockerfile with this one:

# build stage
FROM golang:alpine AS builder
RUN apk add --no-cache build-base
WORKDIR /src
COPY . .
RUN GOOS=linux GOARCH=arm GOARM=5 go build

# server image
FROM golang:alpine
COPY --from=builder /src/shiori /usr/local/bin/
ENV SHIORI_DIR /srv/shiori/
EXPOSE 8080
CMD ["/usr/local/bin/shiori", "serve"]

Build and run:

docker build -t shiori .
docker run -p 4444:8080 shiori

It should build for Raspberry and be available at http://localhost:4444

@lapwat

Running image built from that Dockerfile gives me

panic: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

goroutine 1 [running]:
github.com/jmoiron/sqlx.MustConnect(...)
        /go/pkg/mod/github.com/jmoiron/sqlx@v1.2.0/sqlx.go:650
github.com/go-shiori/shiori/internal/database.OpenSQLiteDatabase(0x101bbc0, 0x15, 0x0, 0x0, 0x0)
        /src/internal/database/sqlite.go:23 +0x384
github.com/go-shiori/shiori/internal/cmd.openSQLiteDatabase(0x575b8c, 0xb, 0x0, 0x0)
        /src/internal/cmd/root.go:116 +0x70
github.com/go-shiori/shiori/internal/cmd.openDatabase(0x101a04b, 0xc, 0x1ff, 0x0)
        /src/internal/cmd/root.go:110 +0x74
github.com/go-shiori/shiori/internal/cmd.preRunRootHandler(0x1089180, 0xa64eb8, 0x0, 0x0)
        /src/internal/cmd/root.go:63 +0x174
github.com/spf13/cobra.(*Command).execute(0x1089180, 0xa64eb8, 0x0, 0x0, 0x1089180, 0xa64eb8)
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:810 +0x17c
github.com/spf13/cobra.(*Command).ExecuteC(0x1088640, 0x0, 0x0, 0x46ae8)
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x238
github.com/spf13/cobra.(*Command).Execute(...)
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main()
        /src/main.go:19 +0x18
<!-- gh-comment-id:705787871 --> @tiagosvf commented on GitHub (Oct 8, 2020): > > > Try to replace the Dockerfile with this one: > > ```dockerfile > # build stage > FROM golang:alpine AS builder > RUN apk add --no-cache build-base > WORKDIR /src > COPY . . > RUN GOOS=linux GOARCH=arm GOARM=5 go build > > # server image > FROM golang:alpine > COPY --from=builder /src/shiori /usr/local/bin/ > ENV SHIORI_DIR /srv/shiori/ > EXPOSE 8080 > CMD ["/usr/local/bin/shiori", "serve"] > ``` > > Build and run: > > ```shell > docker build -t shiori . > docker run -p 4444:8080 shiori > ``` > > It should build for Raspberry and be available at `http://localhost:4444` @lapwat Running image built from that Dockerfile gives me ``` panic: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub goroutine 1 [running]: github.com/jmoiron/sqlx.MustConnect(...) /go/pkg/mod/github.com/jmoiron/sqlx@v1.2.0/sqlx.go:650 github.com/go-shiori/shiori/internal/database.OpenSQLiteDatabase(0x101bbc0, 0x15, 0x0, 0x0, 0x0) /src/internal/database/sqlite.go:23 +0x384 github.com/go-shiori/shiori/internal/cmd.openSQLiteDatabase(0x575b8c, 0xb, 0x0, 0x0) /src/internal/cmd/root.go:116 +0x70 github.com/go-shiori/shiori/internal/cmd.openDatabase(0x101a04b, 0xc, 0x1ff, 0x0) /src/internal/cmd/root.go:110 +0x74 github.com/go-shiori/shiori/internal/cmd.preRunRootHandler(0x1089180, 0xa64eb8, 0x0, 0x0) /src/internal/cmd/root.go:63 +0x174 github.com/spf13/cobra.(*Command).execute(0x1089180, 0xa64eb8, 0x0, 0x0, 0x1089180, 0xa64eb8) /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:810 +0x17c github.com/spf13/cobra.(*Command).ExecuteC(0x1088640, 0x0, 0x0, 0x46ae8) /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x238 github.com/spf13/cobra.(*Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864 main.main() /src/main.go:19 +0x18 ```
Author
Owner

@lapwat commented on GitHub (Oct 12, 2020):

@tiagosvf
I thought it would work but it is not possible apparently: https://github.com/go-shiori/shiori/issues/254#issuecomment-670203877

<!-- gh-comment-id:707303243 --> @lapwat commented on GitHub (Oct 12, 2020): @tiagosvf I thought it would work but it is not possible apparently: https://github.com/go-shiori/shiori/issues/254#issuecomment-670203877
Author
Owner

@theryecatcher commented on GitHub (Dec 6, 2020):

Is this still an issue I have a fully functioning interface on RPi4 (arm64v8 running Ubuntu - but I don't think that matters). Didn't do anything just built the Dockerfile on the Pi and it was up.

<!-- gh-comment-id:739453291 --> @theryecatcher commented on GitHub (Dec 6, 2020): Is this still an issue I have a fully functioning interface on RPi4 (arm64v8 running Ubuntu - but I don't think that matters). Didn't do anything just built the Dockerfile on the Pi and it was up.
Author
Owner

@tiagosvf commented on GitHub (Dec 9, 2020):

@theryecatcher
There haven't been any commits since my last answer so this is still an issue

<!-- gh-comment-id:742069433 --> @tiagosvf commented on GitHub (Dec 9, 2020): @theryecatcher There haven't been any commits since my last answer so this is still an issue
Author
Owner

@jcm4atx commented on GitHub (Jan 19, 2021):

I'm running without any issues on my Pi. I used the Go installation, not Docker.

# Install Snap
sudo apt install -y snapd
# Install Go
sudo snap install go --classic
# Install Shiori
go get -u -v github.com/go-shiori/shiori
cd /home/pi/go/src/github.com/go-shiori/shiori && go build

I recommend adding this line to your .bash_aliases file.

alias shiori='/home/pi/go/src/github.com/go-shiori/shiori/shiori'

<!-- gh-comment-id:763171120 --> @jcm4atx commented on GitHub (Jan 19, 2021): I'm running without any issues on my Pi. I used the Go installation, not Docker. ``` # Install Snap sudo apt install -y snapd ``` ``` # Install Go sudo snap install go --classic ``` ``` # Install Shiori go get -u -v github.com/go-shiori/shiori cd /home/pi/go/src/github.com/go-shiori/shiori && go build ``` I recommend adding this line to your `.bash_aliases` file. `alias shiori='/home/pi/go/src/github.com/go-shiori/shiori/shiori'`
Author
Owner

@atsai1220 commented on GitHub (Feb 12, 2021):

This image worked for me on my rpi4. malitov/rpi-shiori

docker run -d  --rm --name shiori -p 8081:8080 -v $(pwd):/srv/shiori malitov/rpi-shiori

pi@raspberrypi:~/shiori $ docker ps
CONTAINER ID   IMAGE                                COMMAND                  CREATED              STATUS                PORTS                                            NAMES
a1c593682354   malitov/rpi-shiori                   "/usr/local/bin/shio…"   About a minute ago   Up About a minute     0.0.0.0:8081->8080/tcp                           shiori
<!-- gh-comment-id:778015381 --> @atsai1220 commented on GitHub (Feb 12, 2021): This image worked for me on my rpi4. `malitov/rpi-shiori` ``` docker run -d --rm --name shiori -p 8081:8080 -v $(pwd):/srv/shiori malitov/rpi-shiori pi@raspberrypi:~/shiori $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a1c593682354 malitov/rpi-shiori "/usr/local/bin/shio…" About a minute ago Up About a minute 0.0.0.0:8081->8080/tcp shiori ```
Author
Owner

@bonnebulle commented on GitHub (Dec 26, 2022):

It's amazing making it running on Raspberry !
Do anybody here know if https://hub.docker.com/r/malitov/rpi-shiori is up to date ?
Thanks

<!-- gh-comment-id:1365489387 --> @bonnebulle commented on GitHub (Dec 26, 2022): It's amazing making it running on Raspberry ! Do anybody here know if https://hub.docker.com/r/malitov/rpi-shiori is up to date ? Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#180
No description provided.