-
Notifications
You must be signed in to change notification settings - Fork 28
Deployment
The more hosted instances of AnonymousOverflow we have, the better load will be balanced between them all, leading to a better experience for everyone.
Alternative: Use the community pre-built Docker image
Follow the documentation here: https://codeberg.org/aryak/-/packages/container/anonymousoverflow-docker-builds/latest.
Alternative: Build the project yourself
- Find a directory to put AnonymousOverflow's source code.
- Clone the repo with
git clone https://github.com/httpjamesm/AnonymousOverflow
.
AnonymousOverflow provides an example docker-compose file in docker-compose.example.yml
. This defines the setup for the container.
- Copy it to
docker-compose.yml
usingcp docker-compose.example.yml docker-compose.yml
. - Modify ports if needed.
- Usually you want to edit the
ports:
section to meet your needs, especially if you're using a reverse proxy, like nginx. Try replacing the- 80:8080
part with- host:port:8080
.
- Usually you want to edit the
- Modify
environment:
to fit your setup.
In the same directory as the docker-compose.yml
file, run docker compose up -d --build
to run the container in the background as a daemon (-d
) and compile it (--build
).
- Server or an always-on computer
- Fast internet connection
AnonymousOverflow is deployed using Docker. Docker containerizes the app for a more convenient and secure deployment.
If you don't have Docker already, follow the official documentation to install the engine.
- Find a directory to put a configuration file.
AnonymousOverflow provides an example docker-compose file in docker-compose.example.yml
. This defines the setup for the container.
- Copy it to
docker-compose.yml
usingcp docker-compose.example.yml docker-compose.yml
. - Modify ports if needed.
- Usually you want to edit the
ports:
section to meet your needs, especially if you're using a reverse proxy, like nginx. Try replacing the- 80:8080
part with- host:port:8080
.
- Usually you want to edit the
- Modify
environment:
to fit your setup.
In the same directory as the docker-compose.yml
file, run docker compose up -d
to pull the latest release and run the container in the background as a daemon (-d
).
Reverse proxies are especially useful if you want to run multiple services on your machine. nginx
is recommended.
You can install it for your operating system according to the official documentation.
Depending on your operating system, this path may differ, but usually configs are stored in /etc/nginx/sites-enabled
. Navigate to this directory and create a new file called <domain>.conf
.
In this file, put the following:
server {
listen 443 ssl;
server_name domain;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://host:port;
}
}
$remote_addr
is passed to the app via X-Forwarded-For
to enforce the anti-scraping ratelimit properly. If you remove this block, it may block access globally if your instance is abused.
Run nginx -t
to test your config. If all is ok, it should print the following:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
If there are no issues, reload using nginx -s reload
.