standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
343 stars 39 forks source link

Solved: Error on image upload #100

Closed dm5n closed 1 year ago

dm5n commented 1 year ago

Service Versions (please complete the following information): Paste the output of ./server.sh version. For example:

Container                             Repository                        Tag                 Image Id            Size
api-gateway-standalone                standardnotes/api-gateway         latest              220cb89c72b7        202MB
auth-standalone                       standardnotes/auth                latest              e12b9513b715        216MB
auth-worker-standalone                standardnotes/auth                latest              e12b9513b715        216MB
cache-standalone                      redis                             6.0-alpine          13d7db1b2310        26.6MB
db-standalone                         mysql                             8                   7b6f3978ca29        550MB
files-standalone                      standardnotes/files               latest              5d843211190b        204MB
syncing-server-js-standalone          standardnotes/syncing-server-js   latest              715c3339bd74        214MB
syncing-server-js-worker-standalone   standardnotes/syncing-server-js   latest              715c3339bd74        214MB

Describe the issue

I haven't been able to upload images via the Web app or desktop app. Getting 'Unable to start upload session' and 'There was an error while uploading the file'.

I have opened ports 3125 on Ubuntu server using UFW. Also, there was no Valet Token Secret in the .env file. Is that normal? I generated one using OpenSSL and added to the field in the .env file. But should it be added to others such as auth.env nd files.env?

Logs If applicable, add logs to help debug your problem.

dm5n commented 1 year ago

Update: file uploads working. I followed @Otaku's guidance on the SN Discord channel – there's a requirement to setup a file-server as a separate subdomain eg files.example.com in addition to the StandardNotes subdomain eg notes.example.com.

Requires configuring DNS A Name , creating a .conf file for the subdomainin /etc/nginx/sites-enabled and adding SSL certificate via Certbot.

I removed the Valet Secret I generated in Terminal and reverted to the default "VALET_TOKEN_SECRET=change-me-!"

Appears to be working now for attaching files.

Bonus: switching Editor from from Rich Text to the new Super editor enables embedding uploaded images in the text – my original goal for selfhosting SN.