New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update self-hosting documentation #605
Comments
It's true that the docs are a little sparse for v4. We're a small team so please bear with us. We'll get around to it, I promise :) In the meantime, have you tried any of these examples? https://github.com/padloc/padloc/tree/main/docs/examples/hosting/docker |
As @MaKleSoft said, the official docs at https://docs.padloc.app/guides/self-host/ point to those 3 examples using Docker which are up-to-date and confirmed working by a few people already. Can you explain what have you tried, what have you found missing, and what errors you found? That should help us improve. |
Can you check the browser's console log? That or the server logs should have something to help figure out what's up. |
|
Can you try accessing it via http://localhost:8080 instead (that's what that basic config expects)? If you don't want to access it via localhost, you'll need to set pwa:
image: padloc/pwa
build:
context: github.com/padloc/padloc.git#main
dockerfile: Dockerfile-pwa
environment:
PL_SERVER_URL: http://10.1.1.34:3000
PL_PWA_URL: http://10.1.1.34:8080
ports:
- 8080:8080
restart: on-failure Let me know if that helps. |
Update: using the docker + nginx thing worked because the app really gets requests from its own verifiable localhost I suppose. So, it sorta works. Now to figure out how to get accounts created and actually test the thing.
It does not unfortunately. I tried switching to WSL2's internal IP, then windows machine's own IP, then localhost, then made up a domain Note that the padloc.test as
|
@working-name I'm not sure what to do about the IP matching in Windows, but as for the CSP error, what's used in it is If you set that and it's not being picked up, can you share your full |
Update: Yes, I just figured it out: it was the port number. I mapped 8088 to internal 8080 and that's why the error. If I leave it on 8080 for both host and app then it's fine either with version: "3.7"
services:
server:
image: padloc/server
build:
context: github.com/padloc/padloc.git#main
dockerfile: Dockerfile-server
environment:
PL_DATA_BACKEND: leveldb
PL_DATA_LEVELDB_DIR: /data
PL_DATA_ATTACHMENTS_BACKEND: fs
PL_DATA_ATTACHMENTS_DIR: /attachments
PL_SERVER_CLIENT_URL: http://localhost:8088
ports:
- 3000:3000
volumes:
- attachments:/attachments
- data:/data
restart: unless-stopped
pwa:
image: padloc/pwa
build:
context: github.com/padloc/padloc.git#main
dockerfile: Dockerfile-pwa
environment:
PL_SERVER_URL: http://localhost:3000
#PL_PWA_URL: http://localhost:8088
ports:
- 8088:8088
restart: on-failure
volumes:
data:
attachments: With the above YML the app will initialize like so: pwa_1 | > http-server ${PL_PWA_DIR:-dist} -s -p ${PL_PWA_PORT:-8080} --proxy ${PL_PWA_URL:-http://0.0.0.0:${PL_PWA_PORT:-8080}}? |
I agree it's not obvious which of the variables you need to set and which are optional (or even necessary/unnecessary in combination), but it's hard to allow people to experiment and get this running themselves, and allow them to go through more complex setups, while keeping documentation easy to read and parse (to support the cases above). In any case, the port would always be necessary to set via padloc/packages/pwa/webpack.config.js Line 13 in 5f1264a
Can I close this, or is there something you'd like to suggest we improve on, here? |
Oh it's not my ticket, but if I were to suggest an improvement it is to add As far as keeping documentation easy to read and parse ... not sure I agree with that. Documentation's goal is to help you get things running. Looking pretty while failing at its main job doesn't make up for it 😄 I'm thinking you probably don't want to undermine income potential by making it too easy for folk to selfhost. Then again, have no clue if your app even works because I can't get past the confirmation email - set up |
Thanks, I'll add that soon.
Quite the contrary. By making it easier to self-host, we reduce the time we spend on support. We have plenty of people self-hosting it who have shared their opinion on having it been the easiest password manager to self-host so far, and while that experience isn't universal, we're interested in making it the most common.
If you don't want to enable emails via SMTP, you can have them printed to the console with the padloc/packages/core/src/messenger.ts Line 125 in 5f1264a
We chose not to, to prevent abuse and to make the setup easier. Anyone who forks the repo should be able to setup all the environment variables with the Google/Apple/Microsoft certificates/keys and generate their own apps to distribute how they please. |
I'd like to add to what @BrunoBernardino said. Yes, the current setup/configuration is quite confusing, but that's mostly because the number of configuration options has increased dramatically with and since the v4 release, and we simply haven't been able to catch up with the documentation. I also think that the current way of configuring the server instance (env variables all the way down) is not optimal and needs to be supplemented with something less error-prone and easier to use. Going forward the plan is to use json config file as the default way of configuring the server instance, with environment variables overriding said config file and providing a way to handle secrets more securely. This will come with a fairly detailed json schema which will effectively make it self-documenting and easier to trouble-shoot. Here is the corresponding issue: #603 In principle, the goal is to make Padloc the easiest to deploy self-hosted password manager out there, period. I think we still have a ways to go to achieve that, but architecture-wise we have a pretty solid foundation to make this happen. Let me reiterate that we are a small team and constantly have to make decisions as to where to put our focus at any given time. If the documentation around self-hosting leaves something to be desired (which it currently does), that is not because we want it harder for people to self-host. The project is already licensed under |
Also include `PL_EMAIL_BACKEND=console` just to make it simpler to try this out locally and have it just work end-to-end. Based on recommendations at #605 (comment)
Something else that is sort of related, the process of building the native apps is far too convoluted. Is there any specific reason that you can't just build in functionality to set a custom server? I'd love to migrate to this, but I've yet to get any builds working, and iOS is just not happening, period. |
@lumeyisnotyou Any open source app that doesn't have an option to change the server in the mobile apps seems to be trying to discourage self hosting it. I'd suggest using Bitwarden, which has this feature, and more. |
Barely any documentation has been updated to V4, there are no usable docker files, the docker-compose.yml is over a year old, and there aren't any particularly clear instructions on how to get up and running. As previously stated, the instructions that we do have at the moment are very outdated and I've had quite a bit of trouble trying to get myself a self-hosted instance.
The text was updated successfully, but these errors were encountered: