I recently came to Opalstack and was lost at the "Create a new uwsgi app via your Opalstack dashboard" because I saw various stacks like Django, but not an option for base install of uWSGI/Flask. I opened a help ticket and got an immediate reply, which worked the first time around, so here it is. I was told that bare uWSGI apps are only available on the older CentOS 7 servers, and that the application options looked different to me because I was on one of the newer Almalinux 9 servers.
Options for installing uWSGI/Flask are either to use a listed application like Django and then remove the Django components or manually setup following these instructions:
- Copy your API token value from https://my.opalstack.com/tokens/
- Go to https://my.opalstack.com/apps/ and click the </> icon for your app's shell user, then copy the "ID" field for the shell user.
- Log in to SSH as the shell user and run the following command, replacing TOKEN with your API token value, ID with the shell user ID and 'NAME' with the name for the new app. Note that this is all a single line:
curl -H "Authorization:Token TOKEN" -H "Content-Type: application/json" -X POST https://my.opalstack.com/api/v1/app/create/ -d '[{"type":"CUS", "name":"NAME", "osuser":"ID", "installer_url":"https://raw.githubusercontent.com/opalstack/installers/refs/heads/master/core/uwsgi/install.sh", "json":{"gzip":true}}]'
That will run an API request to create the new app.
Watch https://my.opalstack.com/apps/ until the new app status is "Ready".
Run the following commands as the app's shell user:
cd ~/apps/NAME
rm -rf env
python3.13 -m venv env
source env/bin/activate
pip install uwsgi flask
./start
At that stage, the new app will be running with a basic WSGI setup. You can then upload or create your Flask project directory, update uwsgi.ini to serve it, and restart the app using its stop and start scripts.