Thank you for letting me use your sharering service.
However, I was unable to create a fourth app, so I had to find another way.
I was able to get streamlit to work on my Synology NAS.
Own domain
SSL (Letās Encrypt, automatically renewed for 3 months)
Unlimited apps added (within NAS memory)
Super energy saving ( 24H , 30w )
The current NAS memory is 16 gigs, so itās running very comfortably.
For reference streamlit hello app will run until the end of May.
https://st.mac365.com/
Translated with www.DeepL.com/Translator (free version)
My NAS (model: Synology DiskStation DS918+ )
1 Like
@matzoka great stuff and very resourceful of you. I have a Synology too and would love to see your instructions on getting this running, please? I could help you put together a deployment guide and test the reproducibility.
Hi @asehmi .
I can help you if you like.
So, where should we start?
ps: Today, I used the same method to connect my Synology NAS to my Google Cloud , Compute Engine instance and it worked perfectly.
GCE Demo Site:
https://google.mac365.com/
I havenāt tried it yet, but Iām sure Amazon EC2 can be done easily as well.
1 Like
Could you list the steps you followed to create and deploy the Streamlit site to your Synology NAS and expose it on a public domain?
I was able to connect to your st demo app, but not to the GCE demo.
I understand. It will take some time.
I created the following document because I wanted to refer to the settings later myself.
It may be difficult to understand.
Note that there are some SynologyNAS models that cannot install streamlit.
Please follow the instructions from 1 to 3 in the document to determine if your model does not support streamlit before proceeding to 4 and 5.
The problematic part was the symptom that numpy could not be installed correctly.
https://integralsoft.jp/streamlit/synology_settings.html
asehmi:
but not to the GCE demo.
I readjusted the GCE based on other usersā settings.
Maybe it will work correctly.
https://google.mac365.com/
Hey @matzoka , I donāt have a Synology but just chiming in to say I love your mindmap tutorial, I brainstorm and organize in mindmap but never thought of chronologically describing steps like you did. What software did you use? (Iām not sure I can put this much details in freemindā¦)
Have a nice day,
Fanilo
asehmi
May 24, 2021, 4:06pm
10
This worked! Nice deployments.
asehmi
May 24, 2021, 4:09pm
11
Fantastic. If you donāt mind can you post your .mmap file too so I can load it into my MindManager app?
Many thanks!
It has been uploaded here.
Please use it.
They are both the same, but if there is a problem, we will find another way.
https://integralsoft.jp/streamlit/synology_settings.mmap
https://integralsoft.jp/streamlit/synology_settings.zip
1 Like
asehmi
May 24, 2021, 9:35pm
13
Thank you!! And it opens fine in my 12 years old version of MM⦠you gotta love products with this kind of backwards compatibility.
2 Likes
Hi @asehmi
Iām glad you were able to use the files.
I was able to synchronize the github repository with SynologyNAS today.
github Webhook
ā
SynologyNAS (Python http server)
ā
Execute git pull (shell)
ā
Sync streamlit app
Now I can finally move out of the share that I borrowed from streamlit.
1 Like
asehmi
May 27, 2021, 7:35am
15
Very nice! Though I imagine for most people paying a few $$$ for a Streamlit share (when it is out of beta) or for Heroku, etc. will be much more convenient than setting up their own āprivate cloudā.
1 Like
Youāre right.
Itās only for people who already have nas like synology.
LeonDpl
October 27, 2021, 1:30pm
17
Hi @matzoka ,
Thank you for the map,
I encounter problems in installing streamlit on a synology DS220j,
calling pip install failed for backports.zoneinfo and argon2-cffi
For both of them I have the following error:
error: command '/usr/local/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-wrap-gcc' failed with exit status 1
I will enjoy any idea you can share with me in order to fix this
Many thanks for your time
matzoka
October 30, 2021, 7:23am
18
Hi @LeonDpl , thanks for reaching out.
I recently upgraded my Synology NAS from 6.0 to 7.0 and my pre-configured Python environment is no longer available.
I have now changed my policy and am using Synologyās Virtual Machine Manager to run Ubuntu Server 20.04 to build my Python environment.
Therefore, Iām not running Streamlit alone inside Synology NAS, but Iām using the features of Synology NAS for other things like SSL, port forwarding, etc.
Iām sorry I canāt help you.
I will try to set up an environment to use Python directly on Synology NAS when I get a chance.
Translated with www.DeepL.com/Translator (free version)
Quite an old thread, but I would like to leave my solution to make Streamlit working on a Docker container on a Synology NAS .
Things to do:
Register a DynDNS on your domain register
Enable the DynDNS at Synology > Control Panel > External Access > DDNS > ā¦
Create a domain certificate, for example, at Letās Encrypt, going to: Synology > Control Panel > Security > Certificate > Addā¦
Set the certificate for your DynDNS domain, at: Synology > Control Panel > Security > Certificate > Settings ā¦
Enable firewall for the Docker container, at Synology > Control Panel > Security > Firewall > Edit Rules > Create > ā¦
Setup the reverse proxy, at: Synology > Control Panel > Login Portal > Advanced > Reverse Proxy > ā¦
You can enable HSTS if you want at the Reverse Proxy
Enable the websocket at: Synology > Control Panel > Login Portal > Advanced > Reverse Proxy > Custom Header > Create > WebSocket > ā¦
Setup the Docker container at the āContainer Managerā app inside Synology. You can use the docker-compose.yml, and create a āProjectā.
As example, these are my files:
Dockerfile
# app/Dockerfile
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install -r requirements.txt
VOLUME ["/app"]
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "main.py", "--server.port=8501", "--server. Address=0.0.0.0"]
docker-compose.yml
version: '3.8'
services:
streamlit_app:
build:
context: .
dockerfile: Dockerfile
container_name: app
hostname: app
ports:
- 8501:8501
volumes:
- type: bind
source: /volume1/docker/app
target: /app
environment:
- TZ=Europe/London
networks:
default:
ipam:
driver: default
config:
- subnet: "172.1.0.0/16"
gateway: "172.1.0.1"
Some screenshots of the process:
More information at:
3 Likes