How to run the app on Ubuntu server 20.04 #158
-
This question is basically an ask to supplement the documentation of PhotoView which is very brief, let's say. I have no experience with Docker apps so that's probably the reason I'm lost. My problem: I installed Could you please help me figure out what I'm missing? Thank you. I'm running Ubuntu server 20.04 on 64bit machine: Here are commands that got me to the aforementioned state:
And here's my docker-compose.yml (stripped of sensitive info like passwords, Mapbox token, or domain, of course):
Thanks for your help |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 1 reply
-
Hi @edison23 Photoview doesn't use Apache at all, so you probably hit another server. Your configuration looks ok, it should be accessible from |
Beta Was this translation helpful? Give feedback.
-
Hi @viktorstrate , My setup: I have a computer behind a router with port forwarding set up, that router has static IP and that computer behind it is my server (and the whole setup is pretty far away from me, physically). My goal: have Photoview accessible either
Thru today, I wrote here a long post explaining all the stuff I've tried to achieve either of the above (and that failed to produce a functioning setup). Then I thought, hey, stupid, what about this totally obvious setup:
Then I run the My main question now is: would you happen to have some tutorial on how to set this up with HTTPS? Because I kinda don't feel like exposing all of my photos to my ISPs and whoever else with HTTP and I have no idea how to set SSL up with docker (I have it enforced with Apache but that doesn't apply to Docker, obviously). My second (much less important) question is: how important is to change the MariaDB credentials in the Thank you very much for you time, help, and generally development of this app. Also, I hope this "debugging" will serve someone else in the same situation. |
Beta Was this translation helpful? Give feedback.
-
1. Setup SSLYou can use a reverse proxy to get HTTPS up and running, I will recommend Caddy as it's probably the simplest and it configures HTTPS automatically. You can use it to redirect multiple services from the same port number based on rules like subdomains, using a caddyfile. Example caddyfile
Remember to update the 2. DatabaseDocker Compose is a small helper to Docker itself, that makes it easy to start up multiple Docker containers together configured using the |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll look into setting up Caddy with Docker on Ubuntu when I have more time. As for the database: "not really a security concern" sounds like it might be a security concern in some situations. Could you please give me a hint where the database actually is so I can look at the data stored in it? Again, thanks for your help, I'll probably get back to you with more questions after I figure out the Caddy stuff. And happy New Year, by the way :) |
Beta Was this translation helpful? Give feedback.
-
So, I'm again a bit lost. I tried configuring Caddy as you proposed above but I get an error that the port 443 is already in use. I suppose the problem is using Caddy together with Apache (BTW, in separate locations, I put Photoview into a directory outside the Apache's reach). The whole issue seems to be that I want to use custom port (4242) and also SSL - is that even possible? I played with various ports but it doesn't really matter - as long as I don't put any port to the 1st line, I get the port 443 already in use error, if I put some random port number to the 1st line, I get the same error, only about port 80. Here's my Caddyfile:
After I change the Caddyfile, I run
Caddy doesn't seem to be anyhow reflecting the config (although I know it does reflect it since it was throwing syntaxt errors and such before). I guess I'm missing something basic but I didn't manage to find what it is by doing a few Google queries. I'm grateful for your help. |
Beta Was this translation helpful? Give feedback.
-
I have little experience using Caddy so I don't know of a solution to your exact problem. As far as I can read, for Caddy to automatically configure SSL, you must use port 443, though it is possible to configure certificates manually for a custom port. I don't know what you are using Apache for, but I would probably ditch either Apache or Caddy and only have a single server to manage port 80 and 443. See these guides: |
Beta Was this translation helpful? Give feedback.
-
Thanks for the opinion, I also had the feeling I should be using only one webserver because of (among other issues) the clash of port management, I just hoped for some easy solution. Anyway, thanks for the links and all the help, I'll post here once I get to some working solution. Until then, I'll have to live without the encryption. |
Beta Was this translation helpful? Give feedback.
-
So, in the end, I've implemented the solution without PhotoView. I had already running Piwigo on my server and Syncthing on both the server and my Android phone. I set up synchronization of the camera folder between the phone and a directory on the server. From time to time, I synchronize the filesystem contents with the Piwigo database and I have an up-to-date album in Piwigo with the photos from the phone. It proved as much easier and more convenient solution than to meddle with other webservers (Caddie) on a machine already running one (Apache) -- the set up of ports to have HTTPS with Caddie or the reverse proxy solution seems very cumbersome to me. |
Beta Was this translation helpful? Give feedback.
Hi @viktorstrate ,
thanks for your reply. Yes, I am very interested in Photoview as a replacement for Google Photos that are going to start counting all images towards Google Drive quota.
My setup: I have a computer behind a router with port forwarding set up, that router has static IP and that computer behind it is my server (and the whole setup is pretty far away from me, physically).
My goal: have Photoview accessible either
https://example.org/somepath
orhttps://example.org:48165
where example.org is my domain and that number is some random port I choose).
Thru today, I wrote here a long post explaining all the stuff I've tried to achieve either of the above (and that faile…