Installation Issues - Possibly Related to Documentation Confusion, or headless machine use?
I've tried on two machines and one proxmox container, but have not been able to install the rmfakecloud server yet.
Git clone:
(base) root@server:/root# cd /src/
(base) root@server:/src# git clone https://github.com/ddvk/rmfakecloud
Cloning into 'rmfakecloud'...
remote: Enumerating objects: 3261, done.
remote: Counting objects: 100% (1278/1278), done.
remote: Compressing objects: 100% (773/773), done.
remote: Total 3261 (delta 746), reused 822 (delta 424), pack-reused 1983
Receiving objects: 100% (3261/3261), 5.85 MiB | 6.92 MiB/s, done.
Resolving deltas: 100% (1834/1834), done.
(base) root@server:/src# cd rmfakecloud/
(base) root@server:/src/rmfakecloud# ls
azure-pipelines.yml dev.sh Dockerfile docs go.sum LICENSE mkdocs.yml README.md test
cmd dockerbuild.sh Dockerfile.make go.mod internal Makefile other scripts ui
Documentation shows:
or make docker && ./rundocker.sh
source: https://ddvk.github.io/rmfakecloud/install/source/
(base) root@server:/src/rmfakecloud# make docker
make: *** No rule to make target 'docker'. Stop.
"Nope, that didn't work...." Did the repo clone as expected?"
(base) root@server:/src/rmfakecloud# ls
azure-pipelines.yml dev.sh Dockerfile docs go.sum LICENSE mkdocs.yml README.md test
cmd dockerbuild.sh Dockerfile.make go.mod internal Makefile other scripts ui
"That looks good... Okay, maybe another way.. 'dockerbuild.sh sounds like a winner?"
(base) root@server:/src/rmfakecloud# ./dockerbuild.sh
Sending build context to Docker daemon 8.984MB
Step 1/16 : ARG VERSION=0.0.0
Step 2/16 : FROM node:alpine as uibuilder
alpine: Pulling from library/node
97518928ae5f: Pull complete
a2af70dcde7d: Pull complete
80e05fd95fdd: Pull complete
1391c8a04394: Pull complete
Digest: sha256:4522cc108ad7c055b71f545596bfc07632d9f9a41125ea12eabe8f04114807f3
Status: Downloaded newer image for node:alpine
---> e32df7d6c22c
Step 3/16 : WORKDIR /src
---> Running in 610772e0ce42
Removing intermediate container 610772e0ce42
---> 7d45b29292e3
Step 4/16 : COPY ui .
---> f373974af1c9
Step 5/16 : RUN yarn && yarn build
---> Running in eafc1dfdb4ab
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.1".
warning " > [email protected]" has unmet peer dependency "prop-types@>=15.5.10".
warning "react-pdf > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "react-pdf > [email protected]" has unmet peer dependency "worker-loader@^3.0.7".
warning " > [email protected]" has unmet peer dependency "@babel/runtime@>=7.0.0".
warning " > [email protected]" has unmet peer dependency "@emotion/styled@^10.0.10".
warning " > [email protected]" has unmet peer dependency "prop-types@>=15.7.2".
warning "react-treebeard > [email protected]" has incorrect peer dependency "react@^15.3.0 || ^16.0.0".
warning "react-treebeard > [email protected]" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0".
warning " > @testing-library/[email protected]" has unmet peer dependency "@testing-library/dom@>=7.21.4".
[4/4] Building fresh packages...
Done in 47.21s.
yarn run v1.22.17
$ react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (/src/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/src/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/src/node_modules/webpack/lib/NormalModule.js:471:10)
at /src/node_modules/webpack/lib/NormalModule.js:503:5
at /src/node_modules/webpack/lib/NormalModule.js:358:12
at /src/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/src/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/src/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /src/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at runSyncOrAsync (/src/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at iterateNormalLoaders (/src/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/src/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/src/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /src/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/src/node_modules/react-scripts/scripts/build.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at module.exports (/src/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/src/node_modules/webpack/lib/NormalModule.js:417:16)
at /src/node_modules/webpack/lib/NormalModule.js:452:10
at /src/node_modules/webpack/lib/NormalModule.js:323:13
at /src/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /src/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/src/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /src/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v17.3.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn && yarn build' returned a non-zero code: 1
"Dang, that didn't work either... 'dev.sh' maybe?"
(base) root@server:/src/rmfakecloud# ./dev.sh
/src/rmfakecloud /src/rmfakecloud
./dev.sh: line 11: entr: command not found
/src/rmfakecloud
"Not that either... The docs say just make might work?"
(base) root@server:/src/rmfakecloud# make
mkdir -p ui/node_modules
yarn --cwd ui
make: yarn: No such file or directory
make: *** [Makefile:52: ui/yarn.lock] Error 127
"Okay, this is getting frustrating."
This is the exact same on multiple machines, ubuntu *2 and debian *1.
Is the rmfakecloud server meant to be installed on reMarkable hardware perhaps? (This seems unlikely?)
Any help that can be offered would be greatly appreciated!
Edit: I forgot to mention, I am attempting to install on headless machines, but that shouldn't be an issue, correct?
I think you're right, this is a docs issue. I don't know anything about the docker container, but you can try two things:
- The last error (
make: yarn: No such file or directory) would suggest thatyarnis not installed. Check out yarnpkg.com to install it. If that fixes it, then this is a problem with the docs. - Then, rather than just running
make, try runningmake container. Thedockertarget in the Makefile seems to have been renamed tocontainer: https://github.com/ddvk/rmfakecloud/blob/289c0d44f058c2f7b5b34a715281e64f31b7c03b/Makefile#L27-L28
To answer your edit, headless makes no difference, I run this on a headless Raspberry Pi 4
I have an alpine container running in proxmox with this built. I'll open a PR to help simplify the build process at some point soon, as it did require a bit of tweaking.
For my own reference later, and anyone else running a debian flavour like ubuntu, this was the pathway for me, but there is not accounting for what I had installed already. Formal requirements.txt would go a long way! haha
apt install git npm build-essential
npm install --global yarn
git clone https://github.com/ddvk/rmfakecloud/
cd rmfakecloud
make
You also need go installed if you'd like to avoid using docker to build in a lxc container. I'll try to get that PR with more information opened later today.
I think this is more than just a documentation thing? On a clean git clone; running docker(-compose) build gives:
<snip>
Step 11/16 : RUN go generate ./... && CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -o rmfakecloud-docker ./cmd/rmfakecloud/
---> Running in 4558159e0d75
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/sirupsen/logrus v1.8.1
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading github.com/gin-gonic/gin v1.7.4
go: downloading github.com/golang-jwt/jwt v3.2.2+incompatible
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.0.3
go: downloading golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
go: downloading github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
go: downloading github.com/juruen/rmapi v0.0.16
go: downloading github.com/studio-b12/gowebdav v0.0.0-20211109083228-3f8721cd4b6f
go: downloading github.com/poundifdef/go-remarkable2pdf v0.2.0
go: downloading github.com/unidoc/unipdf/v3 v3.29.0
go: downloading github.com/golang-jwt/jwt/v4 v4.2.0
go: downloading github.com/juju/fslock v0.0.0-20160525022230-4d5c94c67b4b
go: downloading golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef
go: downloading github.com/gin-contrib/sse v0.1.0
go: downloading github.com/mattn/go-isatty v0.0.14
go: downloading github.com/go-playground/validator/v10 v10.9.0
go: downloading github.com/golang/protobuf v1.5.2
go: downloading github.com/ugorji/go v1.2.6
go: downloading github.com/ugorji/go/codec v1.2.6
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading google.golang.org/protobuf v1.27.1
go: downloading golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5
go: downloading github.com/go-playground/universal-translator v0.18.0
go: downloading github.com/leodido/go-urn v1.2.1
go: downloading golang.org/x/text v0.3.7
go: downloading github.com/jung-kurt/gofpdf v1.16.2
go: downloading golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
go: downloading github.com/go-playground/locales v0.14.0
go: downloading github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go: downloading github.com/satori/go.uuid v0.0.0-20180103174451-36e9d2ebbde5
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
go: downloading github.com/adrg/sysfont v0.1.2
go: downloading golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d
go: downloading github.com/unidoc/pkcs7 v0.1.0
go: downloading github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
go: downloading github.com/unidoc/unitype v0.2.1
go: downloading github.com/unidoc/timestamp v0.0.0-20200412005513-91597fd3793a
go: downloading github.com/stretchr/testify v1.7.0
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading github.com/adrg/xdg v0.3.4
go: downloading github.com/adrg/strutil v0.2.3
internal/ui/ui.go:15:2: //go:build comment without // +build comment
ERROR: Service 'rmfakecloud' failed to build: The command '/bin/sh -c go generate ./... && CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -o rmfakecloud-docker ./cmd/rmfakecloud/' returned a non-zero code: 1
what go version are you using? and what's your docker-compose
I don't have any locally installed go -- I'm doing it all within docker:
% git clone https://github.com/ddvk/rmfakecloud.git
% vim docker-compose.yml
% docker-compose up --build
This is my docker-compose:
version: '2.2'
services:
rmcloud:
build: ./rmfakecloud
user: "${UID}:${GID}"
environment:
- JWT_SECRET_KEY=<mysecretkey>
- STORAGE_URL=https://rmfakecloud.${DOMAIN}
- DATADIR=/data
- VIRTUAL_HOST=rmfakecloud.${DOMAIN},*.appspot.com,*.remarkable.com
- LETSENCRYPT_HOST=rmfakecloud.${DOMAIN}
- LETSENCRYPT_EMAIL=webmaster@${DOMAIN}
- CERT_NAME=rmfakecloud.${DOMAIN}
volumes:
- ./data:/data
restart: unless-stopped
Since you mentioned the version of go, I played around with the Dockerfile -- changing the version used in there fixes the problem:
https://github.com/ddvk/rmfakecloud/blob/a68e1d9db61b8f2f826d70a1ebf1b2c35f968736/Dockerfile#L7
Replacing with:
FROM golang:1.17-alpine as gobuilder
allows it to build.